1

I know there are services that perform reverse geocoding, given a pair of lat-long and return an approximate address, city, etc.

The problem I have is that given a lat-long, I want to return the region it falls under (on the map) but the region is custom defined (e.g. a random square on the map).

For example, I have the following picture with different custom regions (the region shapes are stored in a KMZ file).

enter image description here

How can I determine which red polygon a lat-long falls inside? Or if it falls outside all of them?

  • You going to need a spatial database to that or use javascript stackoverflow.com/questions/217578/… – Mapperz Feb 13 at 21:02
  • @Mapperz thanks for the comment. That's actually the approach I was thinking of as well. But this relies on all sections being "nice" polygons. Some of the sections could have edges which are not exactly straight lines. Furthermore, it would require me to manually convert each section to a set of long-lat coordinates. – Bazinga Feb 16 at 2:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.