Solved

How write a DWG (Auto CAD) file with coordinate system?

  • 21 March 2024
  • 9 replies
  • 110 views

Badge +1

I have a DWG file with unknown CS but I know the CS it just needs to be assigned to the DWG. When I set the CS when I read the DWG then it appears in the correct location on the Earth but once I try to write it, it doesnt write the CS info and it appears again in the false location on Earth! I also tried “CoordinateSystemSetter” but with no success. On FME it appears good while transforming but not in the resulting DWG. Any Idea?

icon

Best answer by jovitaatsafe 28 March 2024, 22:56

View original

9 replies

Userlevel 6
Badge +33

How did you check if it worked? In AutoCad? When using the CoordinateSystemSetter, the actual coordinates do not change.

Badge +1

I inspected it directly in FME in the resulting dwg which still has missing CS and it appears middle in the ocean. With the  CoordinateSystemSetter I am trying only to set the missing CS and at this point data looks good only when writing it doesnt keep this attribute of the CS.

Userlevel 3
Badge +13

Hello @kushtrim, thanks for posting! Are you able to share the version/build of FME Form being used? When you view the cache of the CoordinateSystemSetter in the workspace, is data in the correct location? 

Have you tried using one of the reprojector transformers (eg. CSMapReprojector) instead of a CoordinateSystemSetter, and have FME Form try and guess the source coordinate system? 

Alternatively, what if we try removing the source coordinate system with a CoordinateSystemRemover, before setting it? 

Please let me know if any of these suggestions work for you, or if we still are unable to write data to a coordinate system. Happy to help, Kailin.

Badge +1

Hello @kailinatsafe thank you for the answer. I am using “FME(R) 2023.2.1.0 (20240104 - Build 23774 - WIN64)”.

The cache of the CoordinateSystemSetter looks good and in the correct location.

I tried  CSMapReprojector and “EsriReprojector” but without success.

I didnt try “CoordinateSystemRemover” because there is no CS at all! When I insert my data it comes automatically “unknown” for the CS.

Userlevel 3
Badge +13

Hello @kushtrim, would you mind testing one more thing please? I wonder if we need to use multiple transformers to sequentially assign a CS. First, use the CoordinateSystemSetter to give the dataset a reference to the desired coordinate system, and then use a CSMapReprojector after to actually apply the projection. 

So, to summarize, set the CoordinateSystemSetter and the CSMapReprojector to your target coordinate system, and then write out the data. Please feel free to reach out again if this does not resolve the issue! Kailin. 

Userlevel 1
Badge +11

Hi @kushtrim, in addition to setting the coordinate system in your workspace, can you confirm that you’ve set a coordinate system storage method on the AutoCAD DWG writer?

By default, this parameter is unchecked so you’ll want to go into the Advanced settings and pick a storage method for ‘Coordinate System Storage’:

 

There are a few more details in our DWG Writer documentation here on what these options do.

Badge +1

Hello @jovitaatsafe this parameter did the job “Coordinate System Storage”. Thank you very much for your response.

Userlevel 6
Badge +33

Learned something new today :) thanks!

Badge +1

Hello @kushtrim, would you mind testing one more thing please? I wonder if we need to use multiple transformers to sequentially assign a CS. First, use the CoordinateSystemSetter to give the dataset a reference to the desired coordinate system, and then use a CSMapReprojector after to actually apply the projection. 

So, to summarize, set the CoordinateSystemSetter and the CSMapReprojector to your target coordinate system, and then write out the data. Please feel free to reach out again if this does not resolve the issue! Kailin. 

Hello @kailinatsafe in addition to this, there is one more parameter needed to be set in the DWG Writer as @jovitaatsafe mentioned on her response. I somehow missed this “detail”! Thank you very much for your response.

Reply