Large polygon intersections are offset

76 views
Skip to first unread message

Bart P

unread,
Aug 29, 2017, 11:50:46 AM8/29/17
to JSTS devs
Hello. When I create an intersection with two polygons, one of which is quite large, there is an offset to the intersection that seems to be related to both the size of the polygon and the difference in the north-south angle of the sides. In the picture below, my large polygon is blue and stretches over half the map, with steep angles. My small polygon was in yellow, with the intersection in green. As you can see, the intersection has the correct shape, but it's offset from the large, blue polygon by a significant amount. 

The offset occurs the most with the horizontal/east-west sides; the vertical/north-south sides appear to be much closer to each other. Smaller polygons, and those with less severe angles, show a smaller offset. 

If this were a map projection issue, I would have expected other differences between the polygons. Is this a known issue? Is there a way I can compensate for the difference? 

I'm using jsts version 1.3.0, GeoJSON, and a Leaflet map, with Esri's plugin and public MapServer serving the tiles.






Thank you,
Bart

Bart P

unread,
Sep 1, 2017, 10:02:19 AM9/1/17
to JSTS devs
I was wrong. This problem is caused by using a different projection. Leaflet's default is EPSG:3857. Once I switched to EPSG:4326, the intersections work properly. 

Bart
Reply all
Reply to author
Forward
0 new messages