[OSM-talk] Names, split streets and relations
henry at loenwind.info
Mon Jul 28 02:00:48 BST 2008
Gervase Markham wrote:
> Indeed. My question is: can they? :-)
> (The opposite problem is the very long road which is a single way. The
> name should regularly repeat, but I don't think it does on either Mapnik
> or Osmarender.)
I have proof-of-concept code for Osmarender (or to be more correct: for
any renderer that reads osm files) that does exactly those two things.
The concept I implemented splits each way into 3 parts:
(1) The original ways without name or ref.
(2) A way with only the name, split into same-sized parts of a
configurable maximum length.
(3) A number of nodes with only the ref-tag, distributed evenly with a
configurable maximum distance along the way.
Example, rendered with Kosmos: http://j-e-b.no-ip.com:8080/p/map.jpg
Code, Perl: http://j-e-b.no-ip.com:8080/p/cwc.pl
Note: The code will output a new osm file containing the original data
and new ways tagged with "nameway=(any highway type)" and "name=*", and
new nodes tagged with "refway=(any highway type)" and "ref=*". So you
need to adapt your rendering rules to (a) not render names for
highway=*, (b) render names for nameway=*, (c) render little boxes for
Also: DO NOT UPLOAD THE RESULT FILE TO THE SERVER!!!
PS: The list of supported highway types has not been updated since early
More information about the talk