2

I'm prototyping a Java application, which uses an OSM map of a small city.

I need to extract from the OSM map the coordinates of

  1. roads,
  2. railroads,
  3. power lines and
  4. buildings.

At the moment I'm aware of only one way to do it - setup a PostgreSQL database with PostGIS, import the map there and then run SQL queries to get the data.

Are there any alternatives, ways to implement it (reading coordinates of objects a-d) in a more lightweight way (without the nontrivial installation of PostGIS, except Portable GIS) ?

For now, I don't care about performance, I just want to learn how to work with OSM in Java.

  • 1
    You can also have a look into graphhopper.com which is in Java but reads the roads only. It reads XML as well as the pbf format – Karussell Oct 21 '13 at 9:08
0

It turns out that the easiest way to accomplish my task is to write a simple Java program to read data from OSM along the lines of this example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.