User:Zverik/Survey XML

From OpenStreetMap Wiki
Jump to: navigation, search

There is no file format for storing survey data. This one should be such format. It's not GPX and not a GPX Extension, since surveyed log 1) cannot be mapped 1:1 to a track; 2) can, and should, be stored separately.


<?xml version="1.0" encoding="utf-8" ?>
  <point time="2000-03-04T23:00:00.01+03:00" direction="left">
    <position lat="59.99" lon="30.12" head="34" />
    <text>This is a sample checkpoint</text>
  <point time="2000-03-04T23:02:11.74+03:00">
    <tag k="highway" v="milestone" />
  <point time="2000-03-04T23:18:55.23+03:00">
    <attachment type="image/jpeg">photo0004.jpg</attachment>

A survey log is a list of points. Every point must have a timestamp. Preferably with fractional seconds. Not neccessary in an order. A point can have:

  1. Position: latitude, longitude (WGS-84) and heading (degrees, see Key:direction). Heading is very important, since it allows to distinguish left from right.
  2. Direction: left, right, ahead, behind.
  3. Description (text): any kind of string, the description of a place. May often be used as a value for name tag (but not in survey data).
  4. Any number of tags: may be compatible with OSM schema, but it is not mandatory. Descriptions and names should not be put here, but in <text> tag instead.
  5. Attachments: photos, audio records and videos. Any kind of file could be an attachment, but not all viewers can open them. Paths are relative to the survey file.


Possible cases this format will contain:

  • shop to the right, name ..., opening hours ...
  • road junction, left, asphalt, 2 lanes
  • speed limit 60 only on weekdays
  • a house with post office and atm on the right