As usual, it was a simple thing that was missed. I had neglected to set the output coordinate system and apply a transformation. I added these lines at the beginning:
env.outputCoordinateSystem = arcpy.SpatialReference("NAD 1983 UTM Zone 13N")
env.geographicTransformations = "WGS_1984_(ITRF00)_To_NAD_1983"
The rasters then rendered properly.
I wondered if your code was only applying itself to the first instance, as the indentation isn't correct for a for loop.
for index in index_list:
# set extent
env.extent = index
env.snapRaster = index
env.cellSize = index
This might make the code apply to all the indexes in your index_list.
A few things here:
1) output will always be D:\BRB Snow Cover\Sample\output0.tif in your script. You are not changing it anywhere. If this is the expected behaviour (which I suspect is not) and you want to overwrite that file, simply write arcpy.env.overwriteOutput = True.
2) If you want to change the output name and increase it by 1 (which I assume is ...
The equation to linearly scale 100-0 to 1-10 is:
-0.09x + 10
The equation to linearly scale 200-500 to 1-10 is:
0.03x - 5
You could use nested Con functions in the raster calculator to apply these equations:
Con("distance" <= 100,
-0.09 * "distance" + 10,
Con("distance" < 200,
Con("distance" <= 500,
Some term this is as girth and the University of Connecticut, Center for Land Use Education & Research, has developed a free geoprocessing tool (Shape Metrics) to calculate this among many other shape metrics. This is mentioned in the link as an index but it is quite easy to find the radius from the formulae given. You can download it from the link, ...
You should be able to use the Conditional tool, either standalone or in Raster Calculator. Set your conditional statement so that wherever Mask=Water will be 1, and everywhere else will be 0. Something like this:
Con(Water=Mask, 1, 0)
This will produce a binary raster marking the waterline. If you need to know the height of the waterline you could then use ...
Let's work through a Haussdorf clustering of lines.
We'll use the sf package for spatial data and distance calculations:
starting with your final x, lets group everything by cyclone number, make line features, and keep the number of points in the group:
cyclones = x %>% group_by(CycloneNo) %>% mutate(n=n()) %>% summarize(n=mean(n),...
It might not be perfect, but if you have access to the Spatial Analyst extension, you could try “Focal Statistics using a 3-cell circle and the “Majority” statistic, ignoring no data cells in the calculation. The efficacy of this approach will really depend on the complexity of your zone boundaries and proximity to adjacent zones.
Alternatively, if you ...
I found the answer to my question here.
Finding a custom projection for the Gulf Coast was difficult because my data spans five states (west to east coast) and in some cases data points fall far off-shore. The spatial reference required making reasonably accurate estimates of distance and estimates of area.
The ppt in the link above recommends using a ...
It sounds like you need to resample one of your rasters so that they have the same size and aligned cells. Resample is probably the best option, but Altering the resolution of a raster gives some additional tool options. Cell size and resampling in analysis discusses in more detail the different methods that can be used to calculate the new values when ...