0

I am new geotif image ploting in python. I have two Geotiff images of the same region. However, after plotting these two images they are not matching. The below is the meta information for both the images.

Image 1

enter image description here

Files: sli_hh_ML_I_221.tif
Size is 640, 7368
Coordinate System is:
PROJCRS["unknown",
    BASEGEOGCRS["unknown",
        DATUM["unknown",
            ELLIPSOID["unknown",1737400,0,
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]]],
        PRIMEM["Reference meridian",0,
            ANGLEUNIT["degree",0.0174532925199433,
                ID["EPSG",9122]]]],
    CONVERSION["Polar Stereographic (variant A)",
        METHOD["Polar Stereographic (variant A)",
            ID["EPSG",9810]],
        PARAMETER["Latitude of natural origin",90,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",1,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["(E)",south,
            MERIDIAN[90,
                ANGLEUNIT["degree",0.0174532925199433,
                    ID["EPSG",9122]]],
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["(N)",south,
            MERIDIAN[180,
                ANGLEUNIT["degree",0.0174532925199433,
                    ID["EPSG",9122]]],
            ORDER[2],
            LENGTHUNIT["metre",1]]]
Data axis to CRS axis mapping: 1,2
Origin = (-56469.605829227773938,5384.527309082705870)
Pixel Size = (89.627161160045119,-21.283702822737492)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  -56469.606,    5384.527) ( 95d26'48.61"W, 88d 7'46.10"N)
Lower Left  (  -56469.606, -151433.795) ( 20d27' 1.68"W, 84d40'26.23"N)
Upper Right (     891.777,    5384.527) (170d35'46.03"E, 89d49'12.04"N)
Lower Right (     891.777, -151433.795) (  0d20'14.66"E, 85d 0'32.78"N)
Center      (  -27788.914,  -73024.634) ( 20d50' 2.06"W, 87d25'25.54"N)
Band 1 Block=640x3 Type=Float32, ColorInterp=Gray
  NoData Value=nan

Image 2

enter image description here

*ch2_sar_ncxl_20191017t234531221_d_sli_xx_fp_hh_d18_wrp.tif
Driver: GTiff/GeoTIFF
Files: ch2_sar_ncxl_20191017t234531221_d_sli_xx_fp_hh_d18_wrp.tif
Size is 2294, 6273
Coordinate System is:
PROJCRS["unknown",
    BASEGEOGCRS["unknown",
        DATUM["unknown",
            ELLIPSOID["unknown",1737400,0,
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]]],
        PRIMEM["Reference meridian",0,
            ANGLEUNIT["degree",0.0174532925199433,
                ID["EPSG",9122]]]],
    CONVERSION["Polar Stereographic (variant A)",
        METHOD["Polar Stereographic (variant A)",
            ID["EPSG",9810]],
        PARAMETER["Latitude of natural origin",90,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",1,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["(E)",south,
            MERIDIAN[90,
                ANGLEUNIT["degree",0.0174532925199433,
                    ID["EPSG",9122]]],
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["(N)",south,
            MERIDIAN[180,
                ANGLEUNIT["degree",0.0174532925199433,
                    ID["EPSG",9122]]],
            ORDER[2],
            LENGTHUNIT["metre",1]]]
Data axis to CRS axis mapping: 1,2
Origin = (-56469.605829227773938,5384.527309082705870)
Pixel Size = (25.000000000000000,-25.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  -56469.606,    5384.527) ( 95d26'48.61"W, 88d 7'46.10"N)
Lower Left  (  -56469.606, -151440.473) ( 20d26'58.70"W, 84d40'25.49"N)
Upper Right (     880.394,    5384.527) (170d42'50.59"E, 89d49'12.26"N)
Lower Right (     880.394, -151440.473) (  0d19'59.10"E, 85d 0'32.00"N)
Center      (  -27794.606,  -73027.973) ( 20d50'12.96"W, 87d25'24.93"N)
Band 1 Block=2294x1 Type=Float32, ColorInterp=Gray
  NoData Value=nan
Band 2 Block=2294x1 Type=Float32, ColorInterp=Undefined
  NoData Value=nan*

I tried with several methods but am unable to find why these two images do not display same.

  • 1
    What's the question, exactly? The images are different views and they are different sizes and have different pixel sizes... how are you expecting them to look? How did you plot them? – Matt Hall Jun 21 '22 at 12:30
  • Both images have same corner latitude and longitude. But still they are not same after display. – Nidhi Verma Jun 22 '22 at 11:45
  • You don't show how you display them at all, that makes it impossible to answer. In Matplotlib you for example would need to provide the correct extent, because the pixel-coordinates of both images are clearly different, they won't magically align when treated as plain assays. – Rutger Kassies Jun 23 '22 at 08:42
  • Thanks for reply. I am using the below code for both the images in python `import rasterio from matplotlib import pyplot src = rasterio.open("Input.tif") pyplot.imshow(src.read(1), cmap='pink') pyplot.show()` – Nidhi Verma Jun 24 '22 at 06:43
  • Try adding the correct extent to `imshow`, it's the corner coordinates as shown by `gdalinfo`. The order is `extent=(left, right, bottom, top)`, see: https://matplotlib.org/stable/tutorials/intermediate/imshow_extent.html – Rutger Kassies Jun 27 '22 at 06:39
  • https://stackoverflow.com/users/1755432/rutger-kassies, I am still unable to get the orienttation. – Nidhi Verma Jun 29 '22 at 11:22

0 Answers0