Select to view content in your preferred language

Geometry Engine Cut generates wrong results

781
3
Jump to solution
02-14-2022 08:46 AM
BITDeveloperNickSwartz
New Contributor II

I am trying to cut a highway according to the extent of the screen.  The following screenshot is a visualization of the cut boundary (vertical dark green line), and the resultant geometry after the "cut" operation 

BITDeveloperNickSwartz_0-1644857047500.png

As you can see it creates an array of three geometries (index 0 is the black line, which according to the documentation should be to the left of the vertical line.  The light green line somehow spans either side of the cut line.  Then there is a section that touches the cut line.  Not sure what's going on here.  I might try to tackle this issue a different way. 

0 Kudos
1 Solution

Accepted Solutions
BITDeveloperNickSwartz
New Contributor II

BITDeveloperNickSwartz_0-1644965689806.png

Solved this issue by creating polygons using the extent of the screen and the extent of the polyline feature i was trying to cut.  That way I was able to use the more reliable "clip" tool in the geometry Engine.  

View solution in original post

0 Kudos
3 Replies
KristianEkenes
Esri Regular Contributor

Can you share a code pen with just the geometries involved in this image? That way I can take a closer look at what might be going on.

0 Kudos
BITDeveloperNickSwartz
New Contributor II

Unfortunately I don't think that's an option.  I could try to develop some pared down snippet, but this comes from a very large/complicated app that works on secured services.  Thanks

 

0 Kudos
BITDeveloperNickSwartz
New Contributor II

BITDeveloperNickSwartz_0-1644965689806.png

Solved this issue by creating polygons using the extent of the screen and the extent of the polyline feature i was trying to cut.  That way I was able to use the more reliable "clip" tool in the geometry Engine.  

0 Kudos