|
POST
|
Is it that you want to know the viewshed of each point individually, or the entire trail? If it's the latter, just use the trail polyline layer as the input to the Viewshed tool. If it's the former, you would have to run the viewshed tool in a loop, otherwise the viewsheds of all the points will overlap with each other and not give you the actual viewshed of each individual point, but rather a sort of mishmash of all the point viewsheds.
... View more
12-14-2012
09:04 AM
|
0
|
0
|
1583
|
|
POST
|
Where did you have the custom .tbx files located? After installing v10.1, do you still have this directory: C:\Users\<your username>\AppData\Roaming\ESRI\Desktop10.0\ArcToolbox\My Toolboxes - aka under Windows XP as: C:\Documents and Settings\<your username>\AppData\Roaming\ESRI\Desktop10.0\ArcToolbox\My Toolboxes? If your .tbx files still exist, they will most likely be in this folder... Another place to look is C:\Program Files\ArcGIS\Desktop10.0. If those folders are gone though... In the future, a better place to store custom tools/tbx files/etc. is a network location that is backed up.
... View more
12-13-2012
03:10 PM
|
0
|
0
|
879
|
|
POST
|
Making a .tbx is probably the best, but I have used something like this in the past. I have a whole series of these little helper functions in a script. Some functions use arcpy some don't.
#to import a custom module from a network
import sys
sys.path.append(r"\\snarf\am\div_lm\ds\gis\tools\scripts_toolboxes")
import helper #script is helper.py that is in the scripts_toolboxes folder def searchFiles(rootDir, wildcard = "*"):
"""Returns a list of files under rootDir that contain the wildcard search string"""
fileList = []
if os.path.exists(rootDir) == False:
print "ERROR: " + rootDir + " does not exist!"
else:
for dirPath, dirNames, fileNames in os.walk(rootDir, topdown=True):
for file in fileNames:
if fnmatch.fnmatch(file, wildcard) == True:
fileList.append(dirPath + "\\" + file)
return fileList
... View more
12-12-2012
08:39 AM
|
0
|
0
|
951
|
|
POST
|
I'm having the same issue... The .distanceTo method fails when comparing a geometry object to a "constructed" polyline geometry object. It works great when you run it on one of the points that your "constructed" polyline is created from, but not for a Polyline geometry object that you "construct" from point A and point B. Same error: Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\arcobjects.py", line 779, in distanceTo
return convertArcObjectToPythonObject(self._arc_object.DistanceTo(*gp_fixargs((other,))))
ValueError: <geoprocessing describe geometry object object at 0x0D04CCC0>
... View more
12-12-2012
08:10 AM
|
0
|
0
|
2587
|
|
POST
|
Temporarily gave up on this... Seems that there is some weird dependency on 'FeatureLayer' data types when run as an in-process vs. an out-of-process script tool. This sort of makes sense since there is a linkage between ArcMap TOC and the selected feature set in the script tool... When run out of process there is some sort of break in that linkage. This is a bug I think, but now with LargeAddressAware in v10.1 SP1 I can process my large dataset "in-process"... although it finishes right about at 3.05GB of RAM usage. I think I will submite this behavior as a bug to ESRI (Can't run a search cursor or .fidset describe property on an input feature layer when selections are applied to the feature layer in an 'out-of-process' script tool). To Chris M: Nope, the old cursors exhibit the same behavior. And to boot, they are too slow (compared with .fidset or da.SearchCursor methods of retreiving the OIDs of the selected set). To Thom: Negatory also... Your solution, which sounds familiar 🙂 BTW, won't work in my situation. This needs to loop 10's of thousands of times and copying stuff to in_memory would slow things down and probably cause more memory usage.
... View more
12-03-2012
08:36 AM
|
0
|
0
|
2193
|
|
POST
|
Sadly this is not a new topic: http://forums.arcgis.com/threads/3363-Where-are-the-ArcScripts-Code-galleries-in-the-ArcGIS-Resource-Centre I think the poll numbers say it all...
... View more
11-30-2012
09:43 AM
|
0
|
0
|
2130
|
|
POST
|
Since the demise of ArcScripts I have stopped submitting code. Compared to ArcScripts, the new system (in all its various reincarnations) is terrible. Full stop. I *think* this is the current "solution": http://www.arcgis.com/home/search.html?q=Python%20OR%20arcpy&t=content. Note the results related to Python (the snake not the language) habitat distribution... These are sad times indeed... What I would like to see is a dedicated arcpy/python script repository site totally seperate from all "apps, maps, and snaps" smorgasbord that usable Python code is obscured within ... The could even call it "ArcpyScripts" 🙂
... View more
11-30-2012
08:14 AM
|
0
|
0
|
2130
|