1

I've got two GeoJSON files. One is points (gas stations) and the other is the local administrative area. I'm wondering is it possible to calculate the farthest distance in that polygon from the point?

  • You use PostGIS tag but you talk about GeoJSON. Are you willing to convert data first into database? – user30184 Feb 9 '17 at 5:27
  • Yes, I will import the GeoJSON as a table first. – Dunuts Feb 9 '17 at 8:48
0

Have you tried st_MaxDistance? http://postgis.net/docs/ST_MaxDistance.html

  • I have seen it but not sure if it'll be able to solve my problem if the gas stations are totally contained within the administrative area polygon? – Dunuts Feb 14 '17 at 22:35
  • Then my understanding is that you should get the distance between the point and the most distant point on the administrative area from the gas station. Isn't that what you want? – Fabien Ancelin Feb 14 '17 at 22:52
  • Yes, that's what I want. I just thought that would give me a point on the edge of the polygon as opposed to being 'in' it. – Dunuts Mar 6 '17 at 20:59
  • Perfect. If you don't mind, don't forget to flag the question as answered if that solves your issue. This was the thread will be marked as answered. Thanks. – Fabien Ancelin Mar 7 '17 at 2:00

Your Answer

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

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