Why use a topocentric reference?

A 3D model, either a BIM model or a general purpose model, usually doesn’t contain georeferencing information. To work with such models in LuciadFusion and LuciadLightspeed you need to position them on the globe by providing a coordinate reference system.

A topocentric reference is a 3D Cartesian space with the XY-plane tangential to the Earth surface and the origin on a given lon-lat-height coordinate. In particular:

  • the X axis points east

  • the Y axis points north

  • the Z axis points up

  • One unit corresponds to one meter

With these properties, a topocentric reference is very well suited to georeference 3D models.

Using a reference file

A topocentric reference, like other references, can be described by the Well-Known Text (WKT) reference format. Typically, the reference is stored in a .prj file.

LuciadLightspeed and LuciadFusion will automatically use a reference file with the same name as the model. For example, if the file name of your model is mymodel.glb, you should name the reference file mymodel.prj and store this file in the same directory as your model. For more information on using reference files, you can read the article on How to specify the georeference of your data.

Use the Java API to create a topocentric file

Our API provides the TLcdTopocentricReference class to represent a topocentric reference. In addition, we provide the TLcdWKTModelReferenceEncoder to write the reference in WKT format in a .prj file. The following program shows an example of combining these:

Program: Write a topocentric WKT reference file
TLcdLonLatHeightPoint origin = new TLcdLonLatHeightPoint(4.669129, 50.865039, 64);
ILcdModelReference llhRef = new TLcdTopocentricReference(new TLcdGeodeticDatum(), origin);
new TLcdWKTModelReferenceEncoder().save(llhRef, "/path/to/myReference.prj");

The result is a new .prj file in WKT format at the specified location.

Create a topocentric reference file by hand

If you only have a few models to georeference, it can be easier to create a reference file manually.

You can use the following WKT template to create a topocentric reference. Replace the values of the latitude, longitude and height parameters as needed.

myReference.prj
ENGCRS["Topocentric reference",
  GEOGCS["WGS_1984",
    DATUM["WGS_1984",
      SPHEROID["WGS_1984",6378137.0,298.257223563],
      TOWGS84[0.0,0.0,0.0,0.0,0.0,0.0,0.0]]],
  DERIVINGCONVERSION["Origin position",
    METHOD["Geographic/topocentric conversions",AUTHORITY["EPSG",9837]],
    PARAMETER["Latitude of topocentric origin",50.865039,UNIT["DEGREE",0.017453292519943295]],
    PARAMETER["Longitude of topocentric origin",4.669129,UNIT["DEGREE",0.017453292519943295]],
    PARAMETER["Ellipsoidal height of topocentric origin",64.0,UNIT["METER",1.0]]],
  CS[Cartesian,3],
  AXIS["Topocentric East (E)",EAST],
  AXIS["Topocentric North (N)",NORTH],
  AXIS["Topocentric height (U)",UP],
  UNIT["METER",1.0]]