forestdatapartnership / whisp-app

3 stars 5 forks source link

add a connector entry point to the API #5

Open 12rambau opened 5 months ago

12rambau commented 5 months ago

tagging @lecrabe for visibility

As mentioned during the latest Innovate task force meeting I think the API could vastly benefit from accepting what I called connectors for geometry inputs.

In this issue I will try explain myself and propose some potential technical solutions

Context

Currently the Whisp API only supports the data coming from either EarthEngine assets or IDs from Aggstack registry. That’s too narrow to math the complexity of the market. PlanetLab is building a fied detector, Varda has build a field registry, My company has its own farm registry and we would al ideally connect to WHISP API.

It will be impossible for the team to follow up with the number of potential services to aggregate. Instead I propose that the WHISP API make a sandbox “connector” that can be used by anyone to plug its tool.

The best example I know is the world leader of sports statistics: Strava. This online service gather data from any sports device and provide insight on the athlete performances. A new hardware that want to exist on the market will thus use the sandbox to create a connector to the service, leading to the following page were ll the existing hardware manufacturer are listed:

image

WHISP tailored solution

API entry

I think the easiest way to proceed is to create a new entry point ot WHISP as: URL: //

Then you create a curated list of accepted connector and leave to the developer of platform to code a connector in our repository. From Whisp side the exchange could be the following:

  1. From the API call, generate a API call back to the plot provider e.g. http://varda.com.api/whisp/getfield/xxxyyyyy
  2. This API always returns a .geojson as defined in the documentation (and I think nothing more than ID and geometry is needed
  3. Transform the geometry into a feature collection using interactive GEE API
  4. And kaboum you are back in the /geojson API call

From the connector side

If I am a platform, I have 2 things to do, expose the data through a whisp compatible API and from the whisp repository create the connection code (i.e. how to transform the WHISP API call into a Varda API call)

Extra issue that should raise in the future

The API calls to the connector should be able to embed extra options to send credentials for private services. But that would deserve a dedicated follow-up issue when I’l try to connect Whisp to the LDC system.

Happy to read your comments