New answers tagged

0

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.


0

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.


0

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 ...


2

Similarly to above, you can reclassify your distance into 4 classes and type this in calculator: Pick("Reclass",[-0.09,0,0.03,0]) * "Distance"+Pick("Reclass",[10,1,-5,10])


2

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, 1, Con("distance" <= 500, 0.03 *...


1

Calculate Statistics on the Euc Dist raster (to populate maximum), In the Raster Calculator: "eucdistraster".maximum - "eucdistraster"


1

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, ...


1

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 ...


1

Let's work through a Haussdorf clustering of lines. We'll use the sf package for spatial data and distance calculations: library(sf) 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),...


1

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 ...


0

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 ...


1

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 ...


Top 50 recent answers are included