Hey first copy has a couple of options that you should check. Secondly find one correct tin as text, and check that you can use st_geomfromtext on this tin, to be sure it is correct. Then create a test file with only the found tin with correct encoding and end of line. You should be ok . Chers Rémi-c Le 4 juin 2015 21:53, "Hillier, Michael" <michael.hill...@nrcan-rncan.gc.ca> a écrit :
> Hello, > > > > I am trying to import a TIN surface into postgresql + postgis database > from a file via an SQL COPY command. > > > > First off, here is my table: > > > > CREATE TABLE tintable(id int4 primary key, geom geometry(TIN,4326)); > > > > Because the TIN data is too large (thousands of entries) I can not use > the command > > INSERT INTO tintable (id,geom) VALUES (1,ST_GeomFromText('TIN(((1 0,0 1,1 > 1,1 0)))',4326)); > > > > So I use the following: > > > > COPY tintable FROM 'C::\\users\\...' DELIMITERS '|' > > > > I have tried the following formats in the file I am trying to copy from: > > > > 1|(0 0,0 1,1 1,0 0) -> ERROR: parse error - invalid geometry HINT: "(0" > <-- parse error at position 2 within geometry > > > > 1|0 0,0 1,1 1,0 0 -> ERROR: Invalid hex string, length (15) has to be a > multiple of two! CONTEXT: COPY tintable, line 1, column geom: "0 0,0 1,1 > 1,0 0" > > > > 1|((0 0,0 1,1 1,0 0)) -> ERROR: parse error - invalid geometry HINT: > "((" <-- parse error at position 2 within geometry > > > > What is the correct file format so I can import TIN data using the command > "COPY tintable FROM 'C::\\users\\...' DELIMITERS '|' "? > > > > Thank you > _______________________________________________ > postgis-users mailing list > postgis-users@lists.osgeo.org > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >
_______________________________________________ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users