Hi All, I'm trying to identify whether a coordinate system in DWG is set to a User Coordinate System (UCS) or a World Coordinate System (WCS). Essentially want to query this in a tester transformer. Thanks in advance for any help!
Identify whether a DWG Coordinate System is WCS or UCS?
Best answer by jovitaatsafe
Hi @tbarker1986,
From what I can see, FME seems to be reading the active coordinate system selection in the file (WCS or UCS).
At a glance, it looks like you might be able to use the Tester to check whether 'autocad_ucs_origin_x' AND 'autocad_ucs_origin_y' has a value other than 0. If it is a value other than 0, then it is likely set to UCS. I'm not too sure however if it'd be a common practice or not to set your UCS origin to 0,0, so this assumption might not be right. There's a few other autocad_ucs* attributes that may help you identify whether the file is set to UCS or not.
Otherwise, it might be possible to read the file in twice, once with the reader parameter 'Ignore User Coordinate System (UCS)' enabled and one with it off to compare the relevant attributes of a feature from each reader with something like a FeatureJoiner to determine what the file is set to. Hopefully that offers some ideas!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.