1

Does Postgis have a Max Distance function for two geographies? It has ST_MaxDistance defined on two geometries:

ST_MaxDistance — Returns the 2D largest distance between two geometries in projected units.

But I'm not able to find a similar function that does the same for two geographies. Does it have that kind of function? As a reference, here would be an example: https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions#st_maxdistance. I am not looking to cast the geographies to geometries.

David542
  • 104,438
  • 178
  • 489
  • 842
  • Hi, I believe you won't be able to do it without casting the geographies to geometries. Even if you decide to dump the points and calculate the max distance manually, the dump functions also do not work with geographies. I'll add it to my todo list ;) – Jim Jones Jan 04 '23 at 13:08
  • @JimJones cool -- are you one of the C contributors on the Postgis project? If so, keep up the amazing work! – David542 Jan 04 '23 at 23:04
  • 1
    I've contributed with a couple of C functions to PostGIS, but I'm very far from being a core contributor :) I will take a look at the code of `_ST_MaxDistanace` to see if it can be extended when things get calmer at work. – Jim Jones Jan 05 '23 at 00:17

0 Answers0