Skip to content

Transforming Linearly Located iModels #264

@DanRod1999

Description

@DanRod1999

Transforming iModels with differing Geo locations

iModels can be geo located 2 ways

  • Linearly
  • Non linearly (also referred to as projected)

Transforming linearly located iModels

Requirements for transforming linear imodels

  • A linearly located imodel is an imodel that contains only ECEF geo location data, which means it’s ecefLocation property is not null.
    • The imodel’s Geographic coordinate system property must be null.
    • All imodels should contain ecef data, however the presence of GCS data will cause the iModel to be non linear.
    • More info on about geo location in iModels can be read here

Result of transforming linear iModels

  • When using the transformer to clone one iModel into another, the target/destination iModel’s ECEF location will be preserved.
    • This also means the target iModel's elements placement will be unchanged.
  • The spatial elements from the source iModel being cloned into the target must change their placement in order to reflect the new ECEF origin that is being used

Graphical Example

Pre Transform:

  • Pre transform we have 2 ECEF values, and one spatial point from the source iModel. That spatial element is a position (0,1) in relation to its ECEF value, which has a real world placement of (2,2)
Image

Post Transform (do not account for ecef change):

  • If we do not account for the change in ECEF the spatial point's location does not change. Therefore, in relation to its new ecef, the point remains at point (1,0) (and in this case it's real world position is also (0,1)).
Image

Post Transform (account for ecef change):

  • When properly taking into account for the change in ECEF, we see that the spatial point is now in its correct real world position at (2,3) (and in this case the spatial point is also (2,3))
Image

How the placement is adjusted

spatialPoint = cartesian coordinate [x,y,z]
srcT = converts spatial location to ECEF location
targetT = converts spatial location to ECEF location

ecefTransform = targetT $^{-1} \times$ srcT
Corrected spatial point = spatialPoint $\times$ ecefT

    const srcSpatialToECEF = srcEcefLoc.getTransform(); // converts relative to ECEF in relation to source
    const targetECEFToSpatial = targetEcefLoc.getTransform().inverse(); // converts ECEF to relative in relation to target
    const ecefTransform =
      targetECEFToSpatial.multiplyTransformTransform(srcSpatialToECEF); // chain both transforms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions