Hello,

I have a table with a geometry column which the AddGeometryColumn stored procedure has created a check constraint like so:
Check constraints:
   "enforce_dims_coordinate" CHECK (ndims(coordinate) = 0)

So, this uses the internal function "ndims" to check the dimensionality of the input coordinate.

However, I'm getting a discrepancy when inserting a point into this column since ndims and st_dimensions are returning conflicting (apparently) values:

rover=# select * from st_dimension( ST_GeomFromText('POINT(1 1)'));
st_dimension
--------------
           0
(1 row)

rover=# select * from ndims( ST_GeomFromText('POINT(1 1)'));
ndims
-------
    2
(1 row)

It seems that the ndims function returns only 2, 3, or 4; can someone please explain why the differing values and how to insert data into a point-type geometry column (seems to work fine with polygon) without crossing the check constraint?

Thanks,
Ed


_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to