stac-utils / stac-layer

Visualize a STAC Item or Collection on a Leaflet Map
Creative Commons Zero v1.0 Universal
47 stars 11 forks source link

Antimeridian issues #26

Closed m-mohr closed 1 year ago

m-mohr commented 2 years ago

It seems stac-layers has issues with showing bboxes that wrap the antimeridian, e.g. http://localhost:8080/external/planetarycomputer.microsoft.com/api/stac/v1/collections/gap http://localhost:8080/external/planetarycomputer.microsoft.com/api/stac/v1/collections/gnatsgo-rasters

It could be solved by using https://github.com/briannaAndCo/Leaflet.Antimeridian

m-mohr commented 1 year ago

Fixed in the stac-js branch

jlaura commented 1 year ago

I am seeing errors here in stac-browser rendering multipolygon footprints and wonder if this isn't being caused by the reprojection I am having to do from the 0-360 lontigude domain ot a -180 to 180 longitude domain?

It is hard to debug in the minified js. Error that I think is causing the footprint not to render is: 'TypeError: t is undefined'

m-mohr commented 1 year ago

Still exists in STAC Browsers latest version: https://radiantearth.github.io/stac-browser/#/external/stac.astrogeology.usgs.gov/api/collections/mo_themis_controlled_observations_test/items/I54323010RDR?.language=en

Seems to be an issue in stac-layer, I'll have to check there.

m-mohr commented 1 year ago

Is this how it should look like, @jlaura?

grafik

If yes, it's fixed in the stac-layer dev version that is built on top of stac-js, but it will only appear in STAC Browser v3.1 or later unfortunately.

I added an example to the test suite for it: https://github.com/stac-utils/stac-layer/commit/66ea47c8e31a156f98f845cddd7d5072db6d2cc3

jlaura commented 1 year ago

Absolutely! Huge thank you and glad the data could be of help. 🚀