[Qgis-developer] [Fwd: Re: [postgis-users] Integer (PostGIS) fields
become real in QGIS!]
cavallini at faunalia.it
Wed Nov 26 11:58:31 EST 2008
All the best.
-------- Messaggio Originale --------
Oggetto: Re: [postgis-users] Integer (PostGIS) fields become real in QGIS!
Data: Wed, 26 Nov 2008 08:47:09 -0800
Da: Paul Ramsey <pramsey at cleverelephant.ca>
Tell the QGIS developers to expand their notion of an int to 11
digits. The whole problem is the mismatch between formal typing in
C/C++ (integer, float, double) and the "typing" used in DBF headers
(number(n,m)). QGIS interprets anything over 10 digits as float so
that it doesn't accidentally bust an integer register trying to load
10B into an int. The reason PostGIS uses 11 digits is because valid
*negative* integers, like -1B require 11 digits.
On Wed, Nov 26, 2008 at 7:01 AM, Vito Meuli
<v.meuli at tecnologieavanzate.it> wrote:
> I'm using shapefile exported from PostGIS using pgsql2shp.
> But QGIS takes the integer fields as they were real!
> I've tryed different version of PostGIS, and something changed: integer=int4
> become a 16 digit precision in a shapefile exported using PostGIS 1.0.6, and
> a 11 digit precision using PostGIS 1.3.3...
> What a pity, it seems that an integer remains an integer if it is 10 digit
> It's not better if I use smallint instead of int4: pgsql2shp acts the same
> If I export shapefiles from PostGIS using QGIS directly, all goes well and the
> int4 remain integer.
> Is there some other way to extract shapefile using a shell (Linux) script and
> letting them have integer fields of 10 digit precision?
postgis-users mailing list
postgis-users at postgis.refractions.net
Paolo Cavallini, see: * http://www.faunalia.it/pc *
More information about the Qgis-developer