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

Geometry collections of points can't be read by QGIS #6

Open
marklit opened this issue Feb 14, 2024 · 0 comments
Open

Geometry collections of points can't be read by QGIS #6

marklit opened this issue Feb 14, 2024 · 0 comments
Assignees

Comments

@marklit
Copy link
Owner

marklit commented Feb 14, 2024

Consider turning these into individual point records. Use a flag so this conversion isn't the default behavior.

$ python ~/osm_split/main.py \
        sweden-latest.osm.pbf \
        --geom-type=other_relations \
        --only-h3=820897fffffffff \
        --polygon-buildings
select * from st_read('other_relations/enforcement.gpkg') limit 1;
┌─────────────┬──────────┬─────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┐
│ enforcement │ maxspeed │    type     │                                              geom                                              │
│   varchar   │ varchar  │   varchar   │                                            geometry                                            │
├─────────────┼──────────┼─────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┤
│ maxspeed    │ 80       │ enforcement │ GEOMETRYCOLLECTION (POINT (16.4761211 57.7223264), POINT (16.4720156 57.7223297), POINT (16.…  │
└─────────────┴──────────┴─────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┘

There are some edge cases like this one where both ends of the bridge are marked with points. Figure out if there is a way to detect these and convert them into sensible geometry.

select * from st_read('other_relations/bridge.gpkg') limit 1;
┌─────────┬──────────────────────────────────────────────────────────────────────────────────┐
│  type   │                                       geom                                       │
│ varchar │                                     geometry                                     │
├─────────┼──────────────────────────────────────────────────────────────────────────────────┤
│ bridge  │ GEOMETRYCOLLECTION (POINT (16.503222 57.7692159), POINT (16.5032595 57.7691777)) │
└─────────┴──────────────────────────────────────────────────────────────────────────────────┘
@marklit marklit self-assigned this Feb 28, 2024
marklit added a commit that referenced this issue Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant