Select to view content in your preferred language

GeometryEngine.Instance.Clip alternative - Need to clip 2 geometries - not envelope

217
4
Jump to solution
4 weeks ago
JonathanDewalt
Regular Contributor

I was hoping to user the GeometryEngine.Instance.Clip function to process numerous polygons but i need to be able clip each polygon with the one after it.  Unfortunately, the Clip function only takes one geometry and the other is an envelope.  I need to be able to pass in two geometries.  Anyone have an alternative suggestion? 

0 Kudos
1 Solution

Accepted Solutions
JonathanDewalt
Regular Contributor

Intersection did the trick.

 

View solution in original post

0 Kudos
4 Replies
RadekMandovec
Occasional Contributor

Why don't you use Intersection instead?

 Geometry pOutGeometry = GeometryEngine.Instance.Intersection(polygon1,
     polygon2, GeometryDimensionType.EsriGeometry2Dimension);
0 Kudos
JonathanDewalt
Regular Contributor
Intersection only provides output geometry where the two geometries intersect. I need to remove parts of one geometry based on another. The clipping geoprocessor tool only works on featureclasses. I have individual geometries within the same featureclass that need to be clipped. So far, my only solution seems to be to export all my records to individual featureclasses and then run the geoprocessor. I was hoping that the GemometryEngine Clip would mark but its second parameter is only an extent and not the original shape.
0 Kudos
CharlesMacleod
Esri Regular Contributor
JonathanDewalt
Regular Contributor

Intersection did the trick.

 

0 Kudos