[Geocoding] geocoding of intersection with two road names given
Sarah Hoffmann
lonvia at denofr.de
Sat Mar 21 08:14:34 UTC 2015
Hi Stefan,
On Wed, Mar 18, 2015 at 06:58:06PM -0400, Stefan Steiniger wrote:
> Dear GeoCoders,
>
> I am having a database of traffic accidents. All accidents that
> happened at an intersections are described by giving the two street
> names. Is there an option to send such a request to Nominatim?
> I tried it with "Street A, and, Street B, City", without success.
This is currently not implemented in Nominatim, so you have to
do it on your own.
> Or: Would I have to fetch the geometry of either road and do then
> some processing with my client a la JTS: geom.intersect(geom2)?
> Assuming a small area -> planar 2D should be fine.
> If I need to do it this way: Does "polygon_geojson=1" give me the
> complete LineString as in the DB?
Nominatim only returns the geometry of a single OSM way. That means
the result is inclomplete when the street has been split into
multiple ways because by default Nominatim only returns one result if
the streets look like duplicates. There is an option 'dedupe=0' which
ensures that you get all parts of the street that match your query.
That should then be enough to get all geometries you need.
> PS: Btw. I am using iPython Notebook, so I guess shapely helps me
> here to do the JTS stuff, in case someone knows?
Jep, shapely should provide all the functions you need.
Regards
Sarah
More information about the Geocoding
mailing list