[PostGIS] #6028: Mis-shapen Empty Polygon Crashes Backend

PostGIS trac at osgeo.org
Mon Dec 15 09:06:49 PST 2025


#6028: Mis-shapen Empty Polygon Crashes Backend
---------------------+---------------------
 Reporter:  pramsey  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  blocker  |  Milestone:
Component:  postgis  |    Version:  3.2.x
 Keywords:           |
---------------------+---------------------
 From the mailing list
 {{{
 drop table if exists fault;
 create table fault (fid integer, geom geometry(Polygon,5015));
 CREATE INDEX fault_geom_index ON fault USING GIST (geom);
 INSERT INTO fault (fid, geom) VALUES (1,
 '0103000020971300000100000000000000'::GEOMETRY);
 }}
 The polygon in the WKB is a polygon with one ring, which has zero points.
 This is legal WKB, but not really distinct from an empty polygon
 represented with zero rings, from a spatial logic point of view. It still
 covers no space and is a polygon.

 When parsing this input WKB, it makes sense to just convert the input into
 a standard empty polygon.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/6028>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list