Some panorama datasets don’t offer full georeference information. For example, datasets obtained from indoor sensors or small hand-held devices typically don’t have that information.

This how-to explains how you can load, process, and visualize such panoramas.

Even though you have no georeference information, most datasets share some properties that you can rely on.

The positions in the dataset are defined in a local 3D Cartesian reference, expressed in meters. Although the origin of the reference on the earth is unknown, the Z-axis nearly always aligns with the gravitational up direction.

To map this reference to the earth, you can use a topocentric reference: attach the origin of the reference to a longitude-latitude-altitude anchor point. Then apply a rotation, typically around the Z-axis.

You have two options for placing your dataset on the earth, also known as geolocating your data:

  • At the backend, in LuciadFusion

  • At the frontend, on the LuciadRIA client

Consider your use case to decide what the best option is for you.

Geolocating your dataset in LuciadFusion

In this scenario, we add a georeference when we load the data in LuciadFusion. The advantage of this approach is that you don’t need extra configuration on the client. The downside is that the location becomes permanent. You can change it only by re-processing the data.

You can use a traditional projected reference, such as the closest UTM zone, in combination with false easting and false northing.

The easiest way, though, is to specify a topocentric reference, either in Java code, or by loading the reference as Well-Known Text (WKT) from a .prj file.

    ILcdModelReference modelReference = new TLcdTopocentricReference(datum, new TLcdLonLatHeightPoint(21.310094, 50.7143019, 275.0));
ENGCRS["MyTopocentric",
  GEOGCS["WGS 84",
    DATUM["WGS 84", SPHEROID["WGS 84",6378137,298.2572236,LENGTHUNIT["metre",1.0]]]],
  DERIVINGCONVERSION["MyPosition",
    METHOD["Geographic/topocentric conversions",AUTHORITY["EPSG",9837]],
    PARAMETER["Latitude of topocentric origin",50.7143019,UNIT["DEGREE",0.017453292519943295]],
    PARAMETER["Longitude of topocentric origin",21.310094,UNIT["DEGREE",0.017453292519943295]],
    PARAMETER["Ellipsoidal height of topocentric origin",275.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]]

Geolocating your dataset on the client in LuciadRIA

In this scenario, we load, process, and serve the dataset in LuciadFusion without a georeference. We position the panoramas on the earth only when we load them in LuciadRIA. You gain flexibility with this approach, because you don’t need to know the location up front. You can even position the panoramas interactively, if you create a UI controller for that purpose.

Use a generic 3D Cartesian reference as model reference for your data, either through code, or through WKT from a .prj file.

    ILcdModelReference modelReference = new TLcdCartesianReference(METRE_UNIT, METRE_UNIT, METRE_UNIT);
LOCAL_CS["Generic Cartesian 3D",
  LOCAL_DATUM["Unknown",0],
  UNIT["m",1.0],
  AXIS["x",EAST],
  AXIS["y",NORTH],
  AXIS["z",UP]]

Even without the georeference, LuciadFusion loads, processes, and serves the data. You won’t be able to visualize anything in the preview map, though.

When you load the data in LuciadRIA, you must position the panoramas on the earth. Use Affine3DTransformation.createTransformationFromGeoLocation to get a transformation that you can apply to the position while loading. Use a custom Codec or Store for that.

The panoramas in the Luciad Panorama Format are oriented relative to the local reference. Because you are rotating the entire reference on the client, you also need to apply the orientation to each individual panorama, using PanoramaStyle.orientation. See the article How to visualize non-georeferenced panoramas in the LuciadRIA documentation for more information.