[GRASS-user] Once more: raster projection transformation: LAEA -> UTM

Glynn Clements glynn at gclements.plus.com
Wed Jul 23 07:27:25 EDT 2008


Jana K. wrote:

> Looks like you do have correct settings in the PROJ_INFO in both
> PERMANENT mapsets. Can you post the header file of the raster map you
> want to reproject? Maybe it's malformed, for whatever reason. You'll
> find it in location/mapset/cellhd folder.
> 
> 
> Thanks all of you for quick help, I think Maciej hit the problem - here is
> the input file header:
> 
> proj:       0

> Now
> when I looked at the headers of all files that I manipulated in this
> location, all of them have the projection 0 in their headers.

0 is X-Y. The DEFAULT_WIND and WIND files only contain minimal
projection information; specifically, it categorises the projection as
one of the following:

	#define PROJECTION_XY  0
	#define PROJECTION_UTM 1
	#define PROJECTION_SP  2
	#define PROJECTION_LL  3
	#define PROJECTION_OTHER  99

and also records the zone for UTM projections. All other projection
information is stored in the PROJ_INFO file.

> (By the way, what is "format" in the header? Some of them have 0 and
> others 1).

It's one less than the maximum number of bytes per cell, i.e. 0 => 1
byte/cell, 1 => 2 bytes/cell etc. A format of -1 indicates a
floating-point map. It's used to determine how large a buffer to
allocate for the raw map data.

And the "compressed" field indicates compression: 0 = no compression,
1 = RLE compression, 2 = zlib (gzip) compression, -1 = pre-3.0 format.

> Now, how can I solve this problem? Can I simply manually change the
> information in header files? 

You can correct the projection information (both in the DEFAULT_WIND
and WIND files and the PROJ_INFO file)by running g.setproj, or by
using "g.proj -c ..." without a location= argument.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list