0

i have osm data structured as shown in fig1 below. what i want to do is, to extract 3 files out of the main file shown in the fig1, so that each file is organised as shown in figures 2,3,4

to do that, i implemented a segregator algorithm to fragment the main file "fig1" into small chuncks.

my question is, is there any software or better approach to that instead of writing segregation algorith?

fig1:

enter image description here

fig2:

enter image description here

fig3:

enter image description here

fig4:

enter image description here

Amrmsmb
  • 1
  • 27
  • 104
  • 226
  • 2
    What are you segregating by? Id? Location? How did you segregate - where's your code? – Mark Setchell Dec 10 '15 at 08:25
  • @MarkSetchell using Stax library..it is for processing xml files – Amrmsmb Dec 10 '15 at 08:36
  • 1
    You still haven't told us what your separation criterion is. – scai Dec 10 '15 at 09:38
  • @scai i thought it is obvious and can be easily grasped from the code posted above...anyway, the criterion is, to segregate each bunch of nodes and their relevant tag element and write them to a .xml file – Amrmsmb Dec 10 '15 at 10:36
  • 1
    @user2121 No its not because this is *not* a typical [OSM XML](https://wiki.openstreetmap.org/wiki/OSM_XML) file. The *tag* element does *not* belong to the *node* since it is obviously separated and not enclosed by the corresponding `` tags. Where did you get this broken OSM file from? – scai Dec 10 '15 at 11:56
  • Also it could be very helpful to tell us what your ultimate goal is. There are already lots of different OSM tools for various jobs available – scai Dec 10 '15 at 12:48
  • @scai i want to extract speed limit information from the map data according to a given lat and long..would u please tell me what is the advisable approach dealing with this problem...given that the osm data is really huge and we want to retrieve information effeciently – Amrmsmb Dec 10 '15 at 13:09
  • 1
    Take a look at [osmfilter](https://wiki.openstreetmap.org/wiki/Osmfilter) or [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API). – scai Dec 10 '15 at 13:23
  • @scai maybe this could be a question fro you as well :) http://stackoverflow.com/questions/34203228/how-to-query-osm-from-the-server – Amrmsmb Dec 10 '15 at 13:32
  • maxspeed details are in most cases tagged on OSM ways rather than nodes like in your (non-OSM data model conformant) example. I'd suggest to get familiar with the OSM data model a bit more, read the [Wiki page](http://wiki.openstreetmap.org/wiki/Key:maxspeed) before trying to automate things. – mmd Dec 10 '15 at 20:44

0 Answers0