Geographic Information Systems Asked on March 31, 2021
I’m trying to insert a shapefile into PostGIS using FME but I always get an error saying:
ERROR: Column has M dimention but geometry does not
CONTEXT: PL/pgSQL function debug.trig_fonc_force_geom_3d() line 6 at assignment
If I inspect the features in FME Data Inspector, the geometry info for the existing data in postGIS looks the same as the shapefile data, i.e.:
IFMELine (2 Coordinates)
Closed No
Measures (1) <default_measure>
Coordinates (2) Coordinate Dimension: 3
0 -3.432432, 40.23948723, 0, <0>
1 -3.238473, 40.42348234, 0, <0>
I have tried every combination of setting/removing Z and M values but it doesn’t make any difference. I’ve tried both Spatial Type options in the wirter (Geometry/Geography) – what can I do?
Note:
I’m inserting into an existing table containing geometry. When the table was empty I was able to use FME to insert one batch of data but now I’m getting this error.
The clue was in this line:
CONTEXT: PL/pgSQL function debug.trig_fonc_force_geom_3d() line 6 at assignment
There was a rogue trigger in the database which used ST_Force3D before inserting, which I guess knocked off the M-values - I changed this to ST_Force4D and I seem to be in business.
Correct answer by BTL on March 31, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP