I'm new to PostGIS and I see there are so many options, it's a bit overwhelming.

I want to simply find all geo points (stored in ISO 6709 format) within a certain angle of a given geopoint.

For example, given a geopoint "+25 -90", find all geopoints within 5degrees angle of that geo point, that is:

  • +25+/-5 degrees -> 20 to 30 degrees latitude
  • -90+/-5 degrees -> -85 to -95 degrees longitude

What's the easiest way to achieve this query?


  • ISO 3166 doesn't specify a format to store geographical points. Perhaps you're confusing ISO and a different spec for EPSG? – Evan Carroll Jan 18 '17 at 23:16
  • I mean the Geo point are in ISO 3166 format (i.e. the string format), then obviously I would need to convert that to a 'geography' or 'geometry' in PostGIS I guess – MrE Jan 18 '17 at 23:20
  • ISO 3166 doesn't specify a string format for points. If it does, please provide that part of the spec in your answer or a link. – Evan Carroll Jan 18 '17 at 23:21
  • 1
    my bad, I meant ISO 6709. – MrE Jan 18 '17 at 23:30
  • 1
    just found this: gis.stackexchange.com/questions/84108/… which seems like a reasonable answer. – MrE Jan 18 '17 at 23:32

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.