WorldCereal / ewoc_rdm_api

Backend APIs for Reference Data Module, used by website and other modules
MIT License
0 stars 0 forks source link

RDM: add H3 index #4

Closed jdries closed 5 months ago

jdries commented 6 months ago

For each sample in the RDM, add the level 5 H3 index of the centroid of the sample.

This can be achieved in different technology stacks. For instance, in postgres: https://github.com/zachasme/h3-pg SELECT h3_lat_lng_to_cell(POINT('37.3615593,-122.0553238'), 5)

or in Python: https://uber.github.io/h3-py/intro.html#usage h3.latlng_to_cell(lat, lng, resolution)

or other options: https://h3geo.org/docs/community/bindings

This is to support both stratification and job splitting use cases.

jdries commented 5 months ago

index added