hi dario,

there's experimental support in cgimap for JSON format, which will
hopefully get enabled at 0.7 time (whenever that is). i've attached an
example of the output in both JSON and XML for comparison. it looks
extremely similar to the examples you've included below, so hopefully
we can work together on this. :-)

cheers,

matt

On Thu, Jun 16, 2011 at 5:04 PM, Dario Brandes <[email protected]> wrote:
> 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"
>        ]
>    }
>
> _______________________________________________
> dev mailing list
> [email protected]
> http://lists.openstreetmap.org/listinfo/dev
>
>

Attachment: foo.osm.json
Description: application/json

<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="CGImap 0.0.3">
 <bounds minlat="54.0995000" minlon="13.3995000" maxlat="54.1000000" maxlon="13.4000000"/>
 <node id="340479592" lat="54.0995800" lon="13.3997067" user="CLoeser" uid="64977" visible="true" version="2" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="353110981" lat="54.0998841" lon="13.3997915" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:05Z"/>
 <node id="353110983" lat="54.0998879" lon="13.3999986" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:05Z"/>
 <node id="25011251" lat="54.0970864" lon="13.4563710" user="CLoeser" uid="64977" visible="true" version="9" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="55411929" lat="54.0956226" lon="13.4294650" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:23Z"/>
 <node id="55411936" lat="54.0956038" lon="13.4311162" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:23Z"/>
 <node id="55411940" lat="54.0953940" lon="13.4329926" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:23Z"/>
 <node id="55411946" lat="54.0953555" lon="13.4343691" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:23Z"/>
 <node id="55411951" lat="54.0953311" lon="13.4360797" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:23Z"/>
 <node id="55411960" lat="54.0952804" lon="13.4374628" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:23Z"/>
 <node id="55411965" lat="54.0951911" lon="13.4383941" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:23Z"/>
 <node id="55411968" lat="54.0949974" lon="13.4393232" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="55411972" lat="54.0946238" lon="13.4399276" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="55411975" lat="54.0937841" lon="13.4410774" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="55411977" lat="54.0932245" lon="13.4419473" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="55411981" lat="54.0929456" lon="13.4428484" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="55411985" lat="54.0928115" lon="13.4441864" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="55411989" lat="54.0928328" lon="13.4455739" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="55411997" lat="54.0930326" lon="13.4473879" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="55412001" lat="54.0933636" lon="13.4483408" user="CLoeser" uid="64977" visible="true" version="5" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="55412005" lat="54.0947894" lon="13.4516584" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="203713912" lat="54.0990873" lon="13.3812826" user="CLoeser" uid="64977" visible="true" version="5" changeset="792986" timestamp="2009-03-12T08:44:21Z"/>
 <node id="203713918" lat="54.0991947" lon="13.3825221" user="CLoeser" uid="64977" visible="true" version="3" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713924" lat="54.0993375" lon="13.3831750" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713931" lat="54.0994939" lon="13.3839778" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713935" lat="54.0995312" lon="13.3924367" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713941" lat="54.0995106" lon="13.3954717" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713945" lat="54.0995084" lon="13.3981708" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713951" lat="54.0994642" lon="13.4014047" user="CLoeser" uid="64977" visible="true" version="3" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713956" lat="54.0993403" lon="13.4026055" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713968" lat="54.0989476" lon="13.4055369" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713975" lat="54.0986396" lon="13.4076724" user="CLoeser" uid="64977" visible="true" version="3" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713986" lat="54.0983159" lon="13.4095542" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713990" lat="54.0982127" lon="13.4111645" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203713996" lat="54.0982936" lon="13.4124991" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714001" lat="54.0985493" lon="13.4139210" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714004" lat="54.0986324" lon="13.4149954" user="CLoeser" uid="64977" visible="true" version="3" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714007" lat="54.0986642" lon="13.4162657" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714017" lat="54.0985570" lon="13.4172608" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714027" lat="54.0983659" lon="13.4180642" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714033" lat="54.0977728" lon="13.4197619" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714037" lat="54.0970694" lon="13.4213767" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714041" lat="54.0966949" lon="13.4226248" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714043" lat="54.0964285" lon="13.4238013" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714044" lat="54.0960821" lon="13.4251519" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="203714053" lat="54.0956448" lon="13.4267150" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:23Z"/>
 <node id="203714059" lat="54.0955575" lon="13.4278704" user="CLoeser" uid="64977" visible="true" version="4" changeset="792986" timestamp="2009-03-12T08:44:23Z"/>
 <node id="260109618" lat="54.0990348" lon="13.3804261" user="CLoeser" uid="64977" visible="true" version="5" changeset="792986" timestamp="2009-03-12T08:44:21Z"/>
 <node id="260109811" lat="54.0989972" lon="13.3789541" user="CLoeser" uid="64977" visible="true" version="5" changeset="792986" timestamp="2009-03-12T08:44:21Z"/>
 <node id="261892444" lat="54.1016118" lon="13.3953992" user="Scratchy" uid="99145" visible="true" version="10" changeset="682838" timestamp="2009-02-26T22:53:44Z"/>
 <node id="263305078" lat="54.1011113" lon="13.3958427" user="Wolef" uid="20867" visible="true" version="1" changeset="392344" timestamp="2008-05-10T16:46:07Z"/>
 <node id="263305079" lat="54.1002030" lon="13.3966200" user="Scratchy" uid="99145" visible="true" version="2" changeset="682838" timestamp="2009-02-26T22:58:06Z"/>
 <node id="263305080" lat="54.1000749" lon="13.3967794" user="Scratchy" uid="99145" visible="true" version="2" changeset="682838" timestamp="2009-02-26T22:58:06Z"/>
 <node id="263305081" lat="54.0999638" lon="13.3970185" user="Wolef" uid="20867" visible="true" version="1" changeset="392344" timestamp="2008-05-10T16:46:07Z"/>
 <node id="300724687" lat="54.0995062" lon="13.3891021" user="CLoeser" uid="64977" visible="true" version="6" changeset="792986" timestamp="2009-03-12T08:44:22Z"/>
 <node id="344531411" lat="54.0962382" lon="13.4542401" user="CLoeser" uid="64977" visible="true" version="2" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="353110957" lat="54.1006921" lon="13.3962334" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:03Z"/>
 <node id="353110958" lat="54.0998841" lon="13.3973650" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:04Z"/>
 <node id="353110960" lat="54.0998394" lon="13.3976288" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:04Z"/>
 <node id="353110961" lat="54.0998010" lon="13.3979536" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:04Z"/>
 <node id="353110962" lat="54.0997946" lon="13.3981695" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:04Z"/>
 <node id="353110965" lat="54.0998164" lon="13.3985139" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:05Z"/>
 <node id="353110974" lat="54.0998969" lon="13.3990633" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:05Z"/>
 <node id="353110979" lat="54.0998982" lon="13.3991789" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:05Z"/>
 <node id="353110985" lat="54.0998982" lon="13.4001120" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:05Z"/>
 <node id="353110986" lat="54.0999570" lon="13.4002755" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:06Z"/>
 <node id="353110988" lat="54.0999749" lon="13.4003671" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:06Z"/>
 <node id="353110989" lat="54.0999531" lon="13.4006789" user="Scratchy" uid="99145" visible="true" version="1" changeset="682838" timestamp="2009-02-26T22:58:06Z"/>
 <node id="359401784" lat="54.0976975" lon="13.4578722" user="CLoeser" uid="64977" visible="true" version="1" changeset="792986" timestamp="2009-03-12T08:44:24Z"/>
 <node id="422646305" lat="54.1011910" lon="13.3957721" user="CLoeser" uid="64977" visible="true" version="1" changeset="1543381" timestamp="2009-06-17T11:25:17Z"/>
 <way id="19619657" user="CLoeser" uid="64977" visible="true" version="12" changeset="792986" timestamp="2009-03-12T08:44:24Z">
  <nd ref="260109811"/>
  <nd ref="260109618"/>
  <nd ref="203713912"/>
  <nd ref="203713918"/>
  <nd ref="203713924"/>
  <nd ref="203713931"/>
  <nd ref="300724687"/>
  <nd ref="203713935"/>
  <nd ref="203713941"/>
  <nd ref="203713945"/>
  <nd ref="340479592"/>
  <nd ref="203713951"/>
  <nd ref="203713956"/>
  <nd ref="203713968"/>
  <nd ref="203713975"/>
  <nd ref="203713986"/>
  <nd ref="203713990"/>
  <nd ref="203713996"/>
  <nd ref="203714001"/>
  <nd ref="203714004"/>
  <nd ref="203714007"/>
  <nd ref="203714017"/>
  <nd ref="203714027"/>
  <nd ref="203714033"/>
  <nd ref="203714037"/>
  <nd ref="203714041"/>
  <nd ref="203714043"/>
  <nd ref="203714044"/>
  <nd ref="203714053"/>
  <nd ref="203714059"/>
  <nd ref="55411929"/>
  <nd ref="55411936"/>
  <nd ref="55411940"/>
  <nd ref="55411946"/>
  <nd ref="55411951"/>
  <nd ref="55411960"/>
  <nd ref="55411965"/>
  <nd ref="55411968"/>
  <nd ref="55411972"/>
  <nd ref="55411975"/>
  <nd ref="55411977"/>
  <nd ref="55411981"/>
  <nd ref="55411985"/>
  <nd ref="55411989"/>
  <nd ref="55411997"/>
  <nd ref="55412001"/>
  <nd ref="55412005"/>
  <nd ref="344531411"/>
  <nd ref="25011251"/>
  <nd ref="359401784"/>
  <tag k="boat" v="yes"/>
  <tag k="name" v="Ryck"/>
  <tag k="waterway" v="river"/>
 </way>
 <way id="24302900" user="CLoeser" uid="64977" visible="true" version="5" changeset="1543381" timestamp="2009-06-17T11:25:18Z">
  <nd ref="261892444"/>
  <nd ref="422646305"/>
  <nd ref="263305078"/>
  <nd ref="353110957"/>
  <nd ref="263305079"/>
  <nd ref="263305080"/>
  <nd ref="263305081"/>
  <nd ref="353110958"/>
  <nd ref="353110960"/>
  <nd ref="353110961"/>
  <nd ref="353110962"/>
  <nd ref="353110965"/>
  <nd ref="353110974"/>
  <nd ref="353110979"/>
  <nd ref="353110981"/>
  <nd ref="353110983"/>
  <nd ref="353110985"/>
  <nd ref="353110986"/>
  <nd ref="353110988"/>
  <nd ref="353110989"/>
  <tag k="highway" v="service"/>
  <tag k="name" v="Eisenhammer"/>
 </way>
 <relation id="412391" user="smarties" uid="45882" visible="true" version="2" changeset="3913136" timestamp="2010-02-18T23:48:00Z">
  <member type="way" ref="23990644" role=""/>
  <member type="way" ref="19619657" role=""/>
  <tag k="name" v="Ryck"/>
  <tag k="type" v="waterway"/>
  <tag k="destination" v="East Sea"/>
  <tag k="waterway" v="river"/>
 </relation>
</osm>
_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to