[postgis-tickets] [PostGIS] #4209: Issues using pgsql2shp with a postgis table with null geometries
PostGIS
trac at osgeo.org
Fri Oct 19 07:44:08 PDT 2018
#4209: Issues using pgsql2shp with a postgis table with null geometries
------------------------+---------------------
Reporter: gabrimonfa | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone:
Component: postgis | Version: trunk
Keywords: |
------------------------+---------------------
The table has 7120 rows, 50 have null geometries and some of them are at
the beginning of the table.
Server is PostgreSQL 9.5 with postgis version "2.2 USE_GEOS=1 USE_PROJ=1
USE_STATS=1".
== Desired behaviour
The shape is created with all the rows, null geometries in the table are
null geometries in the shapefile.\\
Or it would be possible to add a null handling policy as in shp2pgsql.\\
== Actual behaviour
**pgsql2shp 2.4.4** (ubuntu 18.10 package)\\
The exported shapefile has 7070 rows (as the number of rows with not null
geometry in original table), but apparently they are the ''first'' 7070
rows, some rows with not null geometry are missing.\\
All is working correctly if I use a "where geom is not null" clause.
**pgsql2shp 2.5.0** (package from apt.postgresql.org in ubuntu 18.04)\\
Segmentation fault\\
All is working correctly if I use a "where geom is not null" clause.
**pgsql2shp 3.0.0 trunk from svn**\\
Segmentation fault\\
{{{
Program received signal SIGSEGV, Segmentation fault.
geometry_type_from_string (str=0x5555557d21f8 "",
type=type at entry=0x7fffffffd9bb "", z=z at entry=0x7fffffffd9bc,
m=m at entry=0x7fffffffd9bc) at g_util.c:203
203 tmpstr[i - tmpstartpos] = dump_toupper(str[i]);
}}}
All is working correctly if I use a "where geom is not null" clause.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4209>
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