[postgis-users] Linestring 3DM?

paallen at attglobal.net paallen at attglobal.net
Fri Mar 23 13:31:12 PDT 2007


Hi all,

I am very new with PostGIS and I am trying to
build a database to manage bore-holes for mineral
exploration.  

I want to store the curved 3d curved bore-hole
trace with the m (survey distances on the nodes)
values.   Is this possible.

My following experiment has fail.
CREATE TABLE public.line3d_test
     id integer,
     name varchar,
     CONSTRAINT line3d_test_id_pkey PRIMARY KEY (id);
SELECT AddGeometryColumn(’public’, ’line3d_test’,
’gline3dm’, 32618, ’LINESTRING’, 2);
INSERT INTO public.line3d_test (id, name,
gline3dm) VALUES ( 1, 'first-line',
GeomFromEWKT('LINESTRING(200000 900000 2000 0,
200001 900001 1900 100)', 32618));

If I use "GeomFromText" I get this error:
WARNING:  OGC WKT expected, EWKT provided - use
GeomFromEWKT() for this
CONTEXT:  SQL function "geomfromtext" statement 1

ERROR: new row for relation "line3d_test" violates
check constraint "enforce_dims_gline3dm"
SQL state: 23514

Then if I use "GeomFromEWKT()" I get this error:
ERROR: function geomfromewkt("unknown", integer)
does not exist
SQL state: 42883
Hint: No function matches the given name and
argument types. You may need to add explicit type
casts.
Character: 81

What I have I done wrong?  Or is this even
possible?  I know EWKT or EWKB is an extension of
OGC but I am working in 3D so I sort of need it.

thanks,

Phillip J. Allen
Consulting Geochemist

  




More information about the postgis-users mailing list