Skip to main content
Question

In need of igds_rotation clarification.


drejkzet

Hello everyone.

I am storing dgn v8 files into postgis database and I am getting confused by igds_rotation attribute.

I know what it represents, however the value itself is the part I do not understand. Browsing through documentation I get that

"The rotation is measured in degrees counterclockwise up from horizontal"

and

"Range: -360.0..360.0"

 

Which basically means (correct me if I am wrong) that counterclockwise rotation is [0,360] and clockwise rotation is [0, -360].

I need rotation to always be > 0, therefore I need to normalise the value.

Now, I want to convert for example -60° to 300°, which is basically adding 360 to negative angle value.

When I inspect the features, I see that the correct rotation behavior is when I add 180 to fme_rotation, not 360 which is not what I would expect.

Can someone please explain why FME behaves this way (FME 2017.0). or am I just missing something?

Thanks in advance,

Radek

5 replies

Forum|alt.badge.img

Hi @drejkzet

are you working with texts? It looks like the igds_rotation description is a bit confusing. In Microstation, the rotation angles are indeed measured from horizontal, i.e. a line placed with Angle = 0 is a horizontal line. However, a text with Angle = 0 is a not rotated text, i.e. an upright text. This makes sense if you think about the text insert point and its vector.

The +360 vs. +180... what is the correct behaviour that you expect? Could you maybe share a screenshot with some geometries and notes regarding what you get vs. what you expect?


drejkzet
  • Author
  • April 12, 2018
lenaatsafe wrote:

Hi @drejkzet

are you working with texts? It looks like the igds_rotation description is a bit confusing. In Microstation, the rotation angles are indeed measured from horizontal, i.e. a line placed with Angle = 0 is a horizontal line. However, a text with Angle = 0 is a not rotated text, i.e. an upright text. This makes sense if you think about the text insert point and its vector.

The +360 vs. +180... what is the correct behaviour that you expect? Could you maybe share a screenshot with some geometries and notes regarding what you get vs. what you expect?

Hello. What I expect is, if I have -60° rotation, after I add 360° to that rotation, I expect to get 300°. If I do this calculation on a regular attribute, I get this value just fine, however when I try this math in fme_rotation or igds_rotation attribute, it suddenly behaves differently (as you can see in those two screenshots I have posted) - I have to add 180° and not 360° to get the positive angle value.

 

 


Forum|alt.badge.img
drejkzet wrote:
Hello. What I expect is, if I have -60° rotation, after I add 360° to that rotation, I expect to get 300°. If I do this calculation on a regular attribute, I get this value just fine, however when I try this math in fme_rotation or igds_rotation attribute, it suddenly behaves differently (as you can see in those two screenshots I have posted) - I have to add 180° and not 360° to get the positive angle value.

 

 

Could you please post a screenshot where we would see the original igds_rotation and the calcuated one (with e.g. 360 added)?

 

 


Forum|alt.badge.img
  • September 13, 2018
Hi @drejkzet

 

one of our lead developers noticed this discussion and explained to me what was happening with your data.

 

Apparently, igds_rotation is an alias for fme_rotation. I.e. in step 3 and 4 you add 180 and then another 180 to the same value. This is why at the end both - fme_rotation and igds_rotation - are equal to test2 and not test1 as we both expected.

 

How would you know that igds_rotation is an alias for fme_rotation? You can't see this easily in Data Inspector. However, if you log the feature, the log will provide some helpful additional info:

 

 

To log the feature please either use Logger in your workspace or select the feature in Data Inspector and RightClick on it in Feature Info panel > Log Feature Information.

 

I hope this solves the mystery.

 

 

 


Forum|alt.badge.img
  • September 13, 2018
drejkzet wrote:
Hello. What I expect is, if I have -60° rotation, after I add 360° to that rotation, I expect to get 300°. If I do this calculation on a regular attribute, I get this value just fine, however when I try this math in fme_rotation or igds_rotation attribute, it suddenly behaves differently (as you can see in those two screenshots I have posted) - I have to add 180° and not 360° to get the positive angle value.

 

 

Hi @drejkzet

 

one of our lead developers noticed this discussion and explained to me what was happening with your data.

 

Apparently, igds_rotation is an alias for fme_rotation. I.e. in step 3 and 4 you add 180 and then another 180 to the same value. This is why at the end both - fme_rotation and igds_rotation - are equal to test2 and not test1 as we both expected.

 

How would you know that igds_rotation is an alias for fme_rotation? You can't see this easily in Data Inspector. However, if you log the feature, the log will provide some helpful additional info:

 

 

To log the feature please either use Logger in your workspace or select the feature in Data Inspector and RightClick on it in Feature Info panel > Log Feature Information.

 

I hope this solves the mystery.

 

 

 


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