Geofencing? Polygons?

Jul 4, 2011 at 10:52 AM

Hi there.

I am sure this has been discussed before, but I cant seem to find it. I am a business analyst (not a programmer) and probably thats why struggling with this. We work in the environment and wish to do the following:

1. Make polygons (have city boundary data), I believe its called geofencing,
2. We would like to be able to feed in location coordinates,
3. The system to respond appropriately - about what city the coordinates are located in.

Is that possible? Could someone point me in the right direction? Apologies if this is not the right place to ask.

Appreciate the help.


Jul 4, 2011 at 3:46 PM

What you are looking is the spatial relation between your cities (polygon) and arbitrary locations (points).

This can be done using DotSpatial.Topology using Geometry.Intersects(Geometry).

The version provided with DotSpatial is fairly old though, and you currently will have better performance and luck using NetTopologySuite.
Actually DotSpatial.Topology was derived from that library in the first place.

Hth FObermaier

Jul 4, 2011 at 3:55 PM

Herr Obermaier.

Thanks a lot for the quick response. I guess you are correct in the analysis. We dont need any representation on a map - just a spatial relationship.

I just visitied the NetTopology Suite site. Which module would be best for our use.

Thanks again.

Jul 4, 2011 at 4:10 PM

If you are not afraid to compile the library yourself, I'd say go for the branches/v1.10.
That way you can take advantage of the PreparedGeometry namespace that offers benefits when checking spatial relations of many objects (points) against few static objects (polygons)

Hth FObermaier