Dan_Patterson

Free advanced tools ... Feature extent to poly* features

Blog Post created by Dan_Patterson Champion on Jun 26, 2019

F ree basic functionality.  

 

I use Free as both a verb and an adjective

The examples I will be providing should be Free(d) and should not require an Advanced or Standard License... they should be Free with a basic license.

 

 

Previously

 - Free Tools : Frequency and Statistics

 

Help topic

Feature Envelope to Polygon

 

Spatial containers

Spatial containers can be used as substitutes for the original spatial pattern.  These would include ...

  • the shape itself,
  • convex hull,
  • concave hull
  • minimum area bounding (or perimeter)
    • circle
    • ellipse
    • rectangle
  • extent poly* features

 

The last of these are axis-aligned shapes bounded by the coordinates of the minimum of the lower left corner to upper right corner, not of the existing coordinates, but by the L(eft), B(ottom), R(ight) and T(op)… LBRT. 

Normally containers only make sense if you are using projected coordinates or can perform geodesic densification. 

 

Output example

Pretty well sums it up. 

  • Specify the input featureclass (polygon, polyline or multipoint),
  • the output type (polygon or polyline) and
  • the output featureclass.

The conversion uses the numpy based Geo class that I describe in the 8 part series on geometry. 

 

The conversion also handles shapes that contain curves, for simple geometry.  To do this, you will find that circles and ellipses or sliced sphericals contain 2 points... the identical start and end and no other points.  At least in a file geodatabase.  The quick solution is to densify the arc based on the ANGLE option in arcpy.densify.  I choose between 1, 2 or 5 degree densification depending on how fine I want the resultant n-gon to reflect the original  curve.

 

I could add the original attributes to the result (either within the toolset or after) or I could also 

Add Geometry Attributes ...

The full call to the tool, or the equivalent bits that I need.

A spatial or attribute join would be another alternative if you need attributes as well.

 

If you have a preference let me know.

The script is embedded for now.  I will release the script and final version when I have addressed all issues.

 

 

WARNING

I have code that checks the validity of the file paths.  If you input or output paths contain spaces or other flotsam, then the tool will not produce any results.  Why?  Too many questions where file paths are the problem.  I won't 'enable' the current practice

Attachments

Outcomes