Skip to main content

Is there a way to take the data that is in an AutoCAD DWG paperspace and output it to TIFF / GeoTIFF keeping all the drawing settings from the DWG i.e. fonts, line weights etc. Basically I want to get an image that would be the same as if the DWG was printed from AutoCAD.

Hi @deanhowell Have a look at the MapnikRasterizer and the ImageRasterizer. MapnikRasterizer gives you more control of the styling etc.


Hi @deanhowell Have a look at the MapnikRasterizer and the ImageRasterizer. MapnikRasterizer gives you more control of the styling etc.

Thanks @sigtill, yes I have been looking at these but didn't really want to recreate the DWG as just wanted to include a 'print' with a validation report.


Thanks @sigtill, yes I have been looking at these but didn't really want to recreate the DWG as just wanted to include a 'print' with a validation report.

And I guess just using the ImageRasterizer does not give the same as a "print" ? The layer order and some drawing-rules (complex surfaces etc) does not apply? Is it possible to get a screenshot of parts of the DWG and the same area after an ImageRasterizer? @deanhowell


 

This is a snapshot from AutoCAD viewer but the colours and fonts are just defaults not as AutoCAD prints them out.

This is what it looks like in FME Data Inspector

 

And this is what the output needs to look like.

 

The output is in black and white so the line work is not a real issue but the text might be :)

 

I will play more with image rasteriser and see what I can achieve.


Hi @deanhowell Have a look at the MapnikRasterizer and the ImageRasterizer. MapnikRasterizer gives you more control of the styling etc.

Hello @sigtill, I have made some progress today in getting the TIFF to look similar to the original drawing.

 

MapnikRasterizer_2 - A3 (2).tif

I just need to get the font details, sizes and placement worked out and will be very close.

Thanks for your help :)


Hello @sigtill, I have made some progress today in getting the TIFF to look similar to the original drawing.

 

MapnikRasterizer_2 - A3 (2).tif

I just need to get the font details, sizes and placement worked out and will be very close.

Thanks for your help :)

Happy to hear @deanhowell

If the font is already in the DWG-file you can pick it up from an attribute.

If you want to select the font previously based on feature_type, layername, color etc then you can use an AttributeValueMapper to map the correct font first, and then select that attribute value in the mapnikrasterizer.

Good luck!


Reply