<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 5, 2011, at 7:14 AM, Craig Hinners wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div style="color: rgb(0, 0, 0); " mce_style="color: #000000; "><span class="Apple-style-span" style="font-size: 11px;" mce_fixed="1" mce_style="font-size: 11px;"><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt; " mce_style="font-family: arial, helvetica, sans-serif; font-size: 10pt;">Sure, relations get you an additional degree of normalization. And using relations to carry route/network tags gets the job done, granted. But at what cost?</span></span></div><div style="color: rgb(0, 0, 0); " mce_style="color: #000000; "><span class="Apple-style-span" style="font-size: 11px;" mce_fixed="1" mce_style="font-size: 11px;"><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt; " mce_style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></span></span></div><div style="color: rgb(0, 0, 0); " mce_style="color: #000000; "><span class="Apple-style-span" style="font-size: 11px;" mce_fixed="1" mce_style="font-size: 11px;"><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt; " mce_style="font-family: arial, helvetica, sans-serif; font-size: 10pt;">I've yet to hear a convincing argument that justifies the additional complexity of relations as they are being championed as carriers of route/network tags, nor have I heard why applying tags with highly-specific keys directly to ways is so fundamentally flawed that it warrants the added complexity of relations.</span></span></div><div style="color: rgb(0, 0, 0); " mce_style="color: #000000; "><span class="Apple-style-span" style="font-size: 11px;" mce_fixed="1" mce_style="font-size: 11px;"><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt; " mce_style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></span></span></div><div mce_style="color: #000000; "><span mce_style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">As if to prove my point, the whole reason this thread even exists (if my understanding is correct) is that those who are trying to import data from other GIS formats (Shapefiles) are being stymied by the fact that the tags-to-relations-to-ways model turns a non-trivial task into a head scratcher.</font></span></div></span></div></blockquote><div><br></div><div><div>Shapefiles are a lowest common denominator interchange format, not something we should strive to have our database equivalent to. If you want to express the cycleway network as a shapefile your best bet would be to use overlapping geometries, one for each relation. That's the way the database that renders the slippymap works, but it's not a good enough representation to do shields properly.</div><div><br></div><div>If your trying to get this data into general purpose GIS software, you could use a PostGIS or SpatiaLite database as your backend instead of shapefiles. I don't have experience with the Arc tools, but all the open source GIS software will allow you to generate layers from an SQL query, which should allow you to display relations.</div></div><br><blockquote type="cite"><div><span style="font-family: Verdana; color: rgb(0, 0, 0); font-size: 10pt; "></span></div></blockquote><blockquote type="cite"><div><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div mce_style="color: #000000; "><span mce_style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">So, what this tells me is that, while insistence on a one-relation-per-logical-route methodology results in a normalized, one-to-many schema, it creates an artificial barrier for those seeking to add data to OSM. I, for one, will gladly accept the tradeoff of not being able to trumpet the fact that my dataset is "normalized" in return for lowering the barrier for others to enrich the map.</font></span></div><div style="color: rgb(0, 0, 0); " mce_style="color: #000000; "><span class="Apple-style-span" style="font-size: 11px; " mce_fixed="1" mce_style="font-size: 11px;"><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt; " mce_style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></span></span></div><div style="color: rgb(0, 0, 0); " mce_style="color: #000000; "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">If I had my way, I'd tell these people to forget about relations and simply tag the ways that comprise the cycleways with tags like <u>cycleway:oregon=3A</u>, <u>cycleway:oregon=9</u>, <u>cycleway:oregon=Sunset Ridge Trail</u>, etc., and be done with it. (I have no clue whether those are legitimate route numbers/names for cycleways in Oregon; I'm just using them to illustrate a point.)</font></div><div style="color: rgb(0, 0, 0); " mce_style="color: #000000; "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div style="color: rgb(0, 0, 0); " mce_style="color: #000000; "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">And, unlike the current situation of keys-that-aren't-really-keys, <u>cycleway:oregon</u> represents one concept, and one concept only: cycleways in Oregon. Unlike, say, a "ref" tag, you won't find it on cycleways in Ohio, or highways in Ottawa, or bus routes in Oslo, or oil pipelines in Oman. Want a map of the Oregon cycleway network? Hello OSM API, give me all the ways with <a href="http://tag.key/">tag.key</a>==<u>cycleway:oregon</u>. Want to render the Oregon cycleway shield? Do so if the <a href="http://tag.key/">tag.key</a>==<u>cycleway:oregon</u> and put the <a href="http://tag.value/">tag.value</a> in the shield. No parsing...no additional DB JOINs...no collisions with other tags on the same way.</font></div></span></div></blockquote><div><br></div>This example still can't handle ways that are part of more than one route (e.g. situations like the I-580, I-80 overlap are actually fairly common).</div><div><br><blockquote type="cite">  _______________________________________________<br>Talk-us mailing list<br><a href="mailto:Talk-us@openstreetmap.org">Talk-us@openstreetmap.org</a><br>http://lists.openstreetmap.org/listinfo/talk-us<br></blockquote></div><br></body></html>