开发者

How to update multipoint in postgis?

CREATE TABLE geo ( geo_id INTEGER, ); SELECT AddGeometryColumn( 'geo', 'geo_geom', -1, 'GEOMETRY', 4 );

INSERT INTO geo (geo_id, geo_geom) VALUES (1,ST_GeomFromText('MULTIPOINT(1 2 3 4,5 6 7 8)',-1));

update geo set geo_geom=st_union(geo_geom,ST_开发者_高级运维GeomFromText('MULTIPOINT(1 2 3 4,5 6 7 8)',-1)) where geo_id=0;

but it doesnt work: violates dimms.

Thanks


After a few too fast answers, edited away :-)

The problem here is that ST_Union only unions 2 dimensions. It passes the third dimension without including it in the calculation and ignores the fourth (the m-value) dimension.

The result is that the return from your union-operation is in 3 dimensions and therefor violates the 4 dimension constraint.

/Nicklas

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜