[OSM-dev] SVN rails_port questions: browse, relicensing
Frederik Ramm
frederik at remote.org
Tue Feb 3 12:52:55 GMT 2009
Hi,
Frederik Ramm wrote:
> I was looking for the source code that is behind the
> www.openstreetmap.org/browse functionality but could not find it. I'm
> not a rails expert but I think that since I cannot find anything in
> config/routes.rb, it is probably not implemented in rails, is it?
Thomas, Tom, thank you for pointing out that if one wants to participate
in an open source project one should do an "svn up" at least once every
few months ;-) it seems when I looked for the browse code, I was using a
very old copy and had not noticed.
It is indeed the case that tags with empty values, when assigned to
nodes, are not shown in the browser. Node 338604029 has an empty name
tag but it is not shown:
http://www.openstreetmap.org/browse/node/338604029
Looking deeper of course it turns out that the API doesn't return the
empty tag either:
$ wget -qO- http://www.openstreetmap.org/api/0.5/node/338604029
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.5" generator="OpenStreetMap server">
<node id="338604029" lat="59.4011917" lon="-0.8791806" user="kaerast"
visible="true" timestamp="2009-01-28T11:32:40+00:00">
<tag k="source" v="DECC"/>
<tag k="ref_no" v="7/16-1"/>
<tag k="man_made" v="petroleum_well"/>
<tag k="disused" v="yes"/>
</node>
</osm>
I only know that there is an empty name tag because I received that node
through an Osmosis-generated daily diff and/or a planet dump.
The reason for the non-display of empty tags is here:
http://trac.openstreetmap.org/browser/sites/rails_port/lib/tags.rb#L25
I guess it is not a big deal (I went looking because I thought that one
of my processing steps was somehow discarding the tag). It will lead to
inadvertent deletion of the empty name tag by anyone who makes any edit
to such a node - but then again the informational value of an empty tag
value is debatable anyway.
Also this will go away with API 0.6 where the code in tags.rb is not
used any more, so I guess rather than changing tags.rb now and probably
incurring all sorts of problems with applications that did not expect an
empty value, we better ignore the problem for the remaining six weeks.
Bye
Frederik
More information about the dev
mailing list