Point inside polygon?

Sep 19, 2011 at 3:02 PM

Hi everyone!

I´m developing an application that represents a point in moving (real-time intruder) on a map. I have a region defined as a polygon  and i want to know how can i know if the point (intruder) is inside the polygon

Thanks in advance

Sep 19, 2011 at 8:54 PM

No guarantee this is the best way of doing that, but this example might give you an idea.

            DotSpatial.Topology.Coordinate intruder;
            IFeature polygon;
            return polygon.Intersects(intruder);

Add the following using statement.

using DotSpatial.Data;
Sep 20, 2011 at 10:00 AM

Thanks for the help. The solution was as you said but with a little modification

return polygon.Envelope.Intersects(intruder)

Thank you very much!!!