0

I'm parsing an OSM file using the Python package osmread. The entities parsed have the following attributes id, version, changeset, timestamp, uid, and tags.

On the other hand, I have a shapefile, and I use the Python package pyshp to read it. I then get the following fields from this (road) shapefile:

    [('DeletionFlag', 'C', 1, 0),
    ['osm_id', 'N', 11, 0],
    ['name', 'C', 48, 0],
    ['ref', 'C', 16, 0],
    ['type', 'C', 16, 0],
    ['oneway', 'N', 1, 0],
    ['bridge', 'N', 1, 0],
    ['tunnel', 'N', 1, 0],
    ['maxspeed', 'N', 3, 0]]

My question is, if the road shapefile was obtained from the OSM file, which of the two attributes, id or uid, in the OSM file corresponds to the osm_id field in the shapefile?

1 Answer 1

2

The id attribute and not the uid attribute of the OSM file corresponds to the osm_id in the shapefile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.