"Craig Hinners" <[email protected]> writes: >> > On 10/15/2010 09:44 PM, Richard Welty wrote: >> > Sans prefices, the highway=motorway where US Highway 10, Wisconsin Highway >> > 66, and Interstate Highway 39 run together would have ref=10;66;39. Not >> > very useful for determining which is which. > > This is why I keep arguing for using *non-ambiguous tag names*: the > "what" should go in the tag name, and the "which" should go in the tag > value. So, instead of the current situation where we have half a > bazillion ways with a "network" tag name, you'd have: > > network:country[US]:unitedStatesHighway = 10 > network:country[US]:state[WI] = 66 > network:country[US]:interstate = 39 > > (Or, if you're of the brevity and ambiguity trumps verbosity and clarity > camp, I give you "network:US:WI", "network:US:US", "network:US:I".) > > Point being, by making a clean separation between the "what" and the > "which", it makes it easier from the standpoint of an automated agent of > OSM data, be it a renderer or whatnot: you have a clean query on the tag > /name/ to get all routes of a certain classification (the "what"), > regardless of /which/ route number it is. > > No endless parsing of the tag value, looking for "I-" to determine > whether that way is an interstate, oh, oops, this guy doesn't like > hyphens, I need to look for "I*", oh, oops, that gets me everything for > Iowa and Idaho, oops, now my function to determine whether a way is an > interstate is 10000 lines long with 500 "if" statements and regular > expressions that would make a CS major run for the hills. > > No, none of that. Simply: if tag name = > "network:country[US]:interstate", render the AASHTO shield with the > number(s) in the tag value. Easy peesy. > > No arguing about relations, super relations, super duper relations, > relations of relations of relations of sub-relations, orphan relations, > bastard relations, divorced relations, etc. You just tag the ways with > these non-ambiguous tag names. Relations are WTFs of complete and utter > proportions.
"No endless parsing of the tag value"? No, instead we'd have endless parsing of the tag name instead. As a famous professor once told me, strings are the ultimate vehicle for hiding information. You can never tell if a string is correct without a complete string parser... it's like developing a whole new language from scratch. I'm sorry, but I don't see how this is a better solution than relations. With relations, a single well-defined first-level entity contains all the information about which ways make up a road. That entity contains its name, number, category (interstate, US highway, etc), and what-have-you. Pushing this information onto tags on each of the ways makes this information MUCH harder to find, from a querying point of view. Requiring string parsing (instead of string matching) to complete ordinary queries should not be encouraged. (IMO it's bad enough that we have name, name_1, name_2, etc.) -- Peter Budny \ Georgia Tech \ CS PhD student \ _______________________________________________ Talk-us mailing list [email protected] http://lists.openstreetmap.org/listinfo/talk-us

