6
votes
Accepted
Interpolation with 10 data points
Both methods are "appropriate".
IDW basically says "half way between a point valued 6 and a point valued 8 the value is going to be 7", but extended to the distance to multiple ...
4
votes
Accepted
Remove pixels from one raster to another
Subtract 1 from pixel values of raster 1 and muliply by -1: by this, you invert value: 1 results in 0, 0 results in 1. Then divide this with the pixel values of image 2. Division by 0 (for initial ...
3
votes
Accepted
Buffer Polygons without overlapping regions of neighbouring boundaries in ArcGIS Pro
The simplest buffer would be a buffer ignoring state division along the coastal edge and this can be achieved with the buffer tool and setting the Dissolve Type parameter to Dissolve all output ...
2
votes
Calculating Raster Cover in Polygon - ArcGIS Pro
You can use the CON() tool to select pixels that are greater than 2.5 in value, the trick is to set the Mask environment setting to the polygon and ensure cell size is the same as your input VOM ...
2
votes
Combinatorial And
As per the documentation:
CombinatorialAnd(in_raster_or_constant1, in_raster_or_constant2)
2
votes
Accepted
"NameError: name 'SetNull' is not defined" error in ArcPy script?
As commented by Vince, you either need to include the arcpy.sa before your SetNull, or do a wildcard import.
Explicit reference:
import arcpy
...
output_raster = arcpy.sa.SetNull(raster < 0.1, ...
2
votes
Accepted
Fixing AttributeError: 'module' object has no attribute 'MakeRasterLayer_management'
arcpy tools can either be used from their module or are aliased so they can be used from the top level.
From the management module:
arcpy.management.MakeRasterLayer
Or by the top-level alias:
arcpy....
2
votes
Accepted
Raster calculator multiple expressions
See the Map Algebra operators and complex statements documentation:
== is the equals operator.
& is the boolean and operator.
| is the boolean or operator.
you need to put () parentheses around ...
2
votes
Extract raster attribute other than value to points in ArcGIS Pro using ArcPy
Extract values I believe only works with the value of the cell, but you can simply join the category in your raster attribute table to the point dataset, using the value as the joining field to help ...
1
vote
Moderate raster values based on another raster
A trick I have used in the past to answer this sort of question is to multiply your erosion risk layer by 10 so you have values 10,20,30,40 & 50. You then add your land cover raster to this ...
1
vote
Reset the NODATA to negative value error
The NoData value can be edited by computing it from the raster dataset properties. It will permanently change the value and while exporting it will remain the same.
In the ArcCatalog or the Catalog ...
1
vote
arcpy.sa.RasterCalculator tells me the input raster is invalid when I use a complicated python expression
On the off chance that anyone finds themselves in a similar situation, here is the solution I used to extract a desired bit from an integer in a raster. As mentioned in a comment above, this link ...
1
vote
Processing large number of rasters using ArcPy but it only saves last file
Where you have an output file name of:
r['F:\GIS\SourceData\Model\EnergyWet\zeroed\-4'] + "out.tif"
you have a random variable called r next to a list, so that's bad syntax and apparently ...
1
vote
Accepted
Using selection from multivalue input to perform clip with ArcPy
Save this code as a Python Toolbox (ExtractFeatures.pyt). It should provide the functionality you are describing, and you can re-purpose as needed to work within your model.
# -*- coding: utf-8 -*-
...
1
vote
Filter raster data by year
It sounds like you are describing a multi-band raster where each band is a years worth of data? Think of it as a stack of raster layers, each layer a year of data all in one dataset (tif).
You can use ...
1
vote
Accepted
Calculating cell statistics for subset of bands in multiband raster
I created a raster layer for each band for bands 8-16 and then provided a list of each of the raster layers to the Cell Statistics tool:
# Provide path to raster
input_multiband_raster = r"C:\...
1
vote
Calculating locations that could be reached by gravity aqueduct (below certain slope from sources) using ArcMap
If you have Spatial Analyst in ArcGIS, you can do this with the Distance Accumulation tool. Set the vertical cost parameters to make it prohibitively expensive to violate your desired slope constraint....
1
vote
Solving ExecutionError caused by input layer
So I figured out that the problem was that I was passing in "outReclassRR" in the arcpy.management.ApplySymbologyFromLayer() function instead of "outReclass_layer" which was ...
1
vote
Raster data summarized in different vector polygons
Try Zonal statistics:
A zonal statistics operation is one that calculates statistics on cell
values of a raster (a value raster) within the zones defined by
another dataset.
1
vote
A quicker way to perform zonal statistics for overlapping zone data
Apparently now the same tool of the ArcGIS Pro version Zonal Statistics As Table does iterate each part when there are overlaps.
Notice the differences in the tool description for ArcMap (v10.8):
If ...
1
vote
Raster smoothing using ArcMap
The deposit thickness is unlikely to be of a uniform thickness. I would suggest downloading a DEM from a date before the avalanche and using it as a starting point.
If you cannot find a DEM for your ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
spatial-analyst × 1581arcgis-desktop × 1009
arcpy × 357
raster-calculator × 271
arcmap × 255
raster × 180
arcgis-10.0 × 130
arcgis-10.1 × 113
arcgis-pro × 105
arcgis-10.2 × 102
zonal-statistics × 97
dem × 78
spatial-statistics × 60
cost-path × 54
interpolation × 53
modelbuilder × 51
arcgis-10.3 × 50
con × 44
reclassify × 40
r × 36
3d-analyst × 34
map-algebra × 34
qgis × 32
hydrology × 32
slope × 30