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?
Georeferencing a raster layer involves two things:
- Assign numerical coordinates to pixels.
- 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.
- 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.