Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site coordinate system RefLatitude, RefLongitude, IfcCompoundPlaneAngleMeasure #7

Open
aahoo opened this issue Dec 30, 2016 · 4 comments

Comments

@aahoo
Copy link

aahoo commented Dec 30, 2016

I am a bit confused about the angular coordinate system used in IFC. I am interested in site location coordinates (RefLatitude, RefLongitude) which are of type IfcCompoundPlaneAngleMeasure.

This is similar to Degrees-Minutes-Seconds (DMS) unit commonly used in GIS. But as far as I know, minutes and seconds cannot be negative as you can see in this example table.

example

However, in IfcCompoundPlaneAngleMeasure, it allows negative numbers for minutes and seconds. I am trying to convert it to Degree Decimal format but I need to understand IFC's format first.

Here is the code I have written in Python which works for standard DMS coordinates.

def dms2dd(dms):
  sign = -1.0 if dms[0] < 0 else 1.0
  return dms[0] + sign * (dms[1]/60 + dms[2]/3600) # abs(dms[1]/60 + dms[2]/3600) fixes the issue
print(dms2dd([-75, 9, 18]))
output: -75.155
@aahoo
Copy link
Author

aahoo commented Dec 30, 2016

I found the answer for my question here

@kmcglinn
Copy link

The link you found the answer at is dead :(

@kmcglinn
Copy link

Should have looked at the link rather than just click on it, would have seen that myself then. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants