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

PR: When exporting, scale parameter is missing in georeferencing #784

Open
Moult opened this issue Jul 1, 2024 · 1 comment
Open

PR: When exporting, scale parameter is missing in georeferencing #784

Moult opened this issue Jul 1, 2024 · 1 comment
Labels
problem Something isn't working

Comments

@Moult
Copy link

Moult commented Jul 1, 2024

Problem Description

Here is a blank project in metric millimeters as the project unit. The coordinates at the PBP is 10,000mm and 20,000mm.

image

The projected CRS is EPSG:7856.

image

Revit will export this data in IFC:
Project2 - Copy.txt

#19=IFCSIUNIT(*,.LENGTHUNIT.,.MILLI.,.METRE.);
#97=IFCUNITASSIGNMENT((#19,#21,#22,#26,#27,#30,#31,#33,#34,#35,#37,#40,#42,#46,#47,#48,#49,#50,#51,#52,#53,#54,#55,#56,#61,#64,#66,#69,#70,#71,#72,#73,#74,#75,#76,#77,#79,#80,#81,#82,#83,#84,#85,#86,#88,#89,#91,#92,#94,#95,#96));
...
#105=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);
#106=IFCPROJECTEDCRS('EPSG:7856','Map Grid of Australia Zone 56, GDA2020 (7Parameter)','GDA2020-7P',$,$,$,#105);
#107=IFCMAPCONVERSION(#100,#106,20.000000000000004,10.000000000000002,0.,1.,6.1230317691118863E-17,$);
...

As you can see:

  1. Project units are in mm (good)
  2. Projected CRS defined (good)
  3. Projected CRS has a map unit of meters (sure)
  4. Map conversion has an easting and northings of 20 and 10 (in meters, good :) it matches the map unit which is great!)
  5. Map conversion has a null value for Scale (bug)

IFC states:

The scale factor can be used when the length unit for the 3 axes of the map coordinate system are not identical with the length unit established for this project (see IfcProject.UnitsInContext), if omitted, the scale factor 1.0 is assumed.

and repeats itself

Scale to be used, when the units of the CRS are not identical to the units of the engineering coordinate system. If omited, the value of 1.0 is assumed.

on the docs for IfcMapConversion

Because it is omitted, the value of 1.0 is assumed. But the units of the CRS (m) are not identical to the project units (mm). So this is not correct - there needs to be a value for scale.

According to this equation as you can see first we scale the project units XYZ then we add the eastings/northings. So the scale should be equal to 0.001 (to go from mm -> m, then we can add the eastings/northings in m).

(ignore the FactorXYZ that is for IfcMapConversionScaled but the general equation still applies)

image

Revit Version

2023.1.x

IFC for Revit Addon Version

24.x.x

Windows Version

11 22H2

@Moult Moult added the problem Something isn't working label Jul 1, 2024
@AngelVelezSosa
Copy link
Contributor

This looks like a likely oversight to add this scale - will add issue to address this shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants