Reputation: 1813
I am playing around a bit with openstreetmap data.
What I want to get is the closest "road" (i.e. way with tag 'highway' set to certain values) to the users position.
At the moment I use the API to query all Objects in a square around the user and then parse all the way elements, check their tags, check their distance to the user and so on
But that doesn't sound to elegant to me.
Is there a better solution ? maybe through the API or by installing the openstreetmap data in a local DB somehow to be able to query that directly ?
would be great if someone could point me to the right direction.
Thanks in advance.
Upvotes: 2
Views: 2095
Reputation: 357
please use "Read-Only Data APIs" for getting Data.
You must not use the "editing API" for read-only purposes or projects. (see Terms of use)
For your purposes I would use OSM Server Side Script
Upvotes: 4