Conversion of GTOPO30

Angus Carr apcarr at FLASH.LakeheadU.CA
Mon Jun 15 08:42:26 EDT 1998


With 16-bit integers, you could use the bit-shift operators in C to
extract the two bytes separately, then add them together.

All you would need to do is an 8-bit shift left and an 8-bit shift right,
then sum the results.

If you need a function example, drop me a note.

Angus Carr.

On Sat, 13 Jun 1998, Luis Franco wrote:

> Hi, grass comunity. 
> 
> I've manage to get a program to convert the GTOPO30 maps to grass raster 
> ascii format and import them in grass (for version 4.0- I don't know if 
> it works with any other...) but it's kind of slow (only one of the many 
> files that comprises it took 3 hours on a Pentium II - 233 MHz...). I 
> need to know something that any low-level programmer knows (not me...). 
> What's the faster algorithm to exchange from Most Significant Byte first 
> (MBR) of Motorola's processors to the PC format of saving binary 
> numbers. We're talking of 57 Mb of 16-bit integer...
> 
> Thanks for any hand
> 
> ----------------- // --------------
> 
> Luís Filipe Franco
> 
> Computers, Maths and Music-> Mankind greatest work (in any order)
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> 



More information about the grass-user mailing list