[GIS] Georeference map from videogame

coordinate systemgeoserverqgis

I am trying to georeference a map from a Videogame to display it on a website, probably with openlayers.

The map in question is this Subnautica map.

I found a starting point here GeoServer create map from image. I managed to Reference the map in Qgis with some coordinates and export the layer to GeoServer and display it there.
My Problem is that I don't know how to proceed from there. I'd like to map the map 1:1 to "real world" coordinates, so that the center of this map is at 0,0 on the website. I think I have to chose a Map projection, like Web Mercator, and calculate where the coordinates from the game would be in the real world?

The map in the game is 4kmx4km in size.

Best Answer

I took the image from the web site, chopped out the legend etc, and ended up with an image that was 2883x288 pixels. If this is 4km x 4km then each pixel is 1.387 metres.

To geolocate this image at (0,0) ("Null Island") create a "world file" using a text editor with this:

1.387444
0
0
-1.387444
0
0

and save this as Subnautica_map2.pngw - that is, the name of the image but with extension pngw.

Load this into QGIS and tell QGIS it is in EPSG:3857 and it should appear off the coast of Africa.

Here it is with a QGIS measurer showing the 4km size of the edge.

enter image description here

Note that the size of a unit in EPSG:3857 is only one metre at the equator, so if you try and load it further north or south it won't be a nice round 4km.

Related Question