How to check intersection between polygon and line

Topics: Data Access, General Topics
Jan 17, 2010 at 11:22 PM

Hi.

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.

Coordinator
Jan 18, 2010 at 10: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 2: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?

 

Coordinator
Jan 18, 2010 at 4: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)