[postgis-users] Invalid shapefile

Frank Koormann frank.koormann at intevation.de
Mon Apr 3 09:18:29 PDT 2006


* strk at refractions.net <strk at refractions.net> [060403 17:57]:
> Could you file a bug report here please ?
> http://postgis.refractions.net/bugs/
> 

So comment: The dbase format specification reserves 1 byte
for the field width per attribute. That results in 2^8 -1 = 255
characters at max. So varchar(256) can't work. Maybe data should 
be cut (and pgsql2shp raises a warning). 

Cheers,
        
        Frank

> --strk;
> 
> On Mon, Apr 03, 2006 at 08:31:28PM +1200, Simon O'Malley wrote:
> > Hi All
> > 
> > Not sure what is going on but pgsql2shp is creating an invalid shapefile.
> > 
> > table desc: cau
> > 
> > id bigint,
> > cau_desc varchar(256),
> > the_geom geometry
> > 
> > pgsql2shp db cau
> > 
> > The shape file is being created with cau_desc as a char(0), not sure if I
> > have missed something in the doco or not.

-- 
Frank Koormann                             <frank.koormann at intevation.de>
 Professional Service around Free Software       (http://intevation.net/)
 FreeGIS Project                                 (http://freegis.org/)



More information about the postgis-users mailing list