[OSM-talk] Finding what country something is in (new website)

andrzej zaborowski balrogg at gmail.com
Fri Jul 31 18:52:22 BST 2009


2009/7/30 OJ W <ojwlists at googlemail.com>:
> I put a wrapper around the rather excellent
> http://wiki.openstreetmap.org/wiki/OSM_Server_Side_Script which can
> tell you which town/county/state/country something is in:
>
> http://dev.openstreetmap.org/~ojw/WhatCountry/?lat=51.51&lon=-0.05
>
>  - which replies that the specified numbers are in Tower Hamlets and
> London and the UK
>
>
> It does mean you can get all the admin levels for a place using just
> one line of PHP:

Something that would also be very cool would be if the script told you
all polygons or multipolygons you're in regardless of whether they are
a relation or normal polygon, and you could filter the result for
country boundaries or other type of areas.  It could for example tell
you you're in a building in a school area in a residential area in a
county in a province in a country on an island.

The complexity of the check should be the same, just way more input
data to consider.

Cheers




More information about the talk mailing list