Skip to main content

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

 

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.

 


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. 


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

 


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. 


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.


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


It worked! Thx everybody


Reply