[postgis-devel] [postgis-users] shp2pgsql nulls

Sandro Santilli strk at keybit.net
Thu Sep 29 06:58:18 PDT 2011


[moved from -user to -devel]

On Thu, Sep 29, 2011 at 12:00:56PM +0100, Mark Cave-Ayland wrote:
> On 28/09/11 17:11, Andy Colson wrote:
> 
> >Hi List,
> >
> >I have a shapefile and using ogr2ogr to reproject it, then shp2pgsql to
> >import it, but a date column has nulls in it and I'm getting invalid
> >date errors. If I dont use ogr2ogr the nulls import fine (the dest table
> >has nulls as well).
> >
> >It looks like ogr2ogr is using a newer version of shapelib and is
> >writing null fields a little bit differently? (I'm guessing here.) Would
> >it be possible to update shp2pgsql to a newer version of shapelib?
> >
> >-Andy
> 
> Hi Andy,
> 
> I think we'd need to have an example shapefile with a small sample
> of geometries to understand what's going on here. Also you didn't
> mention which version of shp2psql you are using, as there has been a
> lot of work done there in recent times.

Nonetheless, updating to a newer version of shapelib might also fix
some uncheked return from system calls warned upon by newer GCC.

Beside, could it be time to link to the system library, if available ?

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list