[postgis-users] Shp2pgsql : Error in fread()

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon May 20 15:25:30 PDT 2013


On 20/05/13 13:23, Hugues François wrote:

> Hello,
>
> I have a big amount of data to import ins postgis from shapefile (18.000.000 of squares). As usual, I used shp2pgsql to do that with this command line : shp2pgsql -s 2154 -g geom -W LATIN1 -I /home/myhome/shpname myschema.shpname.
>
> But for each of my file (there are four of them) it throw me the same error :
> Error in fread() reading object of size 136 at offset 2147483756 from .shp file
> Error reading shape object 15790321
>
> In each of the four file the error happens to the same time / object.
>
> Where did I make a mistake and how can I correct it ?
>
> I found this related info : http://trac.osgeo.org/gdal/ticket/4203
>
> But the answer don't really help me to find any solution... Is anyone there having an idea please ?
>
> Hugues.

How large are your shapefiles and what version of PostGIS are you using? 
It looks as if you're trying to load a shapefile > 2GB on a platform 
that doesn't support it, so I'd suggest breaking down your data into 
more yet smaller shapefiles so that they stay under this limit.

You may find some information at 
http://trac.osgeo.org/postgis/ticket/393 helpful.


HTH,

Mark.


More information about the postgis-users mailing list