Dear PostGIS developers
After having changed the field size from 10 to 8 everything works fine
as expected.
This means that the comment in file pgsql2shp.c, lines 2730,2731 is not
accurate anymore.
The attached diff is against the current SVN.
Best regards,
Peter Hopfgartner and Sergio Segala
R3 GIS
http://www.r3-gis.com
Peter Hopfgartner wrote:
Dear mailing list members,
we had some problems when editing shape files containing dates
generated with pgsql2shp. In particular, editing these files with
ArcGIS and some OS desptop GIS (QGIS or OpenJump, sorry I can't
remember exactly) the attributes where shifted by some white spaces.
Looking at the files generated with pgsql2shp, we noted that a length
of 10 bytes is assigned to date fields (see also current the svn
snapshot, loader/pgsql2shp.c:2735,2736), in apparent contrast with the
dbf file format specification
(http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm), which
specifies that these field are 8 bytes long.
Best regards,
Peter Hopfgartner and Sergio Segala
R3 GIS
http://www.r3-gis.com
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Index: pgsql2shp.c
===================================================================
--- pgsql2shp.c (revision 2761)
+++ pgsql2shp.c (working copy)
@@ -2727,13 +2727,12 @@
}
/*
- * Date field, which we store as a string so we need
- * more width in the column
+ * Date field
*/
if(type == 1082)
{
if ( DBFAddField(dbf, field_name, FTDate,
- 10, 0) == -1 )
+ 8, 0) == -1 )
{
printf( "Error - Date field could not "
"be created.\n");
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users