|
POST
|
#1: You might find this thread interesting (same Jenn B?): http://forums.arcgis.com/threads/44464-Problems-with-cost-path-analysis-not-shortest-distance #2: You should be able to to run stats on your paths using the ZonalStatistics or ZonalStatisticsAsTable tools. Your path would be the zone, and you could calculate MAX or MEAN cost values (or some other stat) from your cost surface.
... View more
05-30-2013
09:32 AM
|
0
|
0
|
880
|
|
POST
|
The most appropriate tool would be "ZonalStatisticsAsTable" tool in Spatial Analyst:http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000w8000000.htm Use the "MEAN" statistic. No need for looping, you can process the entire thiing in one step.
... View more
05-30-2013
09:25 AM
|
0
|
0
|
748
|
|
POST
|
Thanks for the advice Eric. Question for you: How do I activate the Image Analysis Window? I've never even seen that, and I think I must be missing something. Is in an extension? If so I don't think we have that available. I did see the StackProfile tool in v10.1, which looks nice.... Unfortunatly most of my agency is bound to v10.0 for the near term.
... View more
05-29-2013
10:06 AM
|
0
|
0
|
1222
|
|
POST
|
Okay that's what I thought... bummer. Best thing I came up with is to clip out the viewframe extent and operate on that... the end user fellow loves the toolbar - specifically the profile graph. The intended use is to create a vertical profiles along a line in order to analyze ideal placment of yarding towers and tailholds (http://www.youtube.com/watch?v=lAoyK8UvHP8).
... View more
05-28-2013
05:11 PM
|
0
|
0
|
1222
|
|
POST
|
Trying to help a user run the "Interpolate Line" tool in the 3D Anlayst toolbar in v10.0... They are experiencing extreemly long hang times of this tool, and I've traced the issue down to the Interpolate Line tool not honoring the viewframe analysis extent. My question: Via the toolbar Interpolate Line tool, how can I set the analysis extent in v10.0? In v10.1 the tool works as expected (using the viewframe as the extent).... How can I manually set the extent in v10.0?!?!! Toolbox analysis extent doesn't work BTW...
... View more
05-28-2013
09:26 AM
|
0
|
4
|
1475
|
|
POST
|
"Field calculator expresion might look like:".upper() arcpy.CalculateField_management(myFC,"NEW_FIELD","!OLD_FIELD![0] + !OLD_FIELD![len(!OLD_FIELD!)/2]","PYTHON_9.3","")
... View more
05-23-2013
04:24 PM
|
0
|
0
|
5016
|
|
POST
|
I asked, since the "best" way probably depends on what the rows contain (i.e is there Shape data?). However, if you are looking for a Python-based solution, I'm not sure how you would get away from using an insert cursor, which the cursor kinda being the "lowest level" operator available. Of course the new .da cursors (in v10.1) are much faster than the "old" cursors, so if you are running v10.1, that'd be the 1st thing I'd try. If you were really handy, maybe you could use the new FGDB API, but that's above my head and I don't think there's a way to do it directly via Python.
... View more
05-23-2013
12:39 PM
|
0
|
0
|
668
|
|
POST
|
What does your ArcSDESQLExecute query look like and what is it returning? A spatial view, table view?
... View more
05-23-2013
10:17 AM
|
0
|
0
|
668
|
|
POST
|
Not sure what the issue is exactly, but why not just insert the original polygon objects into the new FC? I'm probably missing something, but I don't see the need to deconstruct them to their constituent points, and then recreate the polygons again. Why not just hand the polygons from the top search cursor directly to the insert cursor? Maybe this would help: http://forums.arcgis.com/threads/66434-A-better-way-to-run-large-Append-Merge-jobs
... View more
05-23-2013
08:28 AM
|
0
|
0
|
734
|
|
POST
|
Shouldn't: arcpy.CalculateStatistics_management("demExtract"),"1","1","#","OVERWRITE") be arcpy.CalculateStatistics_management("demExtract","1","1","#","OVERWRITE") ? As long as your arcpy.env.workspace is set to where the raster "demExtract" lives, then it should work. I would refrain from naming files with camelCase and name it "dem_extract" instead. That said about arcpy.env.workspace, I usually provide the tools with a datset's full path instead of relying on the assumption that all my input datasets are coming from the same workspace, which they often do not. Per your question about a best practices, I am in the (bad) habit of using a harcoded '\\' as my path seperator, and it is much more correct to use os.path.join or os.path.sep to ensure that you are being OS-specific. I only use windows so '\\' works for me. However, if ArcGIS ever gets ported to UNIX or something, I'll be in a world of hurt updating my code...
... View more
05-21-2013
04:50 PM
|
0
|
0
|
2955
|
|
POST
|
I've never used ArcObjects via Python but you can: http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python
... View more
05-21-2013
01:36 PM
|
0
|
0
|
6590
|
|
POST
|
Unless its a shapefile, I don't believe there is currently a way to do this with arcpy in v10.1. A trick though to getting this to work is to make a seperate FGBD for each FC. This code might give you some ideas on how to get the size: import glob
def compactAndReportFGDB(fgdbPath):
oldFgdbSize = 0
for file in glob.glob(fgdbPath + "\\*"):
oldFgdbSize = oldFgdbSize + os.path.getsize(file)
arcpy.Compact_management(fgdbPath)
newFgdbSize = 0
for file in glob.glob(fgdbPath + "\\*"):
newFgdbSize = newFgdbSize + os.path.getsize(file)
compactPct = str(int((oldFgdbSize - newFgdbSize) / float(oldFgdbSize) * 100))
return compactPct
... View more
05-21-2013
10:53 AM
|
0
|
0
|
6590
|
|
POST
|
I think it would look more like this: value = "CAT"
rows = arcpy.UpdateCursor ("Property_Layer","LOCALITY = '' OR LOCALITY IS NULL") #blank string or Nulls
for row in rows:
row.setValue("LOCALITY", value) #assuming this is a text field
rows.updateRow(row)
del row, rows
... View more
05-21-2013
08:18 AM
|
0
|
0
|
1533
|
|
POST
|
That tool you are using (arcpy.FeatureClassToGeodatabase_conversion) is a bit "weird" in that it attempts to do multiple things at once - create a Geodatabase and then copy featureclasses to it. You might have better luck by being more explicit in what you want to do in your workflow, so for example: 1. Create a FGDB 2. Copy your features to it using the CopyFeatures tool. Perhaps you can add some logic as to what to do if these items already exists. Not sure why arcpy.env.overwriteOutput = True isn't working properly for you. Do you have a lock on the FC or FGDB?
... View more
05-20-2013
10:31 AM
|
0
|
0
|
2188
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-25-2014 12:57 PM | |
| 1 | 08-29-2024 08:23 AM | |
| 1 | 08-29-2024 08:21 AM | |
| 1 | 02-13-2012 09:06 AM | |
| 2 | 10-05-2010 07:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
08-30-2024
12:25 AM
|