Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have db with a very large amount of geometries (circles), most of them overlapping. I'm trying to come up with a way to find the nearest point (from your current location) that is not within any of these circles.

Is this possible with a direct query?

So far I thought of a fishnet approach of 1x1 km cells that check for overlap with any of these circles. This works, but is not very accurate.

Any thoughts would be appreciated!

share|improve this question

If you're using a postGIS database, you could use the st_closestpoint function. One argument would be your current location, the other one your inverted circle geometries.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.