[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-user
Subject:    Re: [GRASS-user] v.in.ogr with postgis layer
From:       Moritz Lennert <mlennert () club ! worldonline ! be>
Date:       2012-11-30 10:08:14
Message-ID: 50B8858E.5060700 () club ! worldonline ! be
[Download RAW message or body]

On 29/11/12 13:49, Marco wrote:
> Hi to all,
> I've a postgis table named *map_points_pluvio*, having these fields:
>
> id_stazione: integer;
> valore: numeric;
> the_geom: postgis geometric type;
>
> when I run the v.in.ogr command to import data into grass
>
> v.in.ogr --overwrite dsn="..." output=map_points_pluvio_grass
> layer=map_points_pluvio
>
> the new postgis table *map_points_pluvio_grass* is created as
> expected, but it has the following structure:
>
> cat: integer;
> id_stazione: integer;
> valore: integer;
>
> As you can see, the data type of the field *valore* is integer not
> numeric as it was in origin.
> Where am I wrong?

If the numeric type is defined with precision=0 then it is treated as an 
integer.

I just did a test (in grass6.4.2 and grass7) with a table containing the 
following fields:

test_num numeric(10,3)
test_double double precision
test_num0 numeric(10,0)

test_num and test_double get imported as double precision, test_num0 
gets imported as integer.

Moritz
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic