Skip to content

Incorrect geometry for large relations in geoparquet exports #12

@utkarshkukreti

Description

@utkarshkukreti

In the current geoparquet exports, the geometry column of some large relations is set to its bounding box. For example, for France (osm_id = 2202162):

D .mode line
D select bbox, ST_GeomFromWKB(geometry) from '2026-01-19.parquet' where osm_id = 2202162;
                    bbox = {'xmin': -178.3873749, 'ymin': -50.2187168, 'xmax': 172.3057152, 'ymax': 51.3055721}
st_geomfromwkb(geometry) = POLYGON ((-178.3873749 -50.2187168, -178.3873749 51.3055721, 172.3057152 51.3055721, 172.3057152 -50.2187168, -178.3873749 -50.2187168))

ohsome-planet's README says:

For relations that consist of more than 500 members we skip MultiPolygon geometry building and fall back to GeometryCollection. Check MEMBERS_THRESHOLD in ohsome-contributions/src/main/java/org/heigit/ohsome/contributions/contrib/ContributionGeometry.java.

which might be the reason for this.

The value of MEMBERS_THRESHOLD is hardcoded in that file so I'm not sure if there's a way to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions