Download

How do I use the Geo Referencing system in 4.27 to get Unreal Landscape coordinates from real world long/lat

Here is what I have so far.

  1. Generate heightmap and corresponding geojson data of selected square from this app. Unreal Mapbox Bridge (justgeektechs.com)

  2. Let’s say my selected area has just 1 road with no other features. Then I will get a geojson with long/lat points defining the road on the map.

  3. I import the 16 bit height map into Unreal

Now I need to be able to get corresponding unreal coordinates from the long/lat of the road on the map.

The long/lat coordinates of the geojson are of geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84)

So using the Geo Referencing System I should be able to convert these long/lat to points on the landscape so I can draw a road.

Example Files
Geojson
geojson-15-9076-13836-2017.json (5.0 KB)

The coordinates I am use are from the layer/id=road-secondary-tertiary

"coordinates": [
        [
          -80.28769165277481,
          26.931559068024825
        ],
        [
          -80.28771847486496,
          26.94196560632824
        ]
      ]

sixteen bit heightmap

area capture on mapbox map.

Current Blueprint Function on blueprintue.com
Geo Refernce 4.17 posted by delebash | blueprintUE | PasteBin For Unreal Engine 4

However, the coordinates do not display correctly on the landscape map.

What am I doing wrong? Should I use the Geo Referencing system or is there a better way in blueprints to convert long/lat to a point on the Landscape?

That looks like a custom plugin. You need to ask the author of that plugin for how to use the plugin.

In general, I can say that such a system would require that the terrain has one or more geo-referenced points (either the center, or each corner, or perhaps a denser grid) else there’s no way to translate between the coordinate systems, so the first thing I would look at, would be how the plugin you use expects to configure the relationship between “terrain object” and “georeferenced coordinate.”

Another option is to build an actor that lets you input georeferenced coordinates for a particular point in space. Then, when wanting to translate between a geolocation and unreal coordinate system, find the actors that surround the desired location in geocoordinate space, and interpolate their unreal coordinates based on the geocoordinates. As long as you have sufficient density of coordinate fix points, you will get a good enough result this way.

Thanks for the info, very helpful. Actually, I am the one trying to make this plugin. The blueprints are my attempts so far to do the conversion part of my plugin.

Then you need to set some breakpoints and figure out why the data isn’t what you expect it to be!

Actually, you gave me something I needed to figure out. Specifically that I needed one point on the landscape that was georeferenced then I could get the rest. I re-read Georeferencing a Level | Unreal Engine Documentation and this lead to

In Unreal, each Actor has coordinates defined relative to this level origin, so to know an arbitrary georeferenced location, we need to locate the engine origin on Earth.

I have a bounding box with coordinates when I select a map tile. I think all I need to do is get the long/lat of any corner and then use that as a refence for the same corner of the landscape. I will give it a try. Any additional suggestions are welcome. Thanks again.

Yes, that’s a variant on the “know where a few fixed locations are, and interpolate based on that!”