Dasymetric USGS tool Help needed!

3855
2
09-18-2012 06:16 AM
KarlSchrantz
New Contributor
Hello folks!

I am trying to use the dasymetric mapping tool provided by the USGS: WGSC  http://geography.wr.usgs.gov/science/dasymetric/data.htm

They provide a handy toolbox with the scripts enclosed.   I am trying to dasymetricaly map county wide population to census tract polygons.

I am using Arc10.0 student edition on a 64bit windows machine.

I am using the NLCD 2006  Land use map as my raster for ancillary data.  I am only testing it on one county in Michigan at the moment.  I have a county shapefile with the population field.   But every time I try to use the tool I get this message from arc.

C:\Users\Owner\Desktop\CENSUSDATA\TESTtRACT
Start Time: Tue Sep 18 09:16:55 2012
Running script DasymetricMapping...
Setting the INHAB Field
<type 'exceptions.RuntimeError'>: ERROR 999999: Error executing function.
Failed to execute (DasymetricMapping).
Failed at Tue Sep 18 09:17:19 2012 (Elapsed Time: 24.00 seconds)


Does anyone have any experience with this tool?  I have looked over the python code and I cant figure out why my data is incompatible with this tool.

Thanks.
Tags (2)
0 Kudos
2 Replies
DaphneIppolito
New Contributor
Did you ever find a solution to this problem? I am getting the same error messages and cannot figure out why. Thanks!
0 Kudos
IoannisDafermos
New Contributor II

Hi! I've had the same problem with this tool. It seems to be a bug concerning the naming of the input raster file. Suppose the input raster is named "c:\folder1\folder2\img.tif". The source code will isolate "img.tif" as the name of the "InRas" field of the dasymetric table. However, when the table is actually created, the field is named using only the file's base name, not the extension as well. So, it will be named "img". Portion ".tif" of the string must be removed. I have come up with this solution:

Replace the following code line of "dasy.py":

  InRasField = (InRas.split("\\" ))[-1]

with:

  InRasField = (InRas.split("\\" ))[-1]

  theRCharOffset = (-1) * len(".tif")

  InRasField = InRasField[:theRCharOffset]

You'll find it in the first 30 lines of the python source code. Also, try giving a short name to your input raster (up to 10 chars). This worked for me, I hope it works for you too!