# [postgis-users] [postgis-devel] Oddity in _ST_Expand(geography) ?

Paul Ramsey pramsey at cleverelephant.ca
Tue Jul 3 14:22:04 PDT 2018

```That's the stupidest idea I ever heard.

/JK

Actually it's just a misunderstanding. We can't return the three-space
box, we have to return a lon/lat shape that, when plotted on the
surface of the earth, has the expected 3-space bounding box. So, it
could get tricky.

P.

On Tue, Jul 3, 2018 at 1:17 PM, Regina Obe <lr at pcorp.us> wrote:
>>
>> I start to think that perhaps the existing behavior is broken, and geography
>> expand should rewrite the object so that it becomes something that has the
>> 3-space bounds we want. Maybe an appropriately chosen multipoint, for
>> example. It will be very confusing to people, though, since they tend to think
>> rectangularly about bounds, even when working with spherical coordinates,
>> which are very decidedly not rectangular.
>>
>> Interested in thoughts,
>>
>> P
>>
>
> A  polyhedral surface.  When you cast box3d to geometry now it gives you a polyhedral surface.
>
> SELECT ST_AsText('BOX3D(1 2 3,5 6 5)'::box3d::geometry)
>
> POLYHEDRALSURFACE Z (((1 2 3,1 6 3,5 6 3,5 2 3,1 2 3)),((1 2 5,5 2 5,5 6 5,1 6 5,1 2 5)),((1 2 3,1 2 5,1 6 5,1 6 3,1 2 3)),((5 2 3,5 6 3,5 6 5,5 2 5,5 2 3)),((1 2 3,5 2 3,5 2 5,1 2 5,1 2 3)),((1 6 3,1 6 5,5 6 5,5 6 3,1 6 3)))
>
> Though I guess we don't support polyhedral surfaces in geography so perhaps that's a pipe dream.
>
>  Regina hops away before Paul has a chance to say
>
> "That's the stupidest idea I ever heard."
>
>
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
```