[OSM-dev] Planet.osm missing visible attribute?

Jon Burgess jburgess777 at googlemail.com
Fri Aug 1 21:28:22 BST 2008

On Fri, 2008-08-01 at 13:03 -0700, Karl Newman wrote:
> 2008/8/1 Ian Dees <ian.dees at gmail.com>
>         Hi everyone,
>         I'm toying with manipulating the planet.osm file, and noticed
>         that my SAX parser is not giving me hits on the "visible"
>         attribute (at least for nodes). Is there a default value for
>         the visible attribute that I should assume when the value
>         isn't there?
>         -Ian
> I'm pretty sure *only* the visible/active elements make it to
> planet.osm, and the attribute is omitted because it would be
> redundant. It seems likely the Protocol Specification on the Wiki is
> incorrect in showing the visible attribute. Maybe that attribute is
> used on upload, though; I don't know (seems unlikely, though).

It is relevant in some osm files. The most common example is the data
returned from the /history API which shows when an object was deleted:

$ wget -q -O /dev/stdout http://api.openstreetmap.org/api/0.5/node/234568/history
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.5" generator="OpenStreetMap server">
  <node id="234568" lat="38.8853511" lon="-77.0606329" user="tscofield" visible="true" timestamp="2005-11-04T02:22:36+00:00"/>
  <node id="234568" lat="38.8853511" lon="-77.0606329" user="PeterIto" visible="false" timestamp="2008-05-04T04:45:56+01:00"/>

If it is not present then it is safe to assume a default value of true.


More information about the dev mailing list