1

I have a height map in PNG format 4096x4096px (40x40km) without any georeferencing (fictitious terrain). Which coordinate system should I choose to work with QGIS?

9
  • 2
    What is your purpose of georeferencing? Nov 26, 2022 at 13:51
  • 2
    How do you want to georeference? Georeferencing means assigning real world coordinates to your image. If it's a fictions terrain, how can you connect it to a real surface?
    – Babel
    Nov 26, 2022 at 13:56
  • 1
    Maybe the UTM coordinate system for your local town, and centre your terrain on your local town, so that you can overlay it on OpenStreetMap and get an intuitive feel for its size and scale?
    – Spacedman
    Nov 26, 2022 at 14:53
  • 1
    @Spacedman I thought maybe there is a way to specify the borders of the image in the range [[0, 0] [40 000, 40 000]] meters Nov 26, 2022 at 16:30
  • 2
    You can make a "world" file which has the same name as your PNG but has extension .pngw - this is six lines that basically say where the corners are ( gdal.org/drivers/raster/wld.html#raster-wld ) but unless you specify a coordinate system its going to be interpreted as degrees instead of metres. So you also need to decide on a projected coordinate reference system (eg UTM, or Ordnance Survey Grid, or other local grid systems).
    – Spacedman
    Nov 26, 2022 at 16:59

1 Answer 1

2

Georeferencing a raster layer involves two things:

  1. Assign numerical coordinates to pixels.
  2. Assign a geospatial reference system in which those coordinates should be interpreted.

Although your question is focused on the second item, both are required to establish a relationship between the pixels and the geographic location on Earth that those pixels represent.

It is understandable that the geographic location of the pixels does not interest you, but at least you are interested that each pixel measures 10 meters (4096 pixels would represent 40.96 kilometers). In that case, 10 is something that corresponds to the coordinates, meters is something that corresponds to the reference system.


Regarding the coordinates of the pixels. These can be defined in a world file. What is simple is to indicate that each column measures 10, leave the horizontal and vertical skew zero, that each row measures -10, and that the center of the upper left pixel has coordinates 0 and 0.

So create a text file called your_image_name.pgw in the same directory as your_image_name.png, with the following contents:

10.0
0.0
0.0
-10.0
0.0
0.0

Regarding the CRS of the raster layer. Since the PNG format does not include a CRS definition, loading the layer from the PNG file QGIS will likely assign it a CRS automatically or you will be prompted for one (depending on your QGIS settings). If QGIS assigns a CRS by default, you should then change it from the Source tab of the layer's properties (Note: this is not a reprojecting process).

In any case, you must choose one. And here is when it is opinion based, because you can choose what you want as long as the units of measure are meters.

I'll recommend one detailing its advantages over others, but keep in mind that whichever you choose, avoid doing ellipsoidal measurements (as long as you see in the documentation that you can get an ellipsoidal measurement or a Cartesian measurement, in your case you're going to choose Cartesian).


Now yes, the answer. The CRS recommended by me, both for your QGIS layer and for your QGIS map canvas is: EPSG:3857.

Advantages:

  • Negative coordinates are valid, so you don't need to worry about false easting and northing when defining source coordinates.
  • In case you measure ellipsoidal (instead of Cartesian) distances or areas by mistake, 40000 coordinate for northing in this system is far less distorted than 40000 coordinate for easting in a UTM system.
  • Altought it is not strictly conformal, it is a lot more conformal than other projections (e.g., equirectangular) if you want to reproject it.
  • It is natively used in web mapping libraries, so you can create a 3D model with Qgis2threejs or a web map with qgis2web plugins without any distortion from your original map.

Latest note: The source PNG file will not store the CRS definition. You can export the layer to GeoTIFF format to load it in another project without choose its CRS again.

3
  • Side note: You will contribute to the mapping of the best mapped fictional place, by far: the Null Island. Nov 27, 2022 at 17:11
  • Great answer, indeed!
    – Babel
    Nov 27, 2022 at 17:36
  • @GabrielDeLuca Thanks! You are amazing) Nov 27, 2022 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.