[FLAG-1252] Use Data API Geostore Endpoints #4930
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
There are currently two geostore services at WRI. One is managed within ResourceWatch and the other within the Data API.
Data Lab’s strategic vision is to merge the two and have one single service managed solely by the Data API.
Because the GADM 4.1 administrative boundary geostores will be stored within the Data API, Flagship should update its geostore client from ResourceWatch to the Data API.
Scope
The Data API implements the endpoint interface that Flagship currently uses, so only a slight modification to the URL used will be necessary.
Implementation Details
Where Flagship makes calls like: https://api.resourcewatch.org/v2/geostore/...
It uses the Data API instead: https://data-api.globalforestwatch.org/geostore/...
The current gadm feature branch currently has a Data API method in geostore.js. Since the ResourceWatch and Data API interface will be the same, the complicated dataset query logic will no longer be needed.
What About My Custom Geostores Managed within the ResourceWatch Geostore microservice?
The Data API transition will be gradual, starting with administrative boundaries. Data API Geostore service requests will proxy to ResourceWatch for any custom boundary request or other part of the existing interface. This will make our transition seamless for Flagship.