[postgis-users] Shp2pgsql : Error in fread()
Hugues François
hugues.francois at irstea.fr
Tue May 21 12:43:29 PDT 2013
Hello,
Thanks for your answer. It took me some times to reply because I tried to make test with spliting the shape file : it takes quite a long time to work with million of polygons.
If I'm not wrong, the ticket you linked to is about dbf size and has been fixed in 1.5.3. On my side, shp is effectively more than 2 Go but dbf file is near 1.5 Go and I work with postgis 2.0.1.
However, I tried to select the first 10.000.000'th rows and then the last ones within arcgis to export data as a new shapefile. Despite there was no error when I exported the data (or when I reopen it), this time I wasn't able to export the second part of the table further than I could import in postgis.
Finally, I don't know where the problem is exactly but I think it's on the arcgis side.
Hugues.
-----Message d'origine-----
De : postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-bounces at lists.osgeo.org] De la part de Mark Cave-Ayland
Envoyé : mardi 21 mai 2013 00:26
À : PostGIS Users Discussion
Objet : Re: [postgis-users] Shp2pgsql : Error in fread()
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.
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list