IndustryFoundationClasses / Questions

Have a question about IFCs? Ask here. Use Github Issues.
20 stars 4 forks source link

Site coordinate system RefLatitude, RefLongitude, IfcCompoundPlaneAngleMeasure #7

Open aahoo opened 7 years ago

aahoo commented 7 years ago

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 commented 7 years ago

I found the answer for my question here

kmcglinn commented 4 years ago

The link you found the answer at is dead :(

I-Sokolov commented 4 years ago

Documentation was moved to https://technical.buildingsmart.org/standards/ifc/ifc-schema-specifications/

https://standards.buildingsmart.org/IFC/RELEASE/IFC4_1/FINAL/HTML/link/ifccompoundplaneanglemeasure.htm

kmcglinn commented 4 years ago

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