[GRASS-user] WARNING: Unable to open raster map...format field in header file invalid

Hello,

Recently, some grass files that were on my computer were accidentally
deleted - I recovered them from backup but it seems that maybe not all.
When I open grass and load up a raster with d.rast the map does not appear
and I get the following error message:

WARNING: Raster map <toc10@toc@toc>: format field in header file invalid
WARNING: Unable to open raster map <toc10@toc@toc>
ERROR: Unable to open raster map <toc10@toc>

Does anyone know what might be missing? And if there is a fix to this?
It seems to have happened to all of the rasters that I have in that
project!

Thank you - Raphael.

Hi, Rafael,

The first point:
Typing the comnand:
d.rast map=xxxx
you don't load the file. You just display the already imported map from existing mapset
So be sure you files are imported to the current mapset
You may check this by the command:
d.list rast (maybe some differences in syntax depending on grass version)

Second: check the projection in your workspace and imported files

Hope it helps

--
Best regards,

Maria V. Kozlova

š /------------------------------------\
š Information System Lab. (ISysLab)
š State Oceanographic Institute,
š Kropotkinsky per., 6,
š MOSCOW, 119034,
š RUSSIA
š ------------------------------------
š tel. š š+7 499 246 6448
š fax. š š+7 499 246 7288
š mailto: škclo@yandex.ruš
š \------------------------------------/

11.09.2015, 06:58, "Raphael.Viscarra-Rossel@csiro.au" <Raphael.Viscarra-Rossel@csiro.au>:

Hello,

Recently, some grass files that were on my computer were accidentally
deleted - I recovered them from backup but it seems that maybe not all.
When I open grass and load up a raster with d.rast the map does not appear
and I get the following error message:

WARNING: Raster map <toc10@toc@toc>: format field in header file invalid
WARNING: Unable to open raster map <toc10@toc@toc>
ERROR: Unable to open raster map <toc10@toc>

Does anyone know what might be missing? And if there is a fix to this?
It seems to have happened to all of the rasters that I have in that
project!

Thank you - Raphael.

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Sep 11, 2015 5:58 AM, Raphael.Viscarra-Rossel@csiro.au wrote:

Hello,

Recently, some grass files that were on my computer were accidentally
deleted - I recovered them from backup but it seems that maybe not all.
When I open grass and load up a raster with d.rast the map does not appear
and I get the following error message:

WARNING: Raster map <toc10@toc@toc>: format field in header file invalid

This double @ is a bit fishy.
Can you check where it comes from?

WARNING: Unable to open raster map <toc10@toc@toc>
ERROR: Unable to open raster map toc10@toc

The header file is a text file. Is it there?

Markus

Hi Maria, thank you. Yes, the rasters are there - they are listed with
g.listŠ.
Projection is all ok too.
MmmmŠ.

On 11/09/2015 4:27 pm, "Kozlova Maria" <kclo@yandex.ru> wrote:

Hi, Rafael,

The first point:
Typing the comnand:
d.rast map=xxxx
you don't load the file. You just display the already imported map from
existing mapset
So be sure you files are imported to the current mapset
You may check this by the command:
d.list rast (maybe some differences in syntax depending on grass version)

Second: check the projection in your workspace and imported files

Hope it helps

--
Best regards,

Maria V. Kozlova

/------------------------------------\
Information System Lab. (ISysLab)
State Oceanographic Institute,
Kropotkinsky per., 6,
MOSCOW, 119034,
RUSSIA
------------------------------------
tel. +7 499 246 6448
fax. +7 499 246 7288
mailto: kclo@yandex.ru
\------------------------------------/

11.09.2015, 06:58, "Raphael.Viscarra-Rossel@csiro.au"
<Raphael.Viscarra-Rossel@csiro.au>:

Hello,

Recently, some grass files that were on my computer were accidentally
deleted - I recovered them from backup but it seems that maybe not all.
When I open grass and load up a raster with d.rast the map does not
appear
and I get the following error message:

WARNING: Raster map <toc10@toc@toc>: format field in header file invalid
WARNING: Unable to open raster map <toc10@toc@toc>
ERROR: Unable to open raster map <toc10@toc>

Does anyone know what might be missing? And if there is a fix to this?
It seems to have happened to all of the rasters that I have in that
project!

Thank you - Raphael.

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi Markus,
Yes…not sure where the double @ comes from – it just displays this in the error message…
I looked at the files in the cellhd folder (which I assume are the header files) and they seem fine:

proj: 3
zone: 0
north: 9:59:50.99856S
south: 43:38:32.993713S
east: 153:38:23.977878E
west: 112:54:41.983744E
cols: 48874
rows: 40374
e-w resol: 0:00:03
n-s resol: 0:00:03
format: -1
compressed: 1

This is strange…any other hints will be appreciated. Thank you for your help. Raphael.

From: Markus Neteler <neteler@osgeo.org>
Date: Friday, 11 September 2015 4:58 pm
To: Raphael Rossel <Raphael.Viscarra-Rossel@csiro.au>
Cc: GRASS user list <grass-user@lists.osgeo.org>
Subject: Re: [GRASS-user] WARNING: Unable to open raster map…format field in header file invalid

On Sep 11, 2015 5:58 AM, <Raphael.Viscarra-Rossel@csiro.au> wrote:

Hello,

Recently, some grass files that were on my computer were accidentally
deleted - I recovered them from backup but it seems that maybe not all.
When I open grass and load up a raster with d.rast the map does not appear
and I get the following error message:

WARNING: Raster map <toc10@toc@toc>: format field in header file invalid

This double @ is a bit fishy.
Can you check where it comes from?

WARNING: Unable to open raster map <toc10@toc@toc>
ERROR: Unable to open raster map toc10@toc

The header file is a text file. Is it there?

Markus

On 11/09/15 09:27, Raphael.Viscarra-Rossel@csiro.au wrote:

Hi Markus,
Yes…not sure where the double @ comes from – it just displays this in
the error message…
I looked at the files in the cellhd folder (which I assume are the
header files) and they seem fine:
proj: 3
zone: 0
north: 9:59:50.99856S
south: 43:38:32.993713S
east: 153:38:23.977878E
west: 112:54:41.983744E
cols: 48874
rows: 40374
e-w resol: 0:00:03
n-s resol: 0:00:03
format: -1
compressed: 1

This looks fine.

The error message you cited was:

>> WARNING: Raster map <toc10@toc@toc>: format field in header file invalid

but the format field in the header looks ok (-1 => FP map).

What does r.info tell you on the file ?

What about launching 'd.mon wx0' + 'd.rast toc10' from the command line ?

You can also try copying the raster file to a different name with g.copy.

Another option would be to make your location (or an extract) available somewhere so that we can have a look.

Moritz

Hello Moritz,

Thank you for the suggestions. r.info returns the following
WARNING: can't read range file for [toc10 in toc]
ERROR: Unable to read range file

The frange file I found seems to be there but it is not readable.

I am beginning to thing that whatever I deleted was not recovered and that
I will need to read the data back into grassŠ
What a pain!

Thank you all for your suggestions.

On 11/09/2015 6:00 pm, "Moritz Lennert" <mlennert@club.worldonline.be>
wrote:

On 11/09/15 09:27, Raphael.Viscarra-Rossel@csiro.au wrote:

Hi Markus,
YesŠnot sure where the double @ comes from ­ it just displays this in
the error messageŠ
I looked at the files in the cellhd folder (which I assume are the
header files) and they seem fine:
proj: 3
zone: 0
north: 9:59:50.99856S
south: 43:38:32.993713S
east: 153:38:23.977878E
west: 112:54:41.983744E
cols: 48874
rows: 40374
e-w resol: 0:00:03
n-s resol: 0:00:03
format: -1
compressed: 1

This looks fine.

The error message you cited was:

>> WARNING: Raster map <toc10@toc@toc>: format field in header file
invalid

but the format field in the header looks ok (-1 => FP map).

What does r.info tell you on the file ?

What about launching 'd.mon wx0' + 'd.rast toc10' from the command line ?

You can also try copying the raster file to a different name with g.copy.

Another option would be to make your location (or an extract) available
somewhere so that we can have a look.

Moritz

On Fri, Sep 11, 2015 at 10:00 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:
...

You can also try copying the raster file to a different name with g.copy.

Since they are raster maps, you may also try to "regenerate" them with
r.mapcalc:

g.region raster=brokenmap
r.mapcalc "freshmap = brokenmap"

I suppose that r.mapcalc will create the missing files for you. Not
sure of course but worth a try.

If that works, in a simple loop all raster maps could be redone.

Another option would be to make your location (or an extract) available
somewhere so that we can have a look.

Yes.

Markus

I ended up reloading the rasters. It took some time and processing but well, it's done. Thanks for the suggestions.
Raphael.

_________________________

Sent from my mobile device

On 13 Sep 2015, at 5:00 am, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Sep 11, 2015 at 10:00 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:
...

You can also try copying the raster file to a different name with g.copy.

Since they are raster maps, you may also try to "regenerate" them with
r.mapcalc:

g.region raster=brokenmap
r.mapcalc "freshmap = brokenmap"

I suppose that r.mapcalc will create the missing files for you. Not
sure of course but worth a try.

If that works, in a simple loop all raster maps could be redone.

Another option would be to make your location (or an extract) available
somewhere so that we can have a look.

Yes.

Markus