Skip to main content
Question

Assign writer coordinate system based on processed input data


jstanger
Forum|alt.badge.img+1

I'm required to export some spatial data to AutoCAD. The incoming data exists anywhere in Australia and the exported data needs to be in one of the MGA94 zones. The client refuses the suggestion that they select one of the possible 10 projection zones to correctly reproject the data and claims FME should be able to handle this automatically.

Is there a way to modify the AutoCAD writer coordinate system after the FME workspace has been launched (i.e. after I've started reading in data) so that I can correctly export to the zone that corresponds to the input data?

I can see one way if I can get a transformer to replace the value in a public or private parameter. Is this possible?

6 replies

david_r
Celebrity
  • October 18, 2016

You can leave the coordinate system blank on the Writer and use the CoordinateSystemSetter transformer instead. That way you can e.g. use a Tester on your coordinates to decide on which coordinate system to use.


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

You can leave the coordinate system blank on the Writer and use the CoordinateSystemSetter transformer instead. That way you can e.g. use a Tester on your coordinates to decide on which coordinate system to use.

Thanks David, what will happen if the data pushed to the writer is from multiple coordinate systems? Which coordinate system will the writer choose to reproject the other data to?

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

You can leave the coordinate system blank on the Writer and use the CoordinateSystemSetter transformer instead. That way you can e.g. use a Tester on your coordinates to decide on which coordinate system to use.

Or does all the data pushed to the writer then need to be explicitly reprojected to a single system before passed to the writer?

david_r
Celebrity
  • October 18, 2016
jstanger wrote:
Thanks David, what will happen if the data pushed to the writer is from multiple coordinate systems? Which coordinate system will the writer choose to reproject the other data to?
I would guess that the first feature to hit the writer will set the coordinate system.

 

I strongly suggest explicitely reprojecting everything to a single system before sending it to the writer, it will save you a lot a headaches.

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

The AutoCAD writer will use the coordinate system of the first feature in to determine the file coordinate system, and reproject all subsequent features to that coordinate system when writing.

Since FME does not currently write coordinate system information to the DWG file (although it can write a sidecar PRJ file), I think the best course would be to choose the output coordinate system using a Published Parameter, so you know exactly which coordinate system the DWG file will be in.


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

You can leave the coordinate system blank on the Writer and use the CoordinateSystemSetter transformer instead. That way you can e.g. use a Tester on your coordinates to decide on which coordinate system to use.

This looks to be the way to proceed. Just need to be careful to reproject all incoming geometry before further processing to ensure you have everything in the correct projection before export.

 

 


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