Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

250
Views
Cast geometry field as different type on insert?

How can I cast or otherwise insert field geom_one of type geometry(MultiLineString,4326) into field geom_two of type geometry(MultiLineStringZM,4326)?

When I attempt to insert using ST_Force_3D(geom_one), it produces the following error:

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

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

Note:ST_Force3D() is used for PostGIS 2.1 and newer.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You're using the wrong function,

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

What you want..

ST_Force4D — Force the geometries into XYZM mode.

MultiLineStringZM has a Z and an M dimension. That makes it 4D.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!