Questions about conversion from Cartesian coordinate system to geographic coordinate system

Hi

I downloaded the DEM of the polar regions of the moon, in tif format.The website is"https://astropedia.astrogeology.usgs.gov/download/Moon/LRO/LOLA/ancillary/LRO_LOLA_DEM_NPolar875_10m.tif"

Use the grdinfo command:grdinfo E:\Mars\LRO_LOLA_DEM_NPolar875_10m.tif,we can get that:

E:\Mars\LRO_LOLA_DEM_NPolar875_10m.tif: Title: Grid imported via GDAL
E:\Mars\LRO_LOLA_DEM_NPolar875_10m.tif: Command:
E:\Mars\LRO_LOLA_DEM_NPolar875_10m.tif: Remark:
E:\Mars\LRO_LOLA_DEM_NPolar875_10m.tif: Pixel node registration used [Cartesian grid]
E:\Mars\LRO_LOLA_DEM_NPolar875_10m.tif: Grid file format: gd = Import/export through GDAL
E:\Mars\LRO_LOLA_DEM_NPolar875_10m.tif: x_min: -75840 x_max: 75840 x_inc: 10 name: x n_columns: 15168
E:\Mars\LRO_LOLA_DEM_NPolar875_10m.tif: y_min: -75840 y_max: 75840 y_inc: 10 name: y n_rows: 15168
E:\Mars\LRO_LOLA_DEM_NPolar875_10m.tif: z_min: -3305 z_max: 1491.5 name: z
E:\Mars\LRO_LOLA_DEM_NPolar875_10m.tif: scale_factor: 0.5 add_offset: 0 packed z-range: [-6610,2983]
+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +x_0=0 +y_0=0 +R=1737400 +units=m +no_defs

I want to use this data to draw the moon DEM.But I don’t know how to convert the data into geographic coordinate system or other formats so that the grdimage command can be used directly.

Sorry, I am too busy to help with this in details today. But googling LOLA Moon geographic grid gave me this hit right away:
https://astrogeology.usgs.gov/search/map/Moon/LMMP/LOLA-derived/Lunar_LRO_LOLA_ClrShade_Global_128ppd_v04

Thanks for your help.

But I still don’t understand the difference between these data.When I use grdinfo:
grdinfo E:\Mars\Lunar_LRO_LOLA_ClrShade_Global_64ppd_BlueSteel.tif. It show that:

E:\Mars\Lunar_LRO_LOLA_ClrShade_Global_64ppd_BlueSteel.tif: Title: Grid imported via GDAL
E:\Mars\Lunar_LRO_LOLA_ClrShade_Global_64ppd_BlueSteel.tif: Command:
E:\Mars\Lunar_LRO_LOLA_ClrShade_Global_64ppd_BlueSteel.tif: Remark:
E:\Mars\Lunar_LRO_LOLA_ClrShade_Global_64ppd_BlueSteel.tif: Pixel node registration used [Cartesian grid]
E:\Mars\Lunar_LRO_LOLA_ClrShade_Global_64ppd_BlueSteel.tif: Grid file format: gd = Import/export through GDAL
E:\Mars\Lunar_LRO_LOLA_ClrShade_Global_64ppd_BlueSteel.tif: x_min: -5458203.07638 x_max: 5458203.07638 x_inc: 473.80235038 name: x n_columns: 23040
E:\Mars\Lunar_LRO_LOLA_ClrShade_Global_64ppd_BlueSteel.tif: y_min: -2729101.53819 y_max: 2729101.53819 y_inc: 473.80235038 name: y n_rows: 11520
E:\Mars\Lunar_LRO_LOLA_ClrShade_Global_64ppd_BlueSteel.tif: z_min: 1 z_max: 254 name: z
E:\Mars\Lunar_LRO_LOLA_ClrShade_Global_64ppd_BlueSteel.tif: scale_factor: 1 add_offset: 0
+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R=1737400 +units=m +no_defs

Data display is also Cartesian coordinate system,So can I use it directly? Don’t need to change the data from Cartesian coordinate system to geographic coordinate system?

I’m very sorry for the trouble. You can reply when you are not busy

Not sure what they are smoking at NASA but this is actually exactly proportional to 360x180 degrees. Unfortunately, you will have to run gmt grdedit on this file and write out another to fix the header:

gmt grdconvert thetifffile -Rd -I23040+n/11520+n -Gglobalgrid.grd

I did not read the specifics. -Rd assumes center of map is lon=0. If 180 then use -Rg.

gmt grdconvert thetifffile -Rd -I23040+n/11520+n -Gglobalgrid.grd

@pwessel Is this correct? I don’t see the -I argument in grdconvert.

grdconvert can’t have a -I otherwise it would became grdsample

My message talked about grdedit but the command I typed wrongly said grdconvert…

1 Like

Thanks. But I don’t see the -I option in grdedit either. I think it works fine without that option.

gmt grdedit thetifffile -Rd -Gglobalgrid.grd

I might have meant -A but probably not necessary.

My command (I think) works to convert from equirectangular proyection to geographic (long/lat). Maybe I could add it to the docs. I think that could be insteresting to many users.

1 Like