POST
|
Dallas- Wow! thank you sooo much. I really appreciate your response. I did run the code you suggested and it almost works. I commented bits out until I discovered the source of the error. It gets hung up in the buffer statement where it calls the wBuffDist. I'll do a little more work to try and figure it out. Thanks again!
... View more
01-15-2015
01:18 PM
|
0
|
2
|
603
|
POST
|
I recently purchased David Allen's GIS tutorial and I'm stuck on exercise 2.3. The objective is to buffer multiple paths with variable buffer distances based on the length of the path -step 7 (I'm stuck here). The exercise uses a search cursor to go through each path and buffer accordingly. The data are available with the book here. I know the buffer line is incorrect, it needs to call fcName and wellBuffDist. It would be helpful to see the full script...if anyone has already completed this exercise. Thanks. try: import arcpy from arcpy import env env.workspace = r"C:\EsriPress\GISTPython\Data\City of Oleander.gdb\Well_Data" env.overwriteOutput = True fcName = "BC_South_3H_Path" wellCursor = arcpy.da.SearchCursor(fcName,["Shape_Length"]) for row in wellCursor: drillLength = row[0] def wellBuffDist(drillLenght, wellBuffDist): if drillLenght < 3000: wellBuffDist = 75 elif drillLenght >= 3000 and drillLenght < 4000: wellBuffDist = 175 else: wellBuffDist = 300 # Replace a layer/table view name with a path to a dataset (which can be a layer file) or create the layer/table view within the script # The following inputs are layers or table views: "BC_South_3H_Path" arcpy.Buffer_analysis(in_features="BC_South_3H_Path",out_feature_class="C:/EsriPress/GISTPython/MyExercises/Scratch/Temporary Storage.gdb/SelectionBuffer",buffer_distance_or_field="300 feet",line_side="FULL",line_end_type="ROUND",dissolve_option="NONE",dissolve_field="#") print "great job!" except: print "do over"
... View more
01-14-2015
09:58 AM
|
0
|
4
|
3545
|
POST
|
Hi- I took a NHDPlus course in 2008 which provided NHDplus in the form of a geodatabase. I've recently downloaded NHDplus v 2 (released in 2012) and want to migrate the data over to a geodatabase. Can I use the v 1 xml? Has the schema changed? What sort of pit-falls should I be wary of? Thanks! BTW if anyone has the v 2 xml...I'll buy you a beer!
... View more
05-16-2014
11:55 AM
|
0
|
0
|
1750
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|