3

NASA makes available a Digital Elevation Model for the Moon in GeoTIFF format. I am trying to use QGIS to create a map of a specific region, bounded by certain values of latitude and longitude. From what I can gather (I am not a GIS person; this is my first time using QGIS), the GeoTIFF in question is encoded as x, y, elevation, but I need to work with latitude and longitude.

I load the file in question into a new project by adding a new raster layer and selecting the file. However, when I add a grid decoration, it is displayed as x, y. In addition, if I want to select a point or region, I must input x, y.

I tried extracting elevation contours (using Raster->Extraction->Contour), add that layer, and try to add fields via the Attribute Table (specifically the $x and $y attributes, as suggested in this answer). However, the computed values are NULL.

From what I can gather, my CRS looks correct: +proj=ecq +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=1737400 +b=1737400 +units=m +no_defs. It looks correct to me (again, not my wheelhouse) because it shows that the map is in a simple cylindrical projection, with lat/lon zero at xy zero, over a sphere with radius 1,737,400 m (the correct radius of the Moon).

I also tried converting the raster into a vector (using Raster->Conversion->Polygonize) and work with the resulting shapefile to no avail.

How would you go about loading the linked GeoTIFF in QGIS and displaying a map of, say, upper-left corner in lat/lon (30 deg, 0 deg) and lower-right corner in lat/lon (-30 deg, 30 deg). The map would have a grid separated in, say, 5 degree increments.

1

If you look at your CRS you will see the "+proj=ecq" and "+units=m" parts. that mean that the CRS of your raster is an Equirectangular projection using meter as unit. That's why your coordinate are expressed as x,y in meter and not lat/long in degree.

If you change your canvas CRS (not your raster CRS !) to a geographic CRS your grid should display as degree (I can't help you with geographic CRS choice, I never work with non earth data)

(and for contour, as they are linear feature you can't calculate x,y coordinate as a line has several (at last two) pair of coordinate

1
  • I tried changing it to a variety of CRS's without success (e.g., +proj=longlat +a=1737400 +b=1737400 +no_defs, which is the IAU2000:30100 CRS shipped with QGIS). I also tried in Project Settings to select units to degrees, also without success.
    – Escualo
    Mar 15 at 19:11

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.