Unreal Georeferencing - jgoffeney/Cesium4Unreal GitHub Wiki

Back

References

Georeferencing a Level

Georeferencing is providing a translation from a geospatial coordinate system to some other system (like converting latitude, longitude and altitude to Unreal Engine x, y and z coordinates). Unreal provides a plugin called Georeferencing with functions to perform this action.

Theoretical Background

Coordinate Reference Systems (CRS) and Ellipsoids

The CRS is the coordinate system used to provide a location on a planet. Planets are not perfect spheres and thus are more closely approximated with an ellipsoid.

The common Earth ellipsoid model is WGS84 and has specified major and minor axes lengths of 6,378,137.0 m and 6,356,752.314245 m, respectively.

Geographic CRS

A geographic CRS uses polar coordinates to express the location as latitude, longitude and altitude. Latitude is the angle above or below the equator, longitude is the angle to the east and west of the prime meridian and altitude is the distance to the ellipsoid. Each different geographic CRS uses a different ellipsoid.

Geocentric CRS

A geocentric CRS uses a Cartesian x, y and z grid with the origin at the planet center. The x axis is along the intersections of the Equator and Prime Meridian while the z axis is along the poles. The y axis is orthogonal to both.

Projected CRS

A projected CRS is a geographic CRS which has been converted to two dimensions. A common projected CRS is Universal Transverse Mercator which is a cylindrical projection that is then divided into 60 zones with north and south sections. So it has XYZ coordinates but also zone and hemisphere. Each zone is 6 degrees of the equator and the center of each zone, with regard to x, is 500,000 meters with west and east values being less than or greater than. For the y coordinate the equator is 10,000,000 meters with north being greater than and south being less than. All value remain positive.

Georeferencing Plugin

GeoreferencePlugin

The Unreal Engine Georeferencing Plugin provides a GeoReferencingSystem actor to define the CRS and has functions to convert coordinates.

  • Geo Referencing
    • Planet Shape
      • For a small region then Flat Planet is appropriate and the coordinates are projected while Round Planet is for large, planet scale areas the coordinates are not projected and the geometry is rounded.
      • When this is changed it will change the available options under the Origin Location section.
    • Projected CRS
      • The EPSG code for the projection like EPSG:32631.
    • Geographic CRS
      • The EPSG code for the geographic CRS. For ECEF it is defined as EPEG:4978 (the 3d Tile reference value 4979 is defined in the reference but was corrected.).
  • Origin Location
    • Origin at Planet Center
      • For round planets, set to true to just set the origin to the planet center.
      • If true then it disables the remaining options.
    • Origin Location in Projected CRS
      • Set to true to represent the origin in projected CRS else it will be in the geographic CRS.
    • Origin Latitude, Longitude and Altitude
      • The origin coordinates in the geographic CRS when Origin Location in Projected CRS is false.
    • Origin Projected Coordinates Easting, Northing and Up
      • The origin coordinates in the projected CRS when Origin Location in Projected CRS is true.

GeoreferencePluginRound

For the ECEF case the origin is the planet center.

Unreal uses a left handed coordinate system while geospatial coordinates are right handed. When the plugin converts from geospatial to Unreal it will flip the Y axis automatically.

Converting Coordinates

Functions

  • GetGeoReferencingSystem
    • Gets the actor object