Skip to content

Reconstructing way–node incidence from oe_get() output — is there a better way? #323

Description

@gustavo-tm

Hi — first, thanks for the package, it's been really useful.

I'm working on a road safety project where I need the way-node incidence relation.

As far as I can tell this relation isn't available directly from oe_get(), since the OSM driver reconstructs geometries and doesn't keep node references. So I've been rebuilding it by exploding the linestrings into vertices and matching those coordinates against the points layer.

The part I'm unsure about is that this only works if I round the coordinates to 7 decimal places before joining — on raw doubles the match fails for a lot of nodes. So in practice I'm snapping and rebuilding the geometries before the join, which feels like something I probably shouldn't need to do. Rounding to 7 dp seems to line up with OSM's native storage precision, so maybe that's the right thing, but I'm not confident.

Is coordinate matching the intended approach here, or is there a supported way to get node references that I've missed?

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