mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Update XYZ <-> ENH geolocation conversion after the clarifications made on how to handle scale in IFC4X3
This commit is contained in:
@@ -31,10 +31,7 @@ class TestEditGeoreferencing(test.bootstrap.IFC4):
|
||||
ifcopenshell.api.georeference.edit_georeferencing(
|
||||
self.file,
|
||||
projected_crs={"Name": "EPSG:7856"},
|
||||
map_conversion={
|
||||
"Eastings": 123.45,
|
||||
"Northings": 234.56,
|
||||
},
|
||||
map_conversion={"Eastings": 123.45, "Northings": 234.56},
|
||||
)
|
||||
crs = self.file.by_type("IfcProjectedCRS")[0]
|
||||
assert crs.Name == "EPSG:7856"
|
||||
@@ -47,9 +44,9 @@ class TestEditGeoreferencing(test.bootstrap.IFC4):
|
||||
model = ifcopenshell.api.context.add_context(self.file, "Model")
|
||||
plan = ifcopenshell.api.context.add_context(self.file, "Plan")
|
||||
ifcopenshell.api.georeference.add_georeferencing(self.file)
|
||||
ifcopenshell.api.georeference.edit_georeferencing(self.file, true_north=[0., 1.])
|
||||
assert model.TrueNorth[0] == (0., 1., 0.)
|
||||
assert plan.TrueNorth[0] == (0., 1.)
|
||||
ifcopenshell.api.georeference.edit_georeferencing(self.file, true_north=[0.0, 1.0])
|
||||
assert model.TrueNorth[0] == (0.0, 1.0, 0.0)
|
||||
assert plan.TrueNorth[0] == (0.0, 1.0)
|
||||
|
||||
|
||||
class TestEditGeoreferencingIFC2X3(test.bootstrap.IFC2X3):
|
||||
@@ -59,10 +56,7 @@ class TestEditGeoreferencingIFC2X3(test.bootstrap.IFC2X3):
|
||||
ifcopenshell.api.georeference.edit_georeferencing(
|
||||
self.file,
|
||||
projected_crs={"Name": "EPSG:7856"},
|
||||
map_conversion={
|
||||
"Eastings": 123.45,
|
||||
"Northings": 234.56,
|
||||
},
|
||||
map_conversion={"Eastings": 123.45, "Northings": 234.56},
|
||||
)
|
||||
conversion = ifcopenshell.util.element.get_pset(project, "ePSet_MapConversion", verbose=True)
|
||||
crs = ifcopenshell.util.element.get_pset(project, "ePSet_ProjectedCRS", verbose=True)
|
||||
|
||||
Reference in New Issue
Block a user