Question

DWGstyler text height in native units

  • 4 October 2016
  • 4 replies
  • 8 views

Badge +1

So I'm using FME to output a large number of labels and geometries derived from a spatial source. My source data is in EPSG:4283 so I have found that I need to specify my text height in units relative to that coordinate system.

However, what I need to do is specify it to appear as 0.68 in AutoCAD internal units. What I have found happens is that no matter what universal scaling factor I try to calculate it seems to generate a different height that varies with rotation and position in the drawing (and often has precision rounding errors left as well, i.e. 0.67729834 vs 0.68). Is there a way to specify the text height directly rather than in terms of map units?

I have tried: Adjusting the height using a scaling factor in Labeller, applying a text height in the DWGstyler, using a font size in the DWGstyler


4 replies

Badge +16

Hi @jstanger, I would try to see if specifying the text height in a template file works.

Hope this helps.

Userlevel 2
Badge +17

If you want to specify the size of label in meters when writing out to a lat/long coordinate system, you can use FME's reprojector transformers to convert to a local coordinate system before labelling, then convert back to lat/long before writing to DWG.

If all your data is in a local area, you can use the CommonLocalReprojector transformer to reproject to custom local projection in meters. After labelling the features, use a Reprojector to reproject back to EPSG:4283. The labels will be scaled to fit the lat/long size at their particular location.

Badge +1

If you want to specify the size of label in meters when writing out to a lat/long coordinate system, you can use FME's reprojector transformers to convert to a local coordinate system before labelling, then convert back to lat/long before writing to DWG.

If all your data is in a local area, you can use the CommonLocalReprojector transformer to reproject to custom local projection in meters. After labelling the features, use a Reprojector to reproject back to EPSG:4283. The labels will be scaled to fit the lat/long size at their particular location.

Turned out the previous developer had set the AutoCAD writer to MGA94-54. Since the writer will automatically Reproject anything that doesn't match, simply Reprojecting before building the label allowed me to set the label size in meters without affecting the rest of the geometry pre-writing.

 

 

I did find that Reprojecting, create label, then Reprojecting back to EPSG:4283 worked but still resulted in small rounding errors.
Badge +1

Hi @jstanger, I would try to see if specifying the text height in a template file works.

Hope this helps.

Thanks for the idea, I didn't get to try it as the above solution appeared to work.

 

Reply