GeoTIFF / geoblaze

Blazing Fast JavaScript Raster Processing Engine
http://geoblaze.io
MIT License
181 stars 28 forks source link

A multipolygon and 2 single polygons give differing results #212

Closed avmey closed 1 year ago

avmey commented 1 year ago

Describe the bug A multipolygon which has two polygons with a shared edge results in a different output than if the two polygons are fed to geoblaze separately.

To Reproduce Using a valid geometry, input the following features and compare output. {"type":"Feature","geometry":{"type":"MultiPolygon","coordinates": [[[[-180,-18], [-178,-18], [-178,-20], [-180,-20], [-180,-18]]], [[[180,-20], [178,-20], [178,-18], [180,-18], [180,-20]]]]}, "properties":{}} && {"geometry":{"type":"Polygon","coordinates": [[[180,-20], [178,-20], [178,-18], [180,-18], [180,-20]]]}} {"geometry":{"type":"Polygon","coordinates": [[[-180,-18], [-178,-18], [-178,-20], [-180,-20], [-180,-18]]]}}

Expected behavior Output to be identical

Screenshot 2023-07-11 at 1 27 40 PM
DanielJDufour commented 1 year ago

I have confirmed this bug. Will need to investigate. My hunch is that it has to do with the antimeridian. Thanks for catching it!

DanielJDufour commented 1 year ago

This should be fixed now with the most recent version of GeoBlaze