[postgis-devel] Patch: preserve scale and precision when in pgsql2shp

Peter Hopfgartner peter.hopfgartner at r3-gis.com
Mon Jul 21 08:51:03 PDT 2014

On 07/21/2014 05:09 PM, Sandro Santilli wrote:
> On Mon, Jul 21, 2014 at 04:51:27PM +0200, Peter Hopfgartner wrote:
>> Hi
>> This patch uses the precision and scale information from the
>> database server in order to write the shape file. The advantage is
>> twofold: a major control on the shape file format and less disk
>> space used when writing DECIMALs/NUMERICs which have a precision of
>> less then 32 digits.
>> The topic was in some way discussed in http://postgis.17.x6.nabble.com/Maintain-length-and-precision-for-numneric-fields-in-pgsql2shp-and-shp2pgsql-td3548722.html.
>> The  patch is against branch 1.5. If the approach is ok, I can
>> prepare a patch for trunk.
> Could you please include a testcase to go with the patch ?
> I'm not sure how it would look as if I recall correctly all current
> dumper tests are "round-trip" tests that start with loading, and
> are likely not checking the DBF at all. Maybe it would come as
> an extension to the run_test.pl script.
> Probably best to file a ticket on trac to deal with this, attaching
> this patch for a start: http://trac.osgeo.org/postgis/newticket
> --strk;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
Hi strk,

thanks for your quick reply. I've created 
http://trac.osgeo.org/postgis/ticket/2850. Test and porting to trunk 
will follow in the next days.



More information about the postgis-devel mailing list