How to very efficiently assign lat/long to city boundary described by shape ?

Posted by watcherFR on Stack Overflow See other posts from Stack Overflow or by watcherFR
Published on 2010-05-05T11:54:14Z Indexed on 2010/05/05 11:58 UTC
Read the original article Hit count: 189

Filed under:
|
|

I have a huge shapefile of 36.000 non-overlapping polygones (city boundaries). I want to easily determine the polygone into which a given lat/long falls. What would the best way given that it must be extremely computationaly efficient ?

I was thinking of creating a lookup table (tilex,tiley,polygone_id) where tilex and tiley are tile identifiers at zoom levels 21 or 22. Yes, the lack of precision of using tile numbers and a planar projection is acceptable in my application.

I would rather not use postgres's GIS extension and am fine with a program that will run for 2 days to generate all the INSERT statements.

© Stack Overflow or respective owner

Related posts about shapefile

Related posts about gis