NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I am using osm database imported with osm2pgsql in slim mode. In my current app I have locations of different vehicles in lat lon. I want to get max speed, road name and road type for each location.

So here is the approach I am looking to implement

-- for each set of lat lon values find the closest point in planet_osm_points

-- find a node in planet_osm_nodes with lat and lon values equal to that of the point's multiplied with 100 (since lat lon in nodes is in integer form)

-- get the node id and find all ways in planet_osm_ways with these nodes and look for tags maxspeed and highway.

-- if max speed is not present use the maxspeed for that road type in that country.

So I have a few questions regarding this scenario

1- Is there a more optimized way of getting these values since I would be doing them for 1-2M records on a daily basis.

2- how can i find road name? which tag represents that?

3- Since I am doing all of this offline. is there any source from where I can get country wise max speed for roads programatically and dump it in my db?

Thanks

asked 25 Jul '17, 16:18

aitizazk's gravatar image

aitizazk
217710
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710
×263
×163
×134
×46

question asked: 25 Jul '17, 16:18

question was seen: 1,808 times

last updated: 25 Jul '17, 16:18

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum