Subject: | Wrong bounding box definition |
Date: | Wed, 1 Aug 2012 16:10:36 +0200 |
To: | bug-Geo-Shapefile-Writer [...] rt.cpan.org |
From: | gunnar roger <trash.yomgui [...] gmail.com> |
Hi,
I've been using your module, it's simple and easy to use.
But the xmin xmax ymin ymax are not placed at the correct bytes positions
in the .shp header.
the code is currently:
my @header_fields = (
[ 0, 'N', undef, 9994 ], # magic
[ 24, 'N', _SIZE => $header_size / 2 ], # file size in 16-bit words
[ 28, 'L', undef, 1000 ], # version
[ 32, 'L', 'TYPE' ],
[ 36, 'd', 'XMIN' ],
[ 40, 'd', 'YMIN' ],
[ 44, 'd', 'XMAX' ],
[ 48, 'd', 'YMAX' ],
);
and it should be (according to ESRI shape file description):
my @header_fields = (
[ 0, 'N', undef, 9994 ], # magic
[ 24, 'N', _SIZE => $header_size / 2 ], # file size in 16-bit words
[ 28, 'L', undef, 1000 ], # version
[ 32, 'L', 'TYPE' ],
[ 36, 'd', 'XMIN' ],
[ 44, 'd', 'YMIN' ],
[ 52, 'd', 'XMAX' ],
[ 60, 'd', 'YMAX' ],
);
Best regards,
Guillaume Roger