Opened 9 years ago

Closed 9 years ago

#3030 closed defect (wontfix)

ST_Boundary does not reduce dimensionality for empty geometries

Reported by: bladeoflight16 Owned by: pramsey
Priority: medium Milestone: PostGIS 2.2.0
Component: postgis Version: 2.1.x
Keywords: Cc:

Description

This query:

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

gives these results:

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

I generally expect ST_Boundary to return a geometry of one less dimension even if the geometry is an empty one. (I.e., I expect an empty linestring from a polygon input and an empty point for a linestring input.)

(Posting this after being instructed to on the mailing list.)

Confirmed using the following versions: POSTGIS="2.1.5 r13152" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23 September 2009" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.8.0" LIBJSON="UNKNOWN" RASTER

and

"POSTGIS="2.1.4 r12966" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.6" LIBJSON="UNKNOWN" RASTER"

Change History (2)

comment:1 by pramsey, 9 years ago

Milestone: PostGIS 2.2.0

comment:2 by pramsey, 9 years ago

Resolution: wontfix
Status: newclosed

I'll accept a patch, but I can't rationalize spending any time on this particular corner case myself…

Note: See TracTickets for help on using tickets.