On Mon, 1 Jun 2009 07:40:28 +0200, Markus Neteler <[email protected]> wrote:
> On Mon, Jun 1, 2009 at 1:50 AM, Seb <[email protected]> wrote: >> On Mon, 01 Jun 2009 00:54:05 +0200, >> Nikos Alexandris <[email protected]> wrote: >> Seb: > ... >>> Not sure if this is a conflict with SQL commands, but you could try >>> to _feed_ new names for your columns by using the "cname=" paramater >>> of "v.in.ogr" and see what happens? >> I tried that but the problem remains. It seems as if there's >> problems importing such datetime columns. Thanks. > Can you please post cmd line and error? Here's what I get from v.in.db with a view that has a Postgis geometry column where the reprojection to the local GRASS location was done directly. This gives the same error message as what I saw with v.in.ogr, even after changing the column names with the 'cnames' argument: ---<--------------------cut here---------------start------------------->--- v.in.db driver=pg database="dbname=locations,port=5433" \ table=locs x='x(pts_aea)' y='y(pts_aea)' key=locid out=test --o > WARNING: Vector map <test> already exists and will be overwritten WARNING: pg driver: PostGIS column 'pts_ll', type 'geometry' will not be converted WARNING: pg driver: PostGIS column 'pts_aea', type 'geometry' will not be converted Writing features... Copying attributes... WARNING: pg driver: PostGIS column 'pts_ll', type 'geometry' will not be converted WARNING: pg driver: PostGIS column 'pts_aea', type 'geometry' will not be converted WARNING: Type TEXT converted to 'VARCHAR(250)' DBMI-DBF driver error: SQL parser error: syntax error, unexpected NAME processing 'datetime' in statement: create table test ( sample_id varchar(12), project varchar(500), species varchar(300), sex varchar(250), flipper_tag integer, date_time_deployed datetime, claw_marks integer, mass double precision, body_length double precision, girth double precision, fat_depth double precision, locid integer, prognum varchar(10), date_time datetime, class varchar(3), lon double precision, lat double precision ) Cannot create table WARNING: Unable to create table <Ðg¹> WARNING: Unable to copy table Building topology for vector map <test>... Registering primitives... 1311 primitives registered 1311 vertices registered Building areas... 0 areas built 0 isles built Attaching islands... Attaching centroids... Number of nodes: 976 Number of primitives: 1311 Number of points: 1311 Number of lines: 0 Number of boundaries: 0 Number of centroids: 0 Number of areas: 0 Number of isles: 0 v.in.db complete. 1311 points written to vector map. ---<--------------------cut here---------------end--------------------->--- -- Seb _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
