Skip to main content
Solved

M dimension

  • September 12, 2024
  • 7 replies
  • 62 views

nath
Contributor
Forum|alt.badge.img+6
  • Contributor

Hi, 

I created a shapefile with line segments (roads).  This shapefile has to be loaded into a postgis database and the person who has to do that sends me that she gets this error 

 

ERROR:  Column has M dimension but geometry does not

CONTEXT:  COPY tmp_shp_crab_wegsegment, line 1, column geom: "01050000208A7A00000100000001020000000700000000F3BE9F41600A4180690B0048FD0941005FDD2623600A41008F7F97..."

I did some searching on the forum and found some things like the Measure remover, and I also set the output dimension to 2D in the writer but she says she still gets it. 

Does anyone know what else it could be due to? 

Thx!

Nathalie

 

Best answer by bwn

Use MeasureGenerator?  Will give something maybe at least useful in the database of having M = Chainage Length along the road segment.

View original
Did this help you find an answer to your question?

7 replies

todd_davis
Influencer
Forum|alt.badge.img+22
  • Influencer
  • September 12, 2024

Hi,

That error message from their end sounds like they need a measure, and your data doesn’t have it. So rather than trying to remove a measure, you need to add the measure. You will need to make sure you have measures in the FME process and also will be stored in the output featuretype.

 


nath
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • September 12, 2024

That was what I also thought at first but she said the opposite and since she is the database speciaist, I did not contradict :-)

Any idea how I add this? Now it only contains 2D data. 


todd_davis
Influencer
Forum|alt.badge.img+22
  • Influencer
  • September 12, 2024

You might be able to get away with just setting the “output dimensions” on the shapefile and not actually creating values:

 


nath
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • September 12, 2024

Unfortunately, that did not work.  If I load the  result back in and I put a measure extractor on it then everything is rejected.  

So looking for a way to add the M dimension. 


todd_davis
Influencer
Forum|alt.badge.img+22
  • Influencer
  • September 12, 2024

Okay, use the MeasureSetter and set the start of the line to 0 (vertex 0 to 0), and another to set the end of the line to the geometry length (vertex -1 to length of the line).  That will at least get a measure on it. Of course, you might have proper measure values to use, stored in an attribute, but logic can be basically the same.

 

If you want to make sure every vertex has a measure, then throw the measureinterpolator on at the end.


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • Best Answer
  • September 12, 2024

Use MeasureGenerator?  Will give something maybe at least useful in the database of having M = Chainage Length along the road segment.


nath
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • September 12, 2024

It worked! Thx everybody


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings