Geo referencing

Read, extract and store the geo reference of a model version, and set the alignment matrix, from JavaScript, Java and the OpenAPI.

A Geo reference is stored per model Version: latitude, longitude, elevation, rotation and the EPSG code they are expressed in, plus the anchor point, the point of the model the coordinates refer to. BIM.works keeps it as metadata, next to the IFC file, and the viewer uses it to place models in GEO mode (Geo mode). An Alignment is a different thing: a 4×4 matrix on the version that moves the model relative to the others, in any mode.

The JavaScript SDK has the full set of calls under client.gis (Gis); the Java SDK's GisApi (GisApi) has get, set and extraction by EPSG code; the OpenAPI exposes the stored geo reference through the version (GetVersion) and has no operation to change it. The guides:

Pages#

  • Get the geo referenceRead the geo reference stored on a version, in WGS84 or converted to another EPSG system, from JavaScript, Java or the OpenAPI, and detect a model that has none.
  • Extract a geo reference from an EPSG code or WKTDerive a geo reference from the coordinates in the model, given the CRS they are in as an EPSG code or a WKT definition, or from IfcSite and IfcMapConversion; nothing is stored until you set it.
  • Get the footprintGet the outline of a model on the ground with BQL — the projection, its smallest rectangle or a slice at a height — as GeoJSON or WKT in WGS84, placed by the version's geo reference, and draw it on a map.
  • Set the geo referenceStore a geo reference and its anchor point on a version from JavaScript or Java, and refresh the loaded model in the viewer.
  • Set the alignmentStore, read and clear the 4×4 alignment matrix of a version, and let the server compute one from point pairs.