Select Points Outside of a Polygon

325
1
Jump to solution
05-06-2020 12:17 PM
GreggCountryman1
New Contributor

Hello,

I have a PointCollection and a Polygon. I want to select all of the points from the PointCollection that are not inside the Polygon. I thought that I could use GeometryEngine.Difference but it seems that a PointCollection is not valid for a parameter.

Does anyone have an idea on how best to do this?

Thanks

0 Kudos
1 Solution

Accepted Solutions
Nicholas-Furness
Esri Regular Contributor

I'm not hugely familiar with .NET any more, but could you not create a MultiPoint from the PointCollection (looks like PointCollection implements the right interface to fit the MultiPoint constructor) and then pass that multipoint into GeometryEngine.Difference() along with the polygon?

View solution in original post

0 Kudos
1 Reply
Nicholas-Furness
Esri Regular Contributor

I'm not hugely familiar with .NET any more, but could you not create a MultiPoint from the PointCollection (looks like PointCollection implements the right interface to fit the MultiPoint constructor) and then pass that multipoint into GeometryEngine.Difference() along with the polygon?

0 Kudos