2

I am new in QGIS 1.8 and have the following problem. I have extracted two raster files (land_cover.asc and soil.asc) using a polygon of my study area (area.shp). Apparently the raster dimensions are slightly different (1261:1264 vs 1259:1261) even though they are both supposed to be the same (since were extracted based on the same shapefile).

What would be the better way to do these two rasters with the exact same dimension in QGIS.

  • 1
    what are the resolutions (pixel sizes) of these files? Are they different? – spatialthoughts Oct 23 '12 at 16:49
  • Yes, slightly different: 0.0833428,-0.0833041 x 0.0834752,-0.0835023. Please see my post bellow for more information on other differences (projection and Band characteristics) about the files – Fernanda Oct 24 '12 at 8:41
1

Here you are the "How To" for this case.

UPDATE: check out this Processing script for QGIS that automates the process.

  • Both rasters have also similar resolutions as following: soil: 0.0833428,-0.0833041 and land_cover is 0.0834752,-0.0835023. I need to use it in Maxent and I am getting the different geographic dimensions error. – Fernanda Oct 24 '12 at 8:11
  • Hi Thanks for the tutorial. It seems nice but... I tried it and got 2 error messages: the first one ("gdalbuildvrt does not support heterogenous projection") I managed to get rid of it by using the "Allow projection difference". But the second one (does not support heterogenous band characteristics) I have no idea how to change. Both files have only 1 Band but one of them has more info like Min and Max Values, Range, Mean, Sum of squares, Standard Deviation, Sum of all cells and Cell Count. The other one has no Stat info (No Stat collected yet). – Fernanda Oct 24 '12 at 8:48
  • You don't need to build vrt-raster in your case cause there is only 1 or 2 pixels difference in your rasters. Just use extend of one of your rasters to resize another one as described in second part of the tutorial. Also make sure that both rasters have the same projection. – SS_Rebelious Oct 24 '12 at 9:43
  • @SS_Rebelious I couldn't find the toolbox in Python 3. Is it update or integrated to QGIS? – wondim Oct 29 '19 at 16:51
  • @wondim No it was't ported to Python 3 or integrated into QGIS. Though the source code is open and an interested person may adjust it to their needs. – SS_Rebelious Oct 31 '19 at 7:50

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.