|
POST
|
Your example (objectid >= 6 AND objectid <= 15) illustrates the problem with using rigid dropdown lists to build SQL queries. It includes (or could include) multiple fields, operators, and a condition. You could make dropdowns for all of those, but how is that any better than the out-of-the-box query builder within the Select Layer By Attribute tool?
... View more
09-06-2016
10:47 AM
|
0
|
1
|
1293
|
|
POST
|
See here for lots of ideas to fix a toolbar opening off screen, assuming that's the problem.
... View more
09-06-2016
09:34 AM
|
0
|
0
|
982
|
|
POST
|
You could use a For iterator (e.g. "For 1 to 50" to do something, like Add Field, 50 times [or possible 49 times, depending how it counts]). This would add 50 copies of very similar fields, like all fields of the same type, with incrementing numbers in their names, like "My_Field_1", "My_Field_2", etc. Or, you could populate a table with your Add Field parameters (columns holding info like field name, field type, etc.) and run the Iterate Row Selection to get those values to use in Add Field, so you could have full control over the types and names of all your new fields.
... View more
09-06-2016
09:14 AM
|
1
|
1
|
3098
|
|
POST
|
This would be my guess: fieldName1 = "GeoReporting.AldermanicDistrict"
fieldName2 = 'AldermanicSJ.NAME'
calcExpression ="!"+fieldName2+"!"
# 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: "GeoReporting Features"
arcpy.CalculateField_management(targetFeatures, fieldName1, calcExpression, "PYTHON")
... View more
09-02-2016
01:09 PM
|
0
|
1
|
872
|
|
POST
|
You need to select a statistics type, next to the field name.
... View more
09-02-2016
12:11 PM
|
2
|
1
|
2413
|
|
POST
|
The interface will indicate an error (red 'x' circle) until you select a statistic type. I get annoyed by this every time I use the tool.
... View more
09-02-2016
11:57 AM
|
1
|
3
|
2413
|
|
POST
|
Have you tried running through the workflow manually to see exactly what's going on? You could also verify the field names like: print [i.name for i in arcpy.ListFields('GRE_view')]
... View more
09-02-2016
11:22 AM
|
0
|
4
|
2375
|
|
POST
|
Perhaps try expression_type="PYTHON_9.3". If that doesn't work, can you provide the error message?
... View more
09-02-2016
10:58 AM
|
0
|
6
|
2375
|
|
POST
|
The faster method that comes to mind is to use a data access module search cursor to get at the geometry, and use that in zonal statistics.
... View more
09-02-2016
07:55 AM
|
2
|
1
|
2134
|
|
POST
|
Oh I see. It probably depends somewhat on the size of the datasets. Suppose there are 1000 points. You could do 1000 individual selections/field calculations, or 1 spatial join (to an in-memory feature class if you don't want to keep it) then 1 join then 1 field calculation. I'm guessing the second option is faster, but haven't tested.
... View more
09-01-2016
02:22 PM
|
0
|
8
|
2375
|
|
POST
|
I think what's happening is that you're trying to jam a row object where a feature layer should be (first parameter of ZonalStatistics). I'm not quite sure how to convert a row object to a layer with the old-style cursors, but it is definitely possible...
... View more
09-01-2016
12:12 PM
|
2
|
3
|
2134
|
|
POST
|
I know it's probably a quirk in the interface, but can you please format your code block into multiple rows?
... View more
09-01-2016
11:35 AM
|
2
|
1
|
2134
|
|
POST
|
Don't delete the cursor inside the loop - you're still using it. In fact, I don't think you need to del cursor or row at all - 'with' does that for you.
... View more
08-31-2016
05:42 PM
|
1
|
1
|
1302
|
|
POST
|
(lines 5 & 6 should be adjusted by half a pixel to move to the pixel center) Lines 5 and 6 in the world file are supposed to reference the coordinates of the upper left pixel center, but I was lazy and just used the upper left coordinates of the raster (so, the coordinates correspond to the upper left corner of the upper left pixel). Because the raster is shifted by much more than a pixel, being off by half a pixel doesn't really matter, for now.
... View more
08-30-2016
10:07 AM
|
0
|
1
|
5304
|
| 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
|