Opened 9 years ago
Closed 9 years ago
#2700 closed defect (fixed)
pgsql2shp output 2D when null geom in 3D table
|Reported by:||RemiC||Owned by:||strk|
|Keywords:||pgsql2shp null geom 3D 2D history||Cc:|
When using pgsql2shp with a table declared as 3D geom, but containing null geom (possibly at the beginning), the programm create a 2D shapefile instead of a 3D shapefile.
Change History (6)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
|Milestone:||→ PostGIS 2.1.3|
comment:3 by , 9 years ago
I think the problem is with max(ST_ZMFlag(geom)) returning null on null geometries and thus being interpreted as 0 as the max. A COALESCE should help.
comment:4 by , 9 years ago
|Status:||new → assigned|
Nevermind the test dataset, it is easy to reproduce. It's not limited to max() aggregate use, but also to the geometrytype loop. I'm on it.
comment:5 by , 9 years ago
|Status:||assigned → closed|
by , 9 years ago
This dump create a table with mixed null and 3D linestring geom. Using pgsql2shp produce 2D output instead of 3D output
Could you please show exact commandline ? Also, are you able to provide a small test dataset to add to the regression testsuite ?