Opened 4 years ago

Closed 4 years 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 by Sandro Santilli <strk@…>, 4 years ago

In ec53e3b1/git:

Fix SRID in Geometry(TopoGeometry) for empty TopoGeometry objects

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

comment:2 by strk, 4 years ago

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

comment:3 by Sandro Santilli <strk@…>, 4 years ago

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 by Sandro Santilli <strk@…>, 4 years ago

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 by Sandro Santilli <strk@…>, 4 years ago

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 by Sandro Santilli <strk@…>, 4 years ago

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.