2017-04-25 100 views
1

如何将类型geometry(MultiLineString,4326)的字段geom_one转换成geometry(MultiLineStringZM,4326)类型的字段geom_two将插入几何字段投射到不同的类型?

当我尝试使用ST_Force_3D(geom_one)插入,它产生以下错误:

ERROR: Column has M dimension but geometry does not 
********** Error ********** 
ERROR: Column has M dimension but geometry does not 
------------------------------------------------------------------------ 

SQL state: 22023 
------------------------------------------------------------------------ 

注:ST_Force3D()用于PostGIS的2.1和更高版本。

回答

1

你使用了错误的功能,

ST_Force3D Force the geometries into XYZ mode. This is an alias for ST_Force3DZ.

你想要什么..

ST_Force4D — Force the geometries into XYZM mode.

MultiLineStringZMZM尺寸。这使它成为4D。