[postgis-users] ST_Boundary returns MULTIPOLYGON

BladeOfLight16 bladeoflight16 at gmail.com
Fri Jan 9 14:26:09 PST 2015


Ran across some behavior that seems odd to me:

SELECT ST_AsText(ST_Boundary(geom))
FROM (VALUES ('POLYGON EMPTY'::GEOMETRY),
             ('MULTIPOLYGON EMPTY'::GEOMETRY),
             ('LINESTRING EMPTY'::GEOMETRY),
             ('MULTILINESTRING EMPTY'::GEOMETRY)
     ) g (geom);

results in:

'POLYGON EMPTY'
'MULTIPOLYGON EMPTY'
'LINESTRING EMPTY'
'MULTILINESTRING EMPTY'

Shouldn't the geometry type go down one dimension, despite the fact the
original was EMPTY? This seems like a minor bug to me. Is it just something
weird in the OGC specification? I couldn't find anything about it in the
docs.

Version info:
PostGIS: POSTGIS="2.1.4 r12966" GEOS="3.4.2-CAPI-1.8.2 r3924" PROJ="Rel.
4.8.0, 6 March 2012" GDAL="GDAL 1.11.1, released 2014/09/24" LIBXML="2.7.8"
LIBJSON="UNKNOWN" RASTER
PostgreSQL: PostgreSQL 9.3.1, compiled by Visual C++ build 1600, 64-bit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150109/64e0b64d/attachment.html>


More information about the postgis-users mailing list