[postgis-devel] Global definition for ST_Extent (geometry and geographic)

Felipe Matas felipematas at yahoo.com
Fri Mar 3 08:56:20 PST 2023


Hi all, I was thinking some time ago, would be great to support ST_Extent for geographic, and was there when pramsey says that there is no intuitive definition for it in geographic...
So, in order to can support ST_Extent I thought try to get an intuitive definition of it, the first thought was, get 4 points that contains all the geometry, and get the smallest surface, but ST_Extent is represented in a BBox, that means it only can be defined by two points, from there would be, the two points that contains all the geometry with the smallest surface.
This definition match with geometry too.
There is a weird case when we are in geographic, how the CRS is able to curve the space, there is the chance to be able to get several BBox that contains the geom and with the same surface, multiple solutions, so... we would need some other rules to choose to only one to be valid, like first choose the bbox with the northernmost point, and then with the southernmost point.
Talking with strk (osgeo), one property of BBox is a lot of times to get vertical and horizontal lines, but in geographic is not easy, two points will never have a line without a curve, if we want to get a non-curve line, we would need a lot of points.., so I think would be better to just accept the curve lines that are generated by two points in geographic.

What ppl think about the definition and issues of it? ideas!

Thx!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20230303/b5079576/attachment.htm>


More information about the postgis-devel mailing list