Migrate import geolocation to util module

This commit is contained in:
Dion Moult
2020-07-10 12:00:54 +10:00
parent e781dbd789
commit 2132706c6e
@@ -1,5 +1,6 @@
import ifcopenshell
import ifcopenshell.geom
import ifcopenshell.util.geolocation
import ifcopenshell.util.selector
import bpy
import bmesh
@@ -1575,14 +1576,9 @@ class IfcImporter():
def cast_edge_case_attribute(self, ifc_class, key, value):
if key == 'RefLatitude' or key == 'RefLongitude':
return self.dms2dd(*value)
return ifcopenshell.util.geolocation.dms2dd(*value)
return value
# TODO: migrate to ifcopenshell.util
def dms2dd(self, degrees, minutes, seconds, milliseconds=0):
dd = float(degrees) + float(minutes)/60 + float(seconds)/(3600)
return dd
def add_element_classifications(self, element, obj):
if not element.HasAssociations:
return