2

So here's the problem

I have a georeferenced orthomosaic which I used to generate land cover data. During the pixel classification phase of land cover study, I had to use other softwares to help me to classify everything the way I wanted and when I finally imported it back to QGIS, I got this:

enter image description here

Looks like the top left corner is the same, but somehow I underscaled it and now I need it back to the old extents. Both files are georeferenced in the same projection. Any ideas on how can I do that?

GDALINFO: https://pastebin.com/hM6GvaL8

Smaller raster (needs to be fixed):

Driver: GTiff/GeoTIFF
Files: uso_solo2.tif
Size is 12777, 8410
Coordinate System is:
PROJCS["SIRGAS 2000 / UTM zone 22S",
    GEOGCS["SIRGAS 2000",
        DATUM["Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6674"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4674"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-51],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","31982"]]
Origin = (542062.706200000015087,7524576.377299999818206)
Pixel Size = (0.053355701651406,-0.053355707491080)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  542062.706, 7524576.377) ( 50d35'29.01"W, 22d23' 3.54"S)
Lower Left  (  542062.706, 7524127.656) ( 50d35'28.96"W, 22d23'18.14"S)
Upper Right (  542744.432, 7524576.377) ( 50d35' 5.16"W, 22d23' 3.48"S)
Lower Right (  542744.432, 7524127.656) ( 50d35' 5.12"W, 22d23'18.08"S)
Center      (  542403.569, 7524352.017) ( 50d35'17.06"W, 22d23'10.81"S)
Band 1 Block=12777x1 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA 
Band 2 Block=12777x1 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA 
Band 3 Block=12777x1 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA 
Band 4 Block=12777x1 Type=Byte, ColorInterp=Alpha  

Bigger raster (its the right one):

Driver: GTiff/GeoTIFF
Files: D:\PROJETOS\MARUBAYASHI_LAUDO\PRODUTOS\ORTOMOSAICO\ORTO_MARUBAYASHI.tif
       D:\PROJETOS\MARUBAYASHI_LAUDO\PRODUTOS\ORTOMOSAICO\ORTO_MARUBAYASHI.tif.ovr
Size is 59993, 39491
Coordinate System is:
PROJCS["SIRGAS 2000 / UTM zone 22S",
    GEOGCS["SIRGAS 2000",
        DATUM["Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000",
            SPHEROID["GRS 1980",6378137,298.2572221010042,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6674"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4674"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-51],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","31982"]]
Origin = (542059.236558826058172,7524588.587958189658821)
Pixel Size = (0.053244800000000,-0.053244799999993)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=JPEG
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  542059.237, 7524588.588) ( 50d35'29.13"W, 22d23' 3.15"S)
Lower Left  (  542059.237, 7522485.898) ( 50d35'28.93"W, 22d24'11.53"S)
Upper Right (  545253.552, 7524588.588) ( 50d33'37.42"W, 22d23' 2.85"S)
Lower Right (  545253.552, 7522485.898) ( 50d33'37.21"W, 22d24'11.24"S)
Center      (  543656.394, 7523537.243) ( 50d34'33.17"W, 22d23'37.19"S)
Band 1 Block=59993x32 Type=Byte, ColorInterp=Red
  Overviews: 3194x2103, 1597x1052, 799x526, 400x263, 200x132
  Unit Type: metre
Band 2 Block=59993x32 Type=Byte, ColorInterp=Green
  Overviews: 3194x2103, 1597x1052, 799x526, 400x263, 200x132
  Unit Type: metre
Band 3 Block=59993x32 Type=Byte, ColorInterp=Blue
  Overviews: 3194x2103, 1597x1052, 799x526, 400x263, 200x132
  Unit Type: metre  
  • What's the file type? Does it have another file with it that ends in "w"? (i.e. a .tiff with a .tfw)? – wfgeo Feb 18 at 20:49
  • @CSouza, there is not enough information in the question to provide an answer. Please, Edit your question to include the output of the gdalinfo command (at the console) or the Raster Information tool (in QGIS) for both files or layers. – Gabriel De Luca Feb 18 at 21:00
  • Yeah initially it was a geotiff, but then I edited it on Photoshop, so I generated a tfw (I guess I made a mistake here) and then I imported it back to QGIS. Then I made a few more adjustements (filters etc) and finally exported it to geotiff one more time. – CSouza Feb 18 at 21:00
  • 1
    If these two images were originally had the same extent and grid size, you can use listgeo then geotifcp to copy the settings of Bigger Raster to Smaller Raster. – Kazuhito Feb 19 at 11:34
  • 1
    Thanks for your help. I fixed it by creating a new world file based on the bigger raster and then overwriting it on the smaller geotiff with the following command: geotifcp -e bigraster.tfw smallraster.tif newraster.tif – CSouza Feb 19 at 12:18

Your Answer

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

Browse other questions tagged or ask your own question.