2017-04-25 29 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。

相關問題