Search code examples
eclipsepolygonnutiteq

How can I draw a polygon on intersection coordinates on Nutiteq?


Hey people this is going to be my first question so dont hit me too hard !

Before I have already added polygons but the intersection is a bit complicating.

with pre-defined i mean for example intersection coordinates of two other polygons. I'm calculating the area of the polygon intersection but i also want to highlight the area. Thanks


Solution

  • You would need two steps:

    1. calculate intersection: polygon from 2 polygons. I would use JTS for it, you would need to provide data in JTS objects.

    2. highlight the intersection on mapview (nutiteq for example). You can just add the resulting polygon as one geometry element into geometry layer, just as any other polygon. Use special styling to make it look different. You would need to convert JTS polygon to Nutiteq Polygon object to show it on map