How can I build a list of world geo locations and their relative geographical hierarchies?

Posted by Nathan Ridley on Stack Overflow See other posts from Stack Overflow or by Nathan Ridley
Published on 2011-07-25T18:10:00Z Indexed on 2011/11/30 17:49 UTC
Read the original article Hit count: 203

Filed under:
|

I want to build a database of geographical locations and would like to be able to identify locations that fall inside other locations. For example, The Empire State Building is going to have one geo-coordinate, but my database would be able to tell me that it falls inside Manhattan, which falls inside New York City, which is in the state of New York and so forth.

I've been looking at OpenStreetMap which seems to have a pretty decent database but as best I can tell, I would need to create a set of polygon structures representing each region and then detect if a coordinate falls inside a given region's polygon. Is there a better way to do this, or is there a data source where all of this has already been calculated?

© Stack Overflow or respective owner

Related posts about database

Related posts about geospatial