> I am converting an .osm file to shapefile, and there is one thing that I
> do not understand:
> What is the difference between: osm_id and osm_way_id fields (keys)?
> They are defined in osmconf.ini file, but only for [multipolygons].
> Here is an explanation from the osmconf.ini file:
> # note: for multipolygons, osm_id=yes instanciates a osm_id field for the
> id of relations
> # and a osm_way_id field for the id of closed ways. Both fields are
> exclusively set.
> Does that mean that osm_way_id will be used to represent the osm id number
> of a closed way, while osm_id will only be used for to represent the osm
> id number of relations?
> It's a bit confusing concept.
> What makes the closed ways so special so that they need to have their own
> special field (osm_way_id)?
> Why wasn't there a separate field for relations instead: like:
> osm_relation_id, while closed ways would use the osm_id.
> Thank you for the reply.
Indeed, OSM data model is a bit confusing concept. You can read about it
from https://wiki.openstreetmap.org/wiki/Elements. Simple, small polygons
are usually modeled as a one continuous, closed ring. That makes one "way"
and the ID for it is found from way_id. All the other polygons are modeled
as relations which are collections of ways and they have "relation_id" in
the data as you can see
IDs are unique only for nodes/ways/relations but not across the elements. I
do not think that renaming osm_id into relation_id (and probably osm_id of
points into node_id, or?) and osm_way_id into way_id to follow the native
model would make things very much more clear.
View this message in context:
Sent from the GDAL - Dev mailing list archive at Nabble.com.
gdal-dev mailing list