I'm not sure it's specified anywhere, but it is customary (and many tools expect) to receive a sorted OSM file: nodes first, followed by ways, followed by relations. This makes constructing an in-memory model of the data easier on the client side.<br>
<br><div class="gmail_quote">On Sun, Jun 26, 2011 at 12:05 PM, Dario Brandes <span dir="ltr"><<a href="mailto:dalino@spline.de">dalino@spline.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
hi matt,<br>
<br>
the main difference between our solutions is that you sort the data in<br>
category's (nodes, ways, relations). We have only one list, in<br>
which this elements are unsorted. This asynchronism is necessary to<br>
keep our good server performance, because the output-module does not<br>
have to await for all the data. It can start the output stream before.<br>
What's your point of view? Do you really need this type of sorting?<br>
<br>
I hope we can find a solution, to make all happy :)<br>
<br>
Regards Dario<br>
<br>
<br>
On Thu, 16 Jun 2011 19:22:54 +0100<br>
Matt Amos <<a href="mailto:zerebubuth@gmail.com">zerebubuth@gmail.com</a>> wrote:<br>
<br>
> hi dario,<br>
><br>
> there's experimental support in cgimap for JSON format, which will<br>
> hopefully get enabled at 0.7 time (whenever that is). i've attached an<br>
> example of the output in both JSON and XML for comparison. it looks<br>
> extremely similar to the examples you've included below, so hopefully<br>
> we can work together on this. :-)<br>
><br>
> cheers,<br>
><br>
> matt<br>
><br>
> On Thu, Jun 16, 2011 at 5:04 PM, Dario Brandes <<a href="mailto:dalino@spline.de">dalino@spline.de</a>><br>
> wrote:<br>
> > Hello everyone,<br>
> ><br>
> > we from the xappy.js Team want talk with you about a JSON Standard<br>
> > for osm. The GeoJSON Format is inapt to safe relations and so we<br>
> > created something new.<br>
> > Here the link to our wikipage:<br>
> > <a href="https://github.com/slomo/osm-spline-xapi/wiki/JSON-Output" target="_blank">https://github.com/slomo/osm-spline-xapi/wiki/JSON-Output</a><br>
> ><br>
> > We would like to hear your comments about our proposal.<br>
> ><br>
> > Regards Dario<br>
> ><br>
> ><br>
> ><br>
> > # JSON output format definition by example.<br>
> ><br>
> > **Note:** for simple reading we included whitespaces which are of<br>
> > course omitted in the actual implementation.<br>
> ><br>
> > ## skeleton<br>
> >    {<br>
> >        "version": 0.6,<br>
> >        "generator": "xappy.js",<br>
> >        "xapi": {<br>
> >             "uri": "XXX",<br>
> >             "planetDate": 201106161601,<br>
> >             "copyright": "XXX",<br>
> >             "instance": "XXX"<br>
> >         },<br>
> >        "elements": [<br>
> >            ...<br>
> >            ...<br>
> >            ...<br>
> >        ]<br>
> >    }<br>
> ><br>
> > where the `elements` array obviously contains all the elements.<br>
> ><br>
> > ## node<br>
> >    {<br>
> >        "type": "node",<br>
> >        "id": 3596186,<br>
> >        "lat": 53.4633699598014,<br>
> >        "lon": -2.22667910006381,<br>
> >        "timestamp": "2007-06-21T17:10:58+01:00",<br>
> >        "version": 2,<br>
> >        "changeset": 2213,<br>
> >        "tags": [<br>
> >            "amenity": "hospital",<br>
> >            "name": "Manchester Royal Infirmary"<br>
> >        ]<br>
> >    }<br>
> ><br>
> > ## way<br>
> >    {<br>
> >         "type": "way",<br>
> >         "id": 4958218,<br>
> >         "version": 3,<br>
> >         "timestamp": "2007-07-25T01:55:35+01:00",<br>
> >         "changeset": 2211,<br>
> >         "nodes": [<br>
> >             218963,<br>
> >             331193<br>
> >         ],<br>
> >         "tags":[<br>
> >             "landuse": "residential",<br>
> >             "source": "landsat"<br>
> >         ]<br>
> >     }<br>
> ><br>
> > ## relation<br>
> >    {<br>
> >        "type": "relation",<br>
> >        "id": 2670,<br>
> >        "timestamp": "2007-10-25T03:05:34Z",<br>
> >        "version": 32,<br>
> >        "changeset": 2211,<br>
> >        "members": [<br>
> >            {<br>
> >                "type":"way",<br>
> >                "ref":3992472,<br>
> >                "role": ""<br>
> >            },<br>
> >            {<br>
> >                "type":"way",<br>
> >                "ref":3992524,<br>
> >            ],<br>
> >        "tags":[<br>
> >            "name": "Fonnereau Way",<br>
> >            "network": "Ipswich foothpaths",<br>
> >            "type": "route"<br>
> >        ]<br>
> >    }<br>
> ><br>
> > _______________________________________________<br>
> > dev mailing list<br>
> > <a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
> > <a href="http://lists.openstreetmap.org/listinfo/dev" target="_blank">http://lists.openstreetmap.org/listinfo/dev</a><br>
> ><br>
> ><br>
<br>_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/dev" target="_blank">http://lists.openstreetmap.org/listinfo/dev</a><br>
<br></blockquote></div><br>