UE Plugin

Map GPS Coordinates

With the COALA Plugin for UE you can easily convert GPS coordinates to scene coordinates.

To mark certain places on a world map for which you only have the GPS coordinates, simply read on.

Prerequisites

You need

  • the UE4 COALA Plugin

  • an image of the world map that serves as a reference

  • the GPS coordinates of the places you want to map

Example coordinates can be fetched easily from Google Maps.

Brief Explanation of this Solution

You practically create a "Custom POI" actor that is able to set its own position on the given GPS coordinates.

This solution is a very good basis for all kinds of other applications.

Setup the UE4 Editor

The Actor

The editor "world" setup

Using Google Maps to find GPS coordinates

BEWARE: On Google Maps Latitude (Y-value) is displayed first, followed by Longitude (X-value)

Feed your actor with the coordinates and press play

Below you can see the result.

If you select the actor in the world in "play" mode, you will see where it was placed in the scene according to the GPS coordinates and the world size.

Technical Background

The COALA Plugin works with a fixed world size based on our world's circumference of 40.075 km.

For this reason, a scaling of X=2517.0 and Y=2688.0 Unreal Units is used for the reference world picture/map.

Furthermore GPS coordinates are used in the following range:

Longitude (X-value):

  • min -180°

  • max +180°

Latitude (Y-value):

  • min -86°

  • max +86°

(Latitude (Y-value) is limited to 86° because of the Gimbal Lock effect)

Since this is a very simple example, the center of the world is taken as the point of reference. In a real world application this would of course be the player's GPS position.