Some mesh or point cloud datasets don’t have any georeference. There may be several reasons for that. For example:

  • They were modeled in a CAD tool that doesn’t deal with geospatial data.

  • They were scanned with a LIDAR sensor, and there was no GPS signal available at the time of recording.

In these cases, you can position and orient the dataset on the map yourself:

ogc3dtiles geolocate
Figure 1. Example of geolocalizing a CAD model that doesn’t have a geospatial reference

We call this process geolocalizing a dataset to a geolocation.

Geolocalization to a geolocation doesn’t equal fully fledged georeferencing. During geolocalization, LuciadRIA generates an Affine3DTransformation. The resulting dataset isn’t warped to follow the curvature of the earth. For that reason, we don’t recommend geolocalizing anything larger than a building or landmark.

When to geolocalize a 3D Tiles layer?

To check if you need to geolocalize a TileSet3DLayer, have a look at the reference of its model. If the reference of the model is a CoordinateReference with a CoordinateType.CARTESIAN, it’s a non-geospatial reference by definition.

If the map has a 3D Cartesian map reference, you can view the layer as-is. If the map reference is geospatial and if you don’t create a transformation for such a dataset, your application throws an error when it tries adding it to a map.

How to geolocalize a 3D Tiles layer?

The TileSet3DLayer class has a transformation parameter that you can set either at construction time, or during the lifetime of the object.

You can use the transformation property to configure a transformation for the model coordinates of the model of the layer. As a result, LuciadRIA re-positions, orients, and scales the non-georeferenced `TileSet3DLayer.

It’s recommended to use Affine3DTransformation. You can use it to generate an affine transformation and apply it to a TileSet3DLayer. The Affine3DTransformation class offers static constructor functions. You can use the createFromGeoLocation function for geolocalization purposes.

Applying a geolocation affine transformation to a non-geospatial dataset to display it on a map
//Create geolocation point at longitude 50, latitude 5 degrees.
const geolocation = createPoint(getReference("CRS:84"), [5, 50]);

//Create Affine3DTransformation with the previously created geolocation, and an azimuth of 90 degrees.
const affine3DTransformation = createTransformationFromGeoLocation(geolocation, {azimuth: 90});

//Apply the affine3DTransformation to the layer
const tileSet3DLayer = new TileSet3DLayer(model, {
  transformation: affine3DTransformation,
  isPartOfTerrain: false
});

An Affine3DTransformation has a sourceReference and a destinationReference.

The default source reference is a non-geospatial Cartesian reference. Its X-axis points to the east, the Y-axis points to the north, and the Z-axis points upwards. This Cartesian reference is also the default reference if an OGC 3D Tiles dataset doesn’t have a spatial reference.

The default destination reference for the Affine3DTransformation.createFromGeoLocation factory function is a geocentric reference. This is the default reference used by OGC 3D Tiles. That’s why you should also use it for the purpose of geolocalizing an OGC 3D Tiles dataset.

For a demonstration of geolocalization, see the Geolocate OGC 3D Tiles sample.