buildingSMART / buildingSMART/IFC4.x-development

`IfcRigidOperation` - Which x,y,z?

Open
#936 0 comments 0 reactions 0 assignees View on GitHub
before-NWI IF
Dominant language
Python
Stars
234
Forks
123
Avg merge
15h 4m
Merged PRs (30d)
5

Description

# State

https://github.com/buildingSMART/IFC4.3.x-development/blob/d5336fffa6be8eb5ed0fd94706a6be7e76757803/docs/schemas/resource/IfcRepresentationResource/Entities/IfcRigidOperation.md?plain=1#L3

I am particularly interested in the following:

> using lengths to translate along x,y,z

# Question

Where do `x,y,z` get their meaning? A clarification would be beneficial.

In my engineering naivety, I have always presumed: East would be the first coordinate (= `x`), North would be the second coordinate (= `y`).

https://github.com/buildingSMART/IFC4.3.x-development/blob/d5336fffa6be8eb5ed0fd94706a6be7e76757803/docs/schemas/resource/IfcRepresentationResource/Entities/IfcRigidOperation.md?plain=1#L12-L18

# Illustrative Example

Discussing with @arch1501, imagine the following scenario (leaving out the height CRS for brevity):

- the project is using DHDN / GK3 with EPSG:31467 as its CRS, thus `#1 = IFCPROJECTEDCRS('EPSG:31467', ... );`
- the project is an elongated structure (e.g. a road) and thus the whole geometry has to remain in CRS's context: `#2 = IFCRIGIDOPERATION(#.., #1, IFCLENGTHMEASURE(3400000.0), IFCLENGTHMEASURE(5200000.0), 0.0);`

Numbers are made up, but are within reasonable value range:

- in GK3, the "East" coordinate has values somewhere between 3.2-3.8 mio.
- for Germany, the "North" coordinate has values somewhere around 4-5 mio.

However, the `#2` above is incorrect (that is, the order of coordinates). Why? See the WKT 2.0 serialization of [EPSG:31467](https://epsg.io/31467) - pay special attention to the definition of the `CS`:

![Image](https://github.com/user-attachments/assets/c3e62477-d104-4516-b8bb-e8d2b663704b)

There are two fixes possible (for this exact scenario, I haven't checked if this is always possible).

## Change the order of coordinates

> `#2 = IFCRIGIDOPERATION(#.., #1, IFCLENGTHMEASURE(5200000.0), IFCLENGTHMEASURE(3400000.0), 0.0);`

## Change the used CRS, i.e. the EPSG code

In order to use the "wrong order" above, an alternative would be to change the EPSG code to [EPSG:5677](https://epsg.io/5677), which has the order of axes as expected:

![Image](https://github.com/user-attachments/assets/41e361dd-81d5-4fa6-9b35-ff095f4efc6a)

Note that such EPSG code with a reversed order of axes is not always available.

# Proposal for change

To provide at least a bit more clarity, add a sentence

> The `x,y,z` directions and thus the meaning of *FirstCoordinate* and *SecondCoordinate* are defined within the chosen `IfcProjectedCRS`.

(or similar).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.