This project has moved and is read-only. For the latest updates, please go here.

How to check intersection between polygon and line

Topics: Data Access, General Topics
Jan 18, 2010 at 12:22 AM


I have one layer with polygons in shapefile. I would like to check if line (made by user - so image and world coordinates are known) intersects with at least one polygon (from whole layer). Any advices how to do it?

Thank you very much for any help.

Jan 18, 2010 at 11:19 AM

hi pzak, you can use NTS to test for intersections, there is a utility to aid converting between NTS geometries and SharpMap geometries in the extensions project.

hth jd

Jan 18, 2010 at 3:27 PM

Hi, Thanks for answer. But I forgot to mention one thing: I'm trying to do this on CF version. Do you thing it is ported so well to do this or should are they any workarounds for this?


Jan 18, 2010 at 5:37 PM

It looks like the converter is in the SharpMapCF source tree along with a copy of NTS (I havent downloaded it but I assume it is compiled for CF)