|
POST
|
Data module cursors are much faster and provide access to geometry tokens. Probably other unknown benefits.
... View more
04-08-2015
02:01 PM
|
2
|
1
|
4627
|
|
POST
|
Make your list of fields using ListFields. If you're first learning cursors, you should skip to using the arcpy.da.SearchCursor. Both links contain examples at the bottom.
... View more
04-08-2015
01:38 PM
|
2
|
3
|
4627
|
|
POST
|
I'm not sure what the best way to do what you want to do is, but here is my understanding of what's going wrong: >>> fldmap = arcpy.FieldMappings()
>>> print type(fldmap)
<class 'arcpy.arcobjects.arcobjects.FieldMappings'>
>>> remfldmap = fldmap.removeAll()
>>> print type(remfldmap)
<type 'NoneType'> You're trying to use 'remfldmap' as an empty field map object, when it is actually a completely empty object (i.e. not a field map). edit: you can generate unattributed geometries using code like below: >>> polygons = []
... with arcpy.da.SearchCursor("YOUR_FEATURE_CLASS","SHAPE@") as cursor:
... for row in cursor:
... polygons.append(row[0])
... arcpy.CopyFeatures_management(polygons,r"OUTPUT_FEATURE_CLASS")
... View more
04-06-2015
01:37 PM
|
1
|
0
|
2359
|
|
POST
|
Ciprian, through the GUI: 1.) Create points from XY (Make XY Event Layer) 2.) Create line from points (this or this) 3.) Create polygons from lines (requires Advanced license) If you want to do this using Arcpy (certainly possible and done many times before), please post what you've got so far.
... View more
04-02-2015
10:26 AM
|
0
|
1
|
5210
|
|
POST
|
Please post the script. There are often minor errors in exported scripts.
... View more
04-01-2015
09:15 AM
|
0
|
1
|
1211
|
|
POST
|
Please post your entire non-working script and error message. There does not appear to be an error in what you've posted. For example, this works: >>> arcpy.env.workspace = r'C:/junk'
... fcList = arcpy.ListFeatureClasses()
... for fc in fcList:
... if fc == 'utms.shp':
... print fc
...
# returns utms.shp
... View more
03-30-2015
01:17 PM
|
0
|
1
|
921
|
|
POST
|
I do see the same behaviour with Rnd as field name (v10.2.2). It appears to be a problem (bug or feature?) with using an unhandled VBScript (or VBA possibly) function as a field name. I see similar behaviour using Now as a string field name: the Now() function returns a string of the current date/time. The Now() function appears to be called every time field calculator is opened. Some field names are reserved, like "Date", which indicates some VB functions have been handled, but not all.
... View more
03-30-2015
10:53 AM
|
1
|
3
|
2086
|
|
POST
|
You mention that the elevation values at both boundary and base are known, so I assume there is some constant elevation drop for the bench...? I'll assume 10m drop, just for illustration. Since you know the drop and the angle, you can figure out the horizontal distance of the bench using: tan(theta) = O/A
O = 10
theta = 30
A = 10/tan(30) So, if the bench drops 10m, it must extend 17.3m to fit a 30 degree angle. So, buffer the boundary by -17.3m to get your base boundary. From there, you can convert the buffer to line, convert line to raster, and use Con() to extract elevations at the base of the slope.
... View more
03-30-2015
10:38 AM
|
2
|
2
|
1174
|
|
POST
|
It's not clear to me what you're trying to achieve or what's wrong with what you've produced.
... View more
03-28-2015
04:23 PM
|
0
|
2
|
1217
|
|
POST
|
As far as I can tell, the background server error is one of those evil, random bugs in ArcGIS, and may or may not have anything to do with your data or spatial join run. Try turning off background processing. Try restarting ArcGIS. Try rebooting.
... View more
03-27-2015
05:07 PM
|
0
|
0
|
962
|
|
POST
|
Check the spelling of your raster layer. The error appears when you attempt to multiply what it thinks is a string (because it's not a raster in the map) by a non-integer (interestingly, you can actually multiply a string by an integer). I can reproduce your error by misspelling an existing raster layer. For example, with an existing raster.jpg: "ras234ter.jpg" * 0.1 ...results in your error, while: "raster.jpg" * 0.1 ...completes successfully.
... View more
03-27-2015
10:47 AM
|
1
|
5
|
5701
|
|
POST
|
Can you post your entire script or map algebra expression?
... View more
03-27-2015
10:25 AM
|
1
|
0
|
5701
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM | |
| 2 | 07-16-2020 11:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|