MAAP-Project / Community

Issue for MAAP (Zenhub)
2 stars 1 forks source link

Implement 3D tiles capability into MAAP API #148

Closed gchang closed 3 years ago

gchang commented 3 years ago

Need to update the MAAP API to support the 3D tiles endpoints. Will need to work with @abarciauskas-bgse to understand what needs to be done.

gchang commented 3 years ago

I envision this to be another passthrough to CMR

abarciauskas-bgse commented 3 years ago

Thanks for tagging @gchang - we are still working through the automated API gateway deployment and integration with MAAP API but here's some intermediate progress that could help:

Will update this ticket once we have our API gateway deployment operational.

abarciauskas-bgse commented 3 years ago

There are 2 endpoints currently deployed which need to go behind a parameterized http://api.maap-project.org/3d-tiles:

My current thinking is that the API will accept requests of the form:

so we probably want configuration options for the api gateway

maap_data_system_services_api_base=https://jnz40d89g6.execute-api.us-east-1.amazonaws.com/test
maap_data_system_files_path=file-staging/nasa-map

And the api code could be a simple pass through using those configuration values - does that make sense @bsatoriu ?

bsatoriu commented 3 years ago

@abarciauskas-bgse this new endpoint is now up and running on our dev server:

https://api.maap.xyz/api/3d-tiles/ATL08_ARD-beta___001/afrisar/ept/ept-tileset/tileset.json https://api.maap.xyz/api/3d-tiles/ATL08_ARD-beta___001/peru/ept/ept-tileset/tileset.json

abarciauskas-bgse commented 3 years ago

Thanks @bsatoriu that's awesome!

A few follow up questions:

I'm getting the following error:

Access to XMLHttpRequest at 'https://api.maap.xyz/api/3d-tiles/ATL08_ARD-beta___001/afrisar/ept/ept-tileset/tileset.json' from origin 'http://cesium.entwine.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

This is a working example: http://cesium.entwine.io/?url=https://jnz40d89g6.execute-api.us-east-1.amazonaws.com/test/file-staging/nasa-map/ATL08_ARD-beta___001/afrisar/ept/ept-tileset/tileset.json

Is it possible to change the CORS policy / header for the API?

gchang commented 3 years ago

@mayadebellis is looking at the 3d tiles integration with CMC. Having the example will help!

bsatoriu commented 3 years ago

@abarciauskas-bgse I opened up the CORS policy for the new endpoint. Looks like we have tiles now: http://cesium.entwine.io/?url=https://api.maap.xyz/api/3d-tiles/ATL08_ARD-beta___001/afrisar/ept/ept-tileset/tileset.json

abarciauskas-bgse commented 3 years ago

Super updates thanks @bsatoriu @gchang @mayadebellis !

oddes commented 3 years ago

Tiles are loading as expected.