importing global data

Susan Huse sue at ced.berkeley.edu
Wed Aug 4 12:31:08 EDT 1993


> From grass-lists-owner at max.cecer.army.mil Wed Aug  4 05:36:35 1993
> Date: Wed, 4 Aug 93 22:22:59 EST
> From: simon at cerberus.earth.monash.edu.au (Simon Cox)
> Sender: grass-lists-owner at max.cecer.army.mil
> Reply-To: grassu-list at max.cecer.army.mil
> To: grassu-list at amber.cecer.army.mil
> Subject: importing global data
> Content-Length: 1869
> 
> 
> 
> Dear Grass-hoppers
> 
> I bought a copy of the NGDC_RELIEF CDRom, and am trying to import
> some of the datasets into Grass.  This has revealed a deficiency
> in my understanding of Grass raster maps.
> 
> The data I am first trying to import is the Global 5 minute elevation grid.
> This is supplied in binary format, standard SUN 2-byte signed ints,
> in 2160 rows x 4320 cols.  The first row represents the North Pole.
> The last row represents 89:55:00S.
> 
> I set up a new location with North at 90N, South at 90S, West at 0,
> East at 0, and a resolution of 5 minutes.  This gave the right number
> of cells.  I then copied the file straight into a Grass cell directory,
> made a few other support files in cellhd etc, and ran r.support to
> make the rest.  This worked fine except
> 
> (i) the negative values (bathymetry) have 65536 added to them
> (ie -1m shows as 65535m elevation!)
> 
We had a similar problem with our elevation data, except they had wrapped
at 32768 (=2^15) rather than 2^16.  We did a g.mapcalc, ex:

	elevation=if(oldelevation>65500,oldelevation-65536,oldelevation)

> (ii) d.what.rast shows that the cells are misregistered by 2.5 degrees
> South and (?) East.  Does d.what.rast give coords of cell *centres* or
> one of the corners? 

Center of cell

> if the former, then this suggests that the region
> should be set 1/2 a pixel outside the data.  Is this true?  In which case
> we are in trouble here at the North Pole at least, as grass wont accept
> 90:02:03N as a valid region boundary!

I'm not sure I understand what you tried to do here, but it sounds like
rather than changing your region, you might want to fiddle with the cellhd 
north, south, east and west. 
 
> It is now 10:30 pm and my brain is beginning to hurt with all this.
> Can anyone offer clarification or suggestions?
> 
> Thanks
> 
> Simon Cox
> 
> 
> ----
> __________________________________________________________________
> 				Dr Simon Cox
>          __  L				
>       ,~'  L_|\            	Department of Earth Sciences       
>    ,-'         \         	Monash University    
>    (            \		Clayton  Vic  3168  Australia
>    \    ___     /	
>     L,~'   "\_x/		Phone +61 3 565 5762
>               u   		Fax   +61 3 565 5062
> 				simon at cerberus.earth.monash.edu.au
> __________________________________________________________________
> 




More information about the grass-user mailing list