Conversion of GTOPO30

Jacques Bouchard bouchard at onera.fr
Tue Jul 7 10:17:59 EDT 1998


Luis Franco wrote (many days ago):

> 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...

I know 2 ways of importing GTOPO30 (and GLCC) maps:

-------------------------------------------------------------------------
1) use the standard module "r.in.ll" to import in a UTM region
-------------------------------------------------------------------------

Ex:

r.in.ll -s input=E020N90.DEM output=gtopo30 bpc=2
corner=sw,40:00:15N,20:00:15E dimension=6000,4800 res=30,30
spheroid=wgs84

-------------------------------------------------------------------------
2) use "r.in.bin", a module I wrote, which is similar to r.in.ascii,
to import in a (x,y) region.
-------------------------------------------------------------------------

Ex:

r.in.bin -s input=E020N90.DEM output=gtopo30 bytes=2 north=90 south=40
east=60 west=20 r=6000 c=4800

(you can add "subst=-9999,0" if you want sea level to have 0 value)


These 2 modules exist in GRASS4.2.1 V17 from Markus Neteler, but:
* r.in.ll doesn't handle negative cell values properly (I corrected
that)
* I have upgraded r.in.bin.

Until they are updated by Markus Neteler in his distribution,
I can mail the 2 new Intel-binaries to anyone who needs them.

Jacques



More information about the grass-user mailing list