[postgis-tickets] [PostGIS] #2850: Preserve scale and precision when generating shape file with pgsql2shp
PostGIS
trac at osgeo.org
Fri Jul 25 06:49:40 PDT 2014
#2850: Preserve scale and precision when generating shape file with pgsql2shp
---------------------------+------------------------------------------------
Reporter: hopfgartner | Owner: mcayland
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS 2.2.0
Component: loader/dumper | Version: 2.1.x
Keywords: pgsql2shp |
---------------------------+------------------------------------------------
Comment(by strk):
Changing the code with this:
{{{
+ else if (pgfieldtype == 1700)
+ {
+ if (pgfieldscale == 0)
+ dbffieldtype = FTInteger;
+ else
+ dbffieldtype = FTDouble;
+
+ dbffieldsize = pgfieldprec;
+ if (pgfieldscale > 0) {
+ dbffieldsize += 2; /* the decimal digit
separator and terminating null ? */
+ }
+ dbffielddecs = pgfieldscale;
+ }
}}}
Seems to handle better a few cases.
Testcase needs to try a few combinations and values.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2850#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list