Opened 9 months ago

Closed 9 months ago

#4871 closed defect (fixed)

TopoGeometry::geometry cast returns NULL for empty TopoGeometry objects

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 2.4.10
Component: topology Version: 2.4.x
Keywords: Cc:

Description

Example:

nibio=# select ST_AsEWKT(toTopoGeom('SRID=4258;LINESTRING(0 0, 10 0)', 'topo_rein_sysdata_rdr', 1, 0));
               st_asewkt               
---------------------------------------
 SRID=4258;MULTILINESTRING((0 0,10 0))
(1 row)

nibio=# select ST_AsEWKT(toTopoGeom('SRID=4258;LINESTRING EMPTY', 'topo_rein_sysdata_rdr', 1, 0));
       st_asewkt       
-----------------------
 MULTILINESTRING EMPTY
(1 row)

Happens at least as back as 2.5.6 (but probably for longer)

Change History (6)

comment:1 Changed 9 months ago by Sandro Santilli <strk@…>

In ec53e3b1/git:

Fix SRID in Geometry(TopoGeometry) for empty TopoGeometry objects

Includes testcase.
References #4871 in master branch (3.2.0dev)

comment:2 Changed 9 months ago by strk

Milestone: PostGIS 2.5.6PostGIS 2.4.10
Status: newassigned
Version: 2.5.x2.4.x

comment:3 Changed 9 months ago by Sandro Santilli <strk@…>

In cdd2818/git:

Fix SRID in Geometry(TopoGeometry) for empty TopoGeometry objects

Includes testcase and NEWS item
References #4871 in 3.1 branch (3.1.2dev)

comment:4 Changed 9 months ago by Sandro Santilli <strk@…>

In b7d9df34/git:

Fix SRID in Geometry(TopoGeometry) for empty TopoGeometry objects

Includes testcase and NEWS item
References #4871 in 3.0 branch (3.0.4dev)

comment:5 Changed 9 months ago by Sandro Santilli <strk@…>

In 586f636/git:

Fix SRID in Geometry(TopoGeometry) for empty TopoGeometry objects

Includes testcase.
References #4871 in 2.6 branch (2.5.6dev)

comment:6 Changed 9 months ago by Sandro Santilli <strk@…>

Resolution: fixed
Status: assignedclosed

In ce413e1/git:

Fix SRID in Geometry(TopoGeometry) for empty TopoGeometry objects

Includes testcase.
Closes #4871 in 2.4 branch (2.4.10dev)

Note: See TracTickets for help on using tickets.