Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove multipolygons / relations from OSM data extract during project creation #1801

Open
spwoodcock opened this issue Sep 23, 2024 · 0 comments
Labels
backend Related to backend code bug Something isn't working effort:low Likely a few hours priority:high Should be addressed as a priority

Comments

@spwoodcock
Copy link
Member

spwoodcock commented Sep 23, 2024

Describe the bug

  • Often we have a set of polygons in OSM that are linked together with a relation element.
  • E.g. here we have a few adjacent polygons that in the real world represent an apartment building with multiple internal units that share walls, but all have separate entrances and no internal passages between units.
    image (1)
  • Each Polygon is a separate geometry when extracted from raw-data-api, but the overarching relation (i.e. the entire apartment building) is represented as a MultiPolygon in the extract too.
  • As a result we have overlapping geometries: this causes issues in ODK Collect when we try to select a geometry to map, as the MultiPolygon might overlay the individual polygons, meaning we can't select them.

Possible solutions

  • Option 1: omit the multipolygons within the raw-data-api config. This is probably possible with some configuration in the YAML (preferred, as this would mean the flatgeobuf extract only contains what we need).
  • Option 2: strip out the MultiPolygon geometries from the data extract prior to creating the ODK Entities, to prevent mapping the MultiPolygon relation.

Screenshots

The issue shown in ODK Collect:

Screenshot_20240920-180227

Additional context

  • This was a problem discovered during a mapping campaign.
  • The relation information is useful in the general context of OSM, to link multiple geometries together. We just don't need it for mapping.
  • I think the rendering order of the geom in ODK Collect is random, meaning we can't know if the MultiPolygon will be on top of the Polygons or not.
@spwoodcock spwoodcock added bug Something isn't working priority:high Should be addressed as a priority backend Related to backend code effort:low Likely a few hours labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code bug Something isn't working effort:low Likely a few hours priority:high Should be addressed as a priority
Projects
Development

No branches or pull requests

1 participant