Creating Geo Location Taxonomy

Home Forums Advice & Tutorials Software & Services Creating Geo Location Taxonomy

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3397

    willis_brucis
    Participant

    Hello,

    First off, thank you for this site and the great dataset!

    I figured it might be of help to someone trying to create a location taxonomy using

    the data sets found on this site. Posted below is table of general errors logged in trying

    to do a lookup like : city -> state/province -> country -> continent.

    Will try to post more as I progress, thanks again for the great work!

    General Specs :

    Django / Python

    Postgres / PostGis

    Data from 10m_cultural :

    SimpleCities

    StatesProvinces

    Countries

    Continents

    | City | State | Country | Continent


    City | X | 131 | 123 | 187

    State | X | X | 12 | 93

    Country | X | X | X | 20

    Continent | X | X | X | X

    For City, used mpoly__contains=city.point

    Everything else, mpoly__contains=x.mpoly.point_on_surface.

    Not sure about the accuracy of point_on_surface, but found it much

    faster than mpoly__contains=mpoly.

    Thanks again,

    willis_brucis

    #4058

    willis_brucis
    Participant

    Update :

    Just realized the sub-units set. This will is fill in some of the matches

    I didn’t find. Will post more as I progress.

    Thanks!

    #4059

    Nathaniel
    Keymaster

    @Willis: Thanks for the compliments! There is already an admin-0 code on all the populated places. If you’re not seeing that in the simple version, download the detailed version. For the admin-1 unit, those are draft still so don’t use them as gospel. We’re 50% thru fixing them. It’s best to do a point in poly test, then for the unmatched ones, figure out which poly the point is closest to (it’s might be just a tiny bit away from the poly). For the admin-0 sub-units: be aware that ISO countries are not correct. If you need to match them, fine, but Natural Earth uses a more consistent sorting. French Guiana, for instance, is just like Alaska. It shouldn’t be counted as a top-level country.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.