#2700 closed defect (fixed)
pgsql2shp output 2D when null geom in 3D table
Reported by: | RemiC | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.1.3 |
Component: | utils/pgsql2shp | Version: | master |
Keywords: | pgsql2shp null geom 3D 2D history | Cc: |
Description
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.
Attachments (1)
Change History (7)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Milestone: | → PostGIS 2.1.3 |
---|
comment:3 by , 11 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 , 11 years ago
Owner: | changed from | to
---|---|
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 , 11 years ago
Keywords: | history added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
by , 11 years ago
Attachment: | pgsql2shp_debug.backup added |
---|
This dump create a table with mixed null and 3D linestring geom. Using pgsql2shp produce 2D output instead of 3D output
comment:6 by , 13 months ago
Component: | utils/shapefile-loader-dumper → utils/pgsql2shp |
---|
Note:
See TracTickets
for help on using tickets.
Could you please show exact commandline ? Also, are you able to provide a small test dataset to add to the regression testsuite ?