|
POST
|
Here is approximately how you can do this in numpy (need to do some other tedious stuff to position final raster correctly): >>> import numpy
... reclass_map = [[10,999],[20,1000]] # reclass list: [[old1,new1],[old2,new2],...]
... arr = arcpy.RasterToNumPyArray('idw.tif',nodata_to_value=0) # raster to numpy
... for i in reclass_map: # loop through class list
... temp = numpy.less(arr,i[0]) # if less than value
... numpy.putmask(arr,temp,i[1]) # set to new value
... new_ras = arcpy.NumPyArrayToRaster(arr) # flip back to raster
... View more
03-11-2016
11:20 AM
|
0
|
6
|
3987
|
|
POST
|
Have you considered flipping to Numpy, reclassifying, and then back again? RasterToNumPyArray—ArcPy Functions | ArcGIS for Desktop NumPyArrayToRaster—ArcPy Functions | ArcGIS for Desktop edit: I assume you've considered and passed on using the Reclassify geoprocessing tool.
... View more
03-11-2016
10:47 AM
|
0
|
0
|
3987
|
|
POST
|
Try building your SQL expression in a previous line, then printing it to confirm that it is what you think it is.
... View more
03-11-2016
09:22 AM
|
0
|
0
|
3268
|
|
POST
|
Is there an error, or what is the problem? What version of ArcGIS are you on?
... View more
03-11-2016
09:19 AM
|
0
|
0
|
719
|
|
POST
|
Not sure about the rest, but you don't have the same number of single and double quotes.
... View more
03-11-2016
09:11 AM
|
1
|
2
|
3268
|
|
POST
|
Tables showing in the table of contents are not "Layers", they are "TableViews". Access them via arcpy.mapping.ListTableViews(mxd)
... View more
03-10-2016
02:26 PM
|
2
|
1
|
1336
|
|
POST
|
No, the label expression dialog does it differently than the field calculator (convenient... ). !Name!.title() results in an error.
... View more
03-10-2016
12:17 PM
|
2
|
2
|
2052
|
|
POST
|
In the Label Expression, change the Parser to Python, and use the expression [Name].title() - if your field is called "Name".
... View more
03-10-2016
11:07 AM
|
3
|
4
|
2052
|
|
POST
|
Okay, if an ESRI employee is going to promote a QGIS answer then so will I. The QGIS equivalent to ArcGIS fishnet is Create > Create Grid Layer within the MMQGIS plugin. It's a pretty cool tool that can also make a hexagon grid for you.
... View more
03-09-2016
04:17 PM
|
1
|
1
|
1379
|
|
POST
|
If I understand correctly, you have an irregularly shaped polygon (i.e. not necessarily a rectangle or circle) and want to constrain it to an exact size. The short answer is: no, there is no such tool to do this, that I know about. However, you may be able to script it, although it would be somewhat complicated. Given the vertex and a bearing to move it on, you could automate moving a single vertex and testing the resulting area, through trial and error (although, even then, you may not be able to do exactly what you want - think of an S-shaped polygon).
... View more
03-09-2016
03:52 PM
|
0
|
0
|
3249
|
|
POST
|
You should ask this question on a more general GIS forum, like: Geographic Information Systems Stack Exchange ...as this forum is specifically for ESRI ArcGIS software (similar, but different to QGIS) users.
... View more
03-09-2016
02:56 PM
|
1
|
0
|
1379
|
|
POST
|
You can make a Python add-in Application Extension that fires every time ArcMap is open (via the startup(self) function), verifies whether it's one of the desired mxds, and applies your symbology from a layer file (as Wes mentions): Extension class—Help | ArcGIS for Desktop
... View more
03-09-2016
09:48 AM
|
1
|
0
|
1882
|
|
POST
|
I think you're looking for Tabulate Area, using a county feature layer as the zone input.
... View more
03-09-2016
09:28 AM
|
1
|
1
|
1299
|
|
BLOG
|
Just FYI, this style works for me: >>> where_clause = """{0} = {1}""".format(arcpy.AddFieldDelimiters(featureClass,'FID'),int(10)) ... arcpy.SelectLayerByAttribute_management(newLayer,"NEW_SELECTION",where_clause)
... View more
03-08-2016
01:12 PM
|
0
|
0
|
2733
|
|
BLOG
|
I believe you should use: AddFieldDelimiters—ArcPy Functions | ArcGIS for Desktop ...which will place the correct quotes around the field, given the feature class name (and figuring the datasource type on its own).
... View more
03-08-2016
08:47 AM
|
1
|
0
|
2733
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-25-2015 01:51 PM | |
| 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 |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|