Solved

How to do you determine tagset offset for linestrings when writing to Microstation DGN file?

  • 25 March 2021
  • 1 reply
  • 0 views

Badge +1

Hi, I would like to write tagsets for linestrings with display set to 'yes' out to a Microstation DGN file with the bottom-left corner of the tagset being located at the start of the linestring.

 

When I write the tagset with offset set to 0, some of the tagsets appear at the beginning of the linestring, but some of them appear in seemingly random places. I'm assuming this is related to the radius of the curve of the particular linestring.

 

I have tried following the advice in this article (https://community.safe.com/s/article/writing-microstation-dgn-tags-with-fme) and using a CenterPointExtractor followed by a CoordinateExtractor, followed by an ExpressionEvaluator, but this doesn't put the tagsets in the correct place. I'm wondering if this is because this method only works for polygons and not linestrings?

 

Does anyone know how to calculate the offset of tagsets for linestrings so they are placed at the start of the line?

 

I guess in other words, where does FME put the tagsets for linestrings by default? If I know how FME places them initially I can work out how to offset them back to the start of the line,

 

icon

Best answer by aquamarine 26 March 2021, 18:14

View original

1 reply

Badge +1

I found the answer myself! I realised that the tagsets for linestrings are placed in the bottom left-hand corner of the linestrings' bounding box. So by adding a BoundsExtractor (keeping only the xmin and ymin attributes) followed by a CoordinateExtractor to extract the starting x and y coords, and then subtracting the xmin from the start x and the y min from the start y using Expression Evaluators, you get the offset value!

Reply