[postgis-users] ST_Force2D on 3D geometries

Hubel, Andreas andreas.hubel at tum.de
Tue Jun 6 14:17:20 PDT 2017


Hi,

is the following expected behaviour?

SELECT ST_ASText(ST_Force2D('BOX3D(80 -65 -1, 81 -72 5)'::box3d));

"POLYHEDRALSURFACE(((80 -72,80 -65,81 -65,81 -72,80 -72)),((80 -72,80 -65,81 -65,81 -72,80 -72)),((80 -72,80 -65,80 -65,80 -72,80 -72)),((81 -72,81 -65,81 -65,81 -72,81 -72)),((80 -72,81 -72,81 -72,80 -72,80 -72)),((80 -65,81 -65,81 -65,80 -65,80 -65)))"


To get the result I expected, I had to use following query:

SELECT Box2d(ST_Force2D('BOX3D(80 -65 -1, 81 -72 5)'::box3d));

"BOX(80 -72,81 -65)"

Which only works in this case, as the input is a BOX3D.

Is there a function which converts a POLYHEDRALSURFACE to POLYGON?


Thanks in advance,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170606/0a17d571/attachment.sig>


More information about the postgis-users mailing list