<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1480613000241_52464" dir="ltr"><span id="yui_3_16_0_ym19_1_1480613000241_55710">Hi </span><span id="yui_3_16_0_ym19_1_1480613000241_55711">Jukka,</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_55712"><span id="yui_3_16_0_ym19_1_1480613000241_55711"><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_55707"><span id="yui_3_16_0_ym19_1_1480613000241_53149">As always thank you for the useful share of knowledge!!<br></span></div><blockquote id="yui_3_16_0_ym19_1_1480613000241_53294"><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_53271"><span id="yui_3_16_0_ym19_1_1480613000241_52599"><font id="yui_3_16_0_ym19_1_1480613000241_53433" color="#808080">> IDs are unique only for nodes/ways/relations but not across the elements. I<br id="yui_3_16_0_ym19_1_1480613000241_53282">do not think that renaming osm_id into relation_id (and probably osm_id of<br id="yui_3_16_0_ym19_1_1480613000241_53283">points into node_id, or?) and osm_way_id into way_id to follow the native<br id="yui_3_16_0_ym19_1_1480613000241_53284">model would make things very much more clear.</font><br></span></div></blockquote><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_53196"><span id="yui_3_16_0_ym19_1_1480613000241_52599">I was only questioning why can't "osm_way_id" be renamed to "osm_relation_id". The "osm_id" would remain the same.<br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_53479"><span id="yui_3_16_0_ym19_1_1480613000241_52599">Of course I am not a developer, I was just thinking out loud, and hopping that somebody might explain to me, why is there the "osm_way_id" key.<br>I could totally be wrong.<br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_53206"><span id="yui_3_16_0_ym19_1_1480613000241_52599"><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_53457"><span id="yui_3_16_0_ym19_1_1480613000241_52599">All three examples you've sent me:<br></span></div><blockquote id="yui_3_16_0_ym19_1_1480613000241_52698"><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_52697"><span id="yui_3_16_0_ym19_1_1480613000241_52599">http://www.openstreetmap.org/api/0.6/node/389960161<br id="yui_3_16_0_ym19_1_1480613000241_52709">http://www.openstreetmap.org/api/0.6/way/34028339 http://www.openstreetmap.org/api/0.6/relation/125519<br></span></div></blockquote><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_52882"><span id="yui_3_16_0_ym19_1_1480613000241_52599">Show the id of three different elements:</span><span id="yui_3_16_0_ym19_1_1480613000241_52599"> An id of a node, of a way, and of a relation.<br><br>What makes it confusing (at least to me) is why did developers of the GDAL OSM driver decided to use a separate key(field) to depict the closed ways?<br><br>I understand that and ESRI shapefile can not differentiate between a closed way and a relation (for example: a relation consisted of two closed ways). So they had to "group" both closed ways and relation into a single shapefile geometry type (multi)polygons/polylines. But still, if they wanted to differentiate between these two elements, it's more logical (at least to me) that a relation should have gotten a separate key(field), instead of a close way. A relation is higher in the hierarchy of OSM elements, and can contain different elements (a node and a way, three ways, fours nodes...).<br><br>I am just thinking out loud, nothing more.</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_53629">I can definitively be wrong, and I am eager to learn more about the OSM in general.<br><span id="yui_3_16_0_ym19_1_1480613000241_52599"></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_55686"><span id="yui_3_16_0_ym19_1_1480613000241_52599"><br></span></div><div id="yui_3_16_0_ym19_1_1480613000241_52509"><span></span></div> <div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1480613000241_52463"><br>----------------------------<br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1480613000241_52451" style="display: block;"> <div style="font-family: verdana, helvetica, sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1480613000241_52450"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1480613000241_52449"> <div dir="ltr" id="yui_3_16_0_ym19_1_1480613000241_52452"><font id="yui_3_16_0_ym19_1_1480613000241_53011" size="2" face="Arial"> On Thursday, December 1, 2016 11:03 PM, jratike80 <jukka.rahkonen@maanmittauslaitos.fi> wrote:<br></font></div>  <br><br> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1480613000241_52448">georges wrote<br clear="none">> Hello,<br clear="none">> I am converting an .osm file to shapefile, and there is one thing that I<br clear="none">> do not understand:<br clear="none">> <br clear="none">> What is the difference between: osm_id and osm_way_id fields (keys)?<br clear="none">> <br clear="none">> They are defined in osmconf.ini file, but only for [multipolygons].<br clear="none">> Here is an explanation from the osmconf.ini file:<br clear="none">> <br clear="none">> # note: for multipolygons, osm_id=yes instanciates a osm_id field for the<br clear="none">> id of relations<br clear="none">> # and a osm_way_id field for the id of closed ways. Both fields are<br clear="none">> exclusively set.<br clear="none">> Does that mean that osm_way_id will be used to represent the osm id number<br clear="none">> of a closed way, while osm_id will only be used for to represent the osm<br clear="none">> id number of relations?<br clear="none">> <br clear="none">> It's a bit confusing concept.<br clear="none">> <br clear="none">> What makes the closed ways so special so that they need to have their own<br clear="none">> special field (osm_way_id)?<br clear="none">> Why wasn't there a separate field for relations instead: like:<br clear="none">> osm_relation_id, while closed ways would use the osm_id.<br clear="none">> <br clear="none">> Thank you for the reply.<br clear="none"><br clear="none">Indeed, OSM data model is a bit confusing concept. You can read about it<br clear="none">from <a shape="rect" href="https://wiki.openstreetmap.org/wiki/Elements." target="_blank">https://wiki.openstreetmap.org/wiki/Elements. </a>Simple, small polygons<br clear="none">are usually modeled as a one continuous, closed ring. That makes one "way"<br clear="none">and the ID for it is found from way_id. All the other polygons are modeled<br clear="none">as relations which are collections of ways and they have "relation_id" in<br clear="none">the data as you can see<br clear="none"><br clear="none">node_id <a shape="rect" href="http://www.openstreetmap.org/api/0.6/node/389960161" target="_blank" id="yui_3_16_0_ym19_1_1480613000241_52453">http://www.openstreetmap.org/api/0.6/node/389960161</a><br clear="none">way_id  <a shape="rect" href="http://www.openstreetmap.org/api/0.6/way/34028339" target="_blank" id="yui_3_16_0_ym19_1_1480613000241_52454">http://www.openstreetmap.org/api/0.6/way/34028339</a><div class="yqt7315131534" id="yqtfd62353"><br clear="none">relation_id </div><a shape="rect" href="http://www.openstreetmap.org/api/0.6/relation/125519" target="_blank" id="yui_3_16_0_ym19_1_1480613000241_53691">http://www.openstreetmap.org/api/0.6/relation/125519</a><br clear="none"><br clear="none">IDs are unique only for nodes/ways/relations but not across the elements. I<br clear="none">do not think that renaming osm_id into relation_id (and probably osm_id of<br clear="none">points into node_id, or?) and osm_way_id into way_id to follow the native<br clear="none">model would make things very much more clear.<br clear="none"><br clear="none">-Jukka Rahkonen-<br clear="none"><br clear="none">--<br clear="none">View this message in context: <a shape="rect" href="http://osgeo-org.1560.x6.nabble.com/gdal-dev-osm-id-vs-osm-way-id-tp5298287p5298304.html" target="_blank" id="yui_3_16_0_ym19_1_1480613000241_52460">http://osgeo-org.1560.x6.nabble.com/gdal-dev-osm-id-vs-osm-way-id-tp5298287p5298304.html</a><br clear="none">Sent from the GDAL - Dev mailing list archive at Nabble.com.<br clear="none">_______________________________________________<br clear="none">gdal-dev mailing list<br clear="none"><a shape="rect" ymailto="mailto:gdal-dev@lists.osgeo.org" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br clear="none"><a shape="rect" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br><br></div>  </div> </div>  </div></div></body></html>