[OSM-dev] JSON-output for xapi

Dario Brandes dalino at spline.de
Thu Jun 16 17:04:28 BST 2011


Hello everyone,

we from the xappy.js Team want talk with you about a JSON Standard for
osm. The GeoJSON Format is inapt to safe relations and so we created
something new.
Here the link to our wikipage:
https://github.com/slomo/osm-spline-xapi/wiki/JSON-Output

We would like to hear your comments about our proposal.

Regards Dario    



# JSON output format definition by example.

**Note:** for simple reading we included whitespaces which are of
course omitted in the actual implementation.

## skeleton
    {
        "version": 0.6,
        "generator": "xappy.js",
        "xapi": {
             "uri": "XXX",
             "planetDate": 201106161601,
             "copyright": "XXX",
             "instance": "XXX"
         },
        "elements": [
            ...
            ...
            ...
        ]
    }

where the `elements` array obviously contains all the elements.

## node
    {
        "type": "node",
        "id": 3596186,
        "lat": 53.4633699598014,
        "lon": -2.22667910006381,
        "timestamp": "2007-06-21T17:10:58+01:00",
        "version": 2,
        "changeset": 2213,
        "tags": [
            "amenity": "hospital",
            "name": "Manchester Royal Infirmary"
        ]
    }

## way
    {
         "type": "way",
         "id": 4958218, 
         "version": 3, 
         "timestamp": "2007-07-25T01:55:35+01:00", 
         "changeset": 2211,
         "nodes": [
             218963,
             331193
         ],
         "tags":[
             "landuse": "residential",
             "source": "landsat"
         ]
     }

## relation
    {
        "type": "relation",
        "id": 2670,
        "timestamp": "2007-10-25T03:05:34Z",
        "version": 32, 
        "changeset": 2211,
        "members": [
            {
                "type":"way", 
                "ref":3992472, 
                "role": ""
            },
            {
                "type":"way", 
                "ref":3992524, 
                "role": ""
            }
        ...
      ],
        "tags":[
            "name": "Fonnereau Way",
            "network": "Ipswich foothpaths",
            "type": "route"
        ]
    }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110616/013f0097/attachment.pgp>


More information about the dev mailing list