I just revisited Tools that are not available in ArcGIS Pro and found that whilst the strip map tool is still unavailable in version 2.2, there now exists a potential workaround for some workflows.
From the page:
The tool Generate Rectangles Along Lines can be used as a replacement
for the Strip Map Index Features tool in some workflows.
The tool is in the sampling toolbox and is available for all license levels. The documentation for that tool states that it
creates a series of rectangular polygons that follow a single linear
feature or a group of linear features.
This tool will create an angle field which meets your requirements.
It may be relevant to point out that it cannot be used on features which participate in a geometric network. For such features you may need to export them out to a separate feature class.
UTM zone is one of sixty 6 degree wide bands numbered from west to east (1-60). It requires only a longitude value. Either of these Python expressions will work (the second slightly faster, but more obscure):
zone = int(longitude + 180.0) / 6 + 1
zone = int(longitude + 186.0) / 6
UTM Zone can also refer to one of 120 band segments (north and south), which would then require a longitude value and be represented as a string:
zone = str(int(longitude + 186.0) / 6) + ('S' if (latitude < 0) else 'N')
Even though it is not strictly part of a UTM zone designations, many also use the military grid reference system (MGRS) band designators to slice the 164 degrees of UTM-addressed meridians (from 80S to 84N) into mostly 8 degree tall bands, lettered 'C' through 'X' (skipping 'I' and 'O') -- the 'X' band is 12 degrees tall. MGRS uses 'A' and 'B' for south of 80S (west and east of the Prime Meridian, respectively) and 'Y' and 'Z' for north of 84N (similarly).
The following Python function takes a geometry
parameter and generates a three character formatted string suitable as a rough spatial index hash based on MGRS (fixed-width, so 1X would be rendered 01X
, and lexographic sorting is possible):
def calcMGRS(geom):
bandVals = "CDEFGHJKLMNPQRSTUVWXX"
if (not geom):
return '61B'
ddLon = geom.extent.XMin
ddLat = geom.extent.YMax
zone = int(ddLon + 186.0) / 6
if (ddLat >= 84.0):
band = 'Y' if (ddLon < 0.0) else 'Z'
elif (ddLat <= -80.0):
band = 'A' if (ddLon < 0.0) else 'B'
else:
band = bandVals[int(ddLat + 80.0) / 8]
return '{:02d}{:s}'.format(zone,band)
Note that this is different from the Esri utility, since it uses the upper-left corner of the geometry, not the centroid to identify the zone and band.
Generating a UTM spatial reference string would be simple enough, given the second code block (with direction). The trickiest part would be to extract GeogCS from the current map canvas.
Best Answer
Honestly, I would just calculate a focal variance. Variance within a 3x3 window is very close to TRI
[sqrt(sum(dev^2)]
. The variance would also be more scalable than TRI which is limited to a square 3x3 window. You could use the raster calculator to calculate an algebraic approximation of the index.ArcGIS (type) syntax:
There are several geomorphometric indices available in the ArcGIS Geomorphometry & Gradient Metrics toolbox that would provide alternatives to TRI. There is an actual implementation of TRI, that provides optional corrections and standardization of the index, in the R spatialEco package available on CRAN or GitHub.