Skip to main content
Question

DWGstyler text height in native units


jstanger
Forum|alt.badge.img+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

itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • October 4, 2016

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

Hope this helps.


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • October 4, 2016

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.


jstanger
Forum|alt.badge.img+1
  • Author
  • October 10, 2016
daveatsafe wrote:

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.

jstanger
Forum|alt.badge.img+1
  • Author
  • October 10, 2016
itay wrote:

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.

 


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