Permanent ID: Unterschied zwischen den Versionen

Aus Geometa Lab OST
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
KKeine Bearbeitungszusammenfassung
Zeile 5: Zeile 5:
The goal is to get an opaque fixed length ASCII string. And that are the design considerations:
The goal is to get an opaque fixed length ASCII string. And that are the design considerations:


* The OSM id alone is not stable enough (as probably most agree; see (*)); and it can represent many concepts (and that's by design in OSM).
* The OSM id alone is not stable enough (as probably most agree); and it can represent many concepts (and that's by design in OSM).
* The version no. of the object is needed which makes clear which tags are (or have been) referred to.
* The version no. of the object is needed which makes clear which tags are (or have been) referred to.
* Coordinates are needed, because a change of the geometry does not increment the version number.
* Coordinates are needed, because a change of the geometry does not increment the version number.


So a stable Permanent-ID could have the following form (which leads to a fixed length string of 34 chars):
So a stable Permanent ID could have the following form (which leads to a fixed length string of 35 chars in total):


   [N|W|R]<osm_id>#<version>[+|-]<lon>[+|-]<lat>
   [N|W|R]<osm_id>#<version>[+|-]<lon>[+|-]<lat>


where:
where:
* N,W,R stands for Node, Way, or Relation.
* osm_id is left-padded with zeros to get 10 chars ("digits"),  
* osm_id is left-padded with zeros to get 10 chars ("digits"),  
* version is 4 zero-padded digits
* version is 4 zero-padded digits
Zeile 20: Zeile 21:
Example: "Schloss Kyburg" (Castle Kyburg) has relation 1169711,
Example: "Schloss Kyburg" (Castle Kyburg) has relation 1169711,
version #5 at coordinates 47.4584, 8.74343 which becomes following
version #5 at coordinates 47.4584, 8.74343 which becomes following
Permanent-ID:
Permanent ID:


   R0001169711#0005+47.45840+008.74343
   R0001169711#0005+47.45840+008.74343

Version vom 4. April 2019, 21:25 Uhr

This is an unofficial proposal for a "permanent ID" for OpenStreetMap (OSM).

See https://wiki.openstreetmap.org/wiki/Permanent_ID for a more official state of discussions.

The goal is to get an opaque fixed length ASCII string. And that are the design considerations:

  • The OSM id alone is not stable enough (as probably most agree); and it can represent many concepts (and that's by design in OSM).
  • The version no. of the object is needed which makes clear which tags are (or have been) referred to.
  • Coordinates are needed, because a change of the geometry does not increment the version number.

So a stable Permanent ID could have the following form (which leads to a fixed length string of 35 chars in total):

 [N|W|R]<osm_id>#<version>[+|-]<lon>[+|-]<lat>

where:

  • N,W,R stands for Node, Way, or Relation.
  • osm_id is left-padded with zeros to get 10 chars ("digits"),
  • version is 4 zero-padded digits
  • coordinates have 5 fixed decimal places (lat is 2 and lon is 3 decimal places, both signed and left-padded with zeros).

Example: "Schloss Kyburg" (Castle Kyburg) has relation 1169711, version #5 at coordinates 47.4584, 8.74343 which becomes following Permanent ID:

 R0001169711#0005+47.45840+008.74343