Hello everyone. Can I get using OSM Api the location and bounds of street by lat lon ( the point is near or on the street) and draw a curve on it? Should I use some geo services or route DB(like geoserver.org)? asked 27 Nov '11, 21:46 zzzzteph |
You can use the API to request a "way", which is a line/polygon feature. You can then calculate its bounds fairly easily by requesting its components with the /full call (or requesting each individually). From there you can do simple math on the nodes to see the way's bounds. As for the second part of your question "The point is near or on the street"- if the point in mention is an existing node in OSM, then you can request if the node is a component of the way. Since streets in OSM are stored as lines and not areas, unless your point has the exact same location as an existing node, then it would be a bit of a guess (even if it's an extrapolated one) whether it's on a street. answered 28 Nov '11, 12:37 emacsen |