This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Integrate OSM in existing Rails App.

0

Hi, I am looking for some help setting up openstreetmap in my existing rails app. I am new to the whole maps thing. In my app i am tracking locations of vehicles. now I want to add a feature where I can get the maxspeed, name and type of a road as well. I am considering openstreetmap because I dont want to make third party api calls for every location I get as the number of locations are greater than 1M per day.

Do I need to duplicate entire schema of OSM? as there are many irrelevant tables in the schema. or simple I should parse the .osm file and create tables for nodes ways and relations only? Also I would need to keep this data updated.

I would really appreciate if any one can point me in the right direction.. or share some links that would help me start?

Thanks

asked 19 Jul '17, 13:36

aitizazk's gravatar image

aitizazk
217710
accept rate: 0%

It would be great if you could help out instead posting crosspost on both platforms...

(20 Jul '17, 08:35) aitizazk

One Answer:

0

You definitely don't need to use the OSM API schema and likely a (potentially slimmed down) osm2pgsql schema that actually creates the geometries will be a lot less work than rolling your own.

This will give you an updateable DB that contain as many or as little tags that you want.

answered 19 Jul '17, 14:46

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 19 Jul '17, 15:21

Source code available on GitHub .