[GRASS-user] import tif error: bytes do not match file size

Markus Metz markus.metz.giswork at googlemail.com
Mon Oct 31 04:58:44 EDT 2011


rookie wrote:
> Hi, all -
>
> I'm TRYING to classify an aerial image via feature extraction.
> Problem is, I'm new to grass and can't figure out how to import an image!
> I'm doing this via the gui (layer manager) - no time to play with code. :(
>
> I have a projected tif w/ a tfw. It has three bands.
>
> I created a location and region based on its projections and boundaries.
>
> I used the region info to parameterize the raster import.
>
> Error 1: Bytes do not match File size
> File Size 373285132 ... Total Bytes 123072625
>
> It suggested setting bytes = 3, which I thought made sense because I have
> three bands. (Is that correct logic?)
>
> So I set bytes = 3.

Where did you set that option bytes? The command used to import
georeferenced tif files is r.in.gdal, in the GUI (assuming that you
use wxGUI and GRASS 6.4.2) available under File -> Import raster data
-> Common import formats. I could not find an option "bytes" for
r.in.gdal.

In order to be able to help, it is necessary to know what command you
used, what GRASS version, what GUI, preferably also what operating
system.

Helpful would also be the output of gdalinfo on the tif file.

Markus M

>
> Error 2:  Bytes do not match File size
> File Size 373285132 ... Total Bytes 369217875
>
> I thought maybe the region info was not giving me the correct
> cols/rows/E/W/S/N. So I pulled that info from arcgis and tried again.
>
> Same error.
>
> I read somewhere that it could be due to header info.
>
> Could someone please help? I have been spending hours looking for an answer.
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/import-tif-error-bytes-do-not-match-file-size-tp6946390p6946390.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>


More information about the grass-user mailing list