POST
|
I am working with some census population data and trying to rasterize and then disagreggate each census tract polygon into homogeneous raster cells (each has same value). For example, if the polygon contains a total population of 100 and when it's rasterized it becomes 10 cells, then I want each cell to have a value of 10 (10cells x 10people = 100 people). I intend to do dasymetric mapping in the future using land cover to distribute the people, but have a tight deadline and need something basic by Friday. Does anyone know a tool in Arc or QGIS that can disaggregate like this? I'm thinking zonal or focal stats, but not sure... Thanks.
... View more
02-14-2012
08:41 AM
|
0
|
0
|
530
|
POST
|
I am trying to generate least cost paths for water quality modeling. I know how to generate a cost surface and utilize the various tools in Spatial Analyst to produce a cost path raster. The problem is that I need to do this hundreds of times. The write time for each path raster is about 5-10 secs x hundreds of outputs = too long. Is there a way (perhaps through matrix overlays?) to generate quick cost paths in order to determine which cells that each least cost path traverses through? Thanks!
... View more
05-23-2011
02:10 PM
|
0
|
0
|
746
|
POST
|
Hi, I am trying to run a model in ArcGIS based on some Python code I wrote. Despite my best efforts, I keep getting the following error: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() The confusing part is that when I run it in Python it works fine, but through ArcGIS geoprocessor I get the error. If anyone has some ideas on how to clean up my code and make it work in ArcGIS, it is most appreciated! A snippet of my code is below: #c_below_cur c_below_curL1 = invest.convertRastertoArray(gp.workspace,'c_below_curL')[/INDENT] c_below_curL = numpy.where(c_below_curL1 == -3.40282347e+38, 0, c_below_curL1) c_below_curU1 = invest.convertRastertoArray(gp.workspace,'c_below_curU') c_below_curU = numpy.where(c_below_curU1 == -3.40282347e+38, 0, c_below_curU1) c_below_curRnd = [] randomBelowCurList = [] for x in range(len(c_below_curU)): [INDENT]found = 'no'[/INDENT] <--ERROR OCCURS HERE--> [INDENT]if c_below_curU <> 0:[/INDENT] [INDENT][INDENT]for z in range(len(randomBelowCurList)):[/INDENT][/INDENT] [INDENT][INDENT][INDENT]if c_below_curU == randomBelowCurList :[/INDENT][/INDENT][/INDENT] [INDENT][INDENT][INDENT][INDENT]found = 'yes'[/INDENT][/INDENT][/INDENT][/INDENT] [INDENT][INDENT][INDENT][INDENT]indexBelowCur = randomBelowCurList.index(c_below_curU ) [/INDENT][/INDENT][/INDENT][/INDENT] [INDENT][INDENT][INDENT][INDENT]break[/INDENT][/INDENT][/INDENT][/INDENT] [INDENT][INDENT]if found == 'yes':[/INDENT][/INDENT] [INDENT][INDENT][INDENT]randBelowCur = randomBelowCurList[indexBelowCur+1][/INDENT][/INDENT][/INDENT] [INDENT][INDENT]if found == 'no':[/INDENT][/INDENT] [INDENT][INDENT][INDENT]randBelowCur = random.uniform(0, 1)[/INDENT][/INDENT][/INDENT] [INDENT][INDENT][INDENT]randomBelowCurList.append(c_below_curU )[/INDENT][/INDENT][/INDENT] [INDENT][INDENT][INDENT]randomBelowCurList.append(randBelowCur)[/INDENT][/INDENT][/INDENT] [INDENT][INDENT]tempCpj = (((c_below_curU - c_below_curL )*randBelowCur) + c_below_curL )[/INDENT][/INDENT] [INDENT][INDENT]c_below_curRnd.append(tempCpj) [/INDENT][/INDENT] c_below_curRSum = numpy.sum(c_below_curRnd, dtype=numpy.float64)
... View more
06-10-2010
12:20 PM
|
0
|
0
|
290
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|