worldbank / DECAT_Space2Stats

https://worldbank.github.io/DECAT_Space2Stats/
Other
1 stars 2 forks source link

Handling multiple polygons in a single request #18

Closed zacharyDez closed 2 months ago

zacharyDez commented 3 months ago

@andresfchamorro raised the possibility of submitting a post requests with multiple different aoi such as specific regions/districts within a country. He mentioned conserving the id, and properties of the geometry (aoi) in the resulting response.

@andresfchamorro was the use case specifically working from a dataframe where each row is an entity with its own geometry or was there another use case in mind?

@vincentsarago any thoughts design to support multiple polygons?

vincentsarago commented 3 months ago

@zacharyDez, I guess we will replicate what we do in titiler https://github.com/developmentseed/titiler/blob/main/src/titiler/core/titiler/core/factory.py#L471-L525

zacharyDez commented 2 months ago

Based on a discussion with @andresfchamorro and @bpstewar, we will, at least initially, let users make multiple requests for multiple polygons of interest (aoi) and figure out how to merge/manage multiple data frames on their own. This need may emerge shortly, but we are punting a lot of complexity that may be needed. For example, how should we manage polygons that overlap and return duplicate h3 identifiers?

zacharyDez commented 2 months ago

@bpstewar @andresfchamorro; should we re-open this issue per your last comment via email? We could rename it to support multiple polygons, which could be done with an example of how to make multiple requests or potentially re-evaluating adding the support directly to the API.