mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 13:28:19 +00:00
Migrate import geolocation to util module
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
import ifcopenshell.geom
|
import ifcopenshell.geom
|
||||||
|
import ifcopenshell.util.geolocation
|
||||||
import ifcopenshell.util.selector
|
import ifcopenshell.util.selector
|
||||||
import bpy
|
import bpy
|
||||||
import bmesh
|
import bmesh
|
||||||
@@ -1575,14 +1576,9 @@ class IfcImporter():
|
|||||||
|
|
||||||
def cast_edge_case_attribute(self, ifc_class, key, value):
|
def cast_edge_case_attribute(self, ifc_class, key, value):
|
||||||
if key == 'RefLatitude' or key == 'RefLongitude':
|
if key == 'RefLatitude' or key == 'RefLongitude':
|
||||||
return self.dms2dd(*value)
|
return ifcopenshell.util.geolocation.dms2dd(*value)
|
||||||
return 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):
|
def add_element_classifications(self, element, obj):
|
||||||
if not element.HasAssociations:
|
if not element.HasAssociations:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user