Vous êtes sur la page 1sur 4

srtm2grd_readme.

txt
24 february 2005, modified 29 apr 2006
lhsu and apel
Instructions for maing a !"#$ready %&" '.grd file( from )*#" .hgt files.
+++++++++
,-. %o/nload )*#" files.
0 place to start is
http122///2.3pl.nasa.go42srtm2
%o/nload a rectangular bloc if you are going to follo/ these directions
exactly, since the grdmerge command can only paste together t/o blocs /ith edges
of the same length.
,2. 5opy or create the example files ,included at end of this file.1
grdraster.info
srtm2grd
gridmerge
,6. &dit grdraster.info to list the information for each of your )*#" files
grdraster.info can only be used for 60 files at a time. If you /ant to con4ert
more than 60 .hgt files in .grd files they must be batched into groups of 60 or
less.
7ou probably only need to change
,-. the I% number
,2. the $* lat2lon specification
,6. the file location
#here is additional documentation in the file itself.
,4. 8lace grdraster.info in your 92!"# directory
,5. "ae sure your .cshrc file has this line1
seten4 !"#_!*I%%I* 2home2'your subdirectory, :u2: or :u6:(2'your username(2gmt
example1
seten4 !"#_!*I%%I* 2home2u62lhsu2gmt
,6. &dit the srtm2grd file ,again, the I%, $*, and file location are the entities
you probably need to change.
example1
grdraster 450 $*;62;426626< $I0.05m $!=
2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0;6.grd $B
,<. "ae sure your srtm2grd file is executable ,chmod <-- srtm2grd. and run
,;. &dit the gridmerge script for your geographic location, or use the grdpaste
command manually to create your full bloc
,9. Cse !"# ,for example grdimage. to create an image
example1
grdimage 'yourgridfile.grd( $&600 $5!"#_relief.cpt $D=
Epro3ectionF $*=ErangeF $8 $G $? $B HH =EpsfileF
&xample files1
$$$$$$$$$$$$$$
grdraster.info
$$$$$$$$$$$$$$
I J,I.grdraster.info -.6 -020;200
I
I #his file contains information on rasterfiles /hich are readable /ith grdraster.
I #his file must be named =,!"#_!*I%%I*.2grdraster.info /here !"#_!*I%%I* is an
I en4ironmental 4ariable '=!"#K?"&2share2dbase(. #his file is read by grdraster
at
I run time. 0ny line beginning /ith a I /ill be treated as a comment, and blan
I lines are sipped. 0ny other line must ha4e the follo/ing items, all on one
I line, one line per rasterfile1
I
I file_number Ltitle stringL LM unitsL $* $I !or8 type scale offset AaAflag
filename ')(
I
I #here must be /hite space bet/een each item. Ltitle stringL and LM unitsL must
I be enclosed in L L, and they may ha4e /hite space /ithin them. #hey are limited
I to a maximum of ;0 characters. Ao other Nuotation mars should be on a line.
I #he entire line should be /ritable in 620 characters.
I
I file_number is an integer used to tell grdraster /hich raster to read. It must
I be uniNue to each raster.
I Ltitle stringL is a brief description of the data.
I LM unitsL describes the units of the data after they are scaled and offset.
I $*O/H2OeH2OsH2OnH describes the range of the raster in the usual !"# $* manner.
I $IOx_incH2Oy_incH describes the sampling inter4al in the usual !"# $I manner.
I !or8 is either ! or 8, indicating !rid or 8ixel registration.
I type is one of the follo/ing, indicating the ind of data stored in the raster1
I b bit data, either 0 or -, one bit per data 4alue.
I u unsigned character data.
I c signed character data.
I d unsigned t/o$byte integer data.
I i signed t/o$byte integer data.
I scale is a number /hich should be multiplied on the raster 4alue after read.
I offset is a number /hich should be added to the 'scaled( raster 4alue.
I AaAflag is a number /hich is /ritten in the raster to represent AaA.
I If all 4alues in the raster represent data, AaAflag is none.
I filename is the name the raster file. If filename begins /ith a L2L, then
I it /ill be treated as a complete name. If not, the complete name /ill
I be formed as =,!"#_!*I%%I*.2filename.
I ?ptionally, you may append a single character ) to indicate that this data set
I needs to be byte s/apped on this machine. Pecause binary data sets are not
I architecture$independent a file /ritten on, say, a )olaris computer /ill ha4e
I a different byte order than a 85 ,@inux or >IA62.. 7ou ha4e t/o alternati4e
I /ays to deal /ith this1 -. 5ompile in byte s/apping. #his occurs if the
I define flag $%!"#)>08 is gi4en to the compiler, and is the default action /hen
I installing !"# using installgmt if the byte order differs from that of a )un.
I 2. 0ppend the s/ap flag for those data sets that need it.
I
I 7ou /ill need to edit this to reflect /hich data you ha4e installed on your
I system, and append ) for s/apping if appropriate1
I
46< L)*#" !lobal #opographyL LmL $*<02<-26626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<0.hgt
46; L)*#" !lobal #opographyL LmL $*<-2<226626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<-.hgt
469 L)*#" !lobal #opographyL LmL $*<22<626626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<2.hgt
440 L)*#" !lobal #opographyL LmL $*<62<426626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<6.hgt
44- L)*#" !lobal #opographyL LmL $*<42<526626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<4.hgt
442 L)*#" !lobal #opographyL LmL $*<52<626626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<5.hgt
446 L)*#" !lobal #opographyL LmL $*<62<<26626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<6.hgt
444 L)*#" !lobal #opographyL LmL $*<<2<;26626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<<.hgt
445 L)*#" !lobal #opographyL LmL $*<;2<926626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<;.hgt
446 L)*#" !lobal #opographyL LmL $*<92;026626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<9.hgt
44< L)*#" !lobal #opographyL LmL $*;02;-26626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0;0.hgt
44; L)*#" !lobal #opographyL LmL $*;-2;226626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0;-.hgt
449 L)*#" !lobal #opographyL LmL $*;22;626626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0;2.hgt
450 L)*#" !lobal #opographyL LmL $*;62;426626< $I0.05m
! i - 0 $62<6; 2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0;6.hgt
$$$$$$$$
srtm2grd
$$$$$$$$
grdraster 46< $*<02<-26626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<0.grd $B
grdraster 46; $*<-2<226626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<-.grd $B
grdraster 469 $*<22<626626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<2.grd $B
grdraster 440 $*<62<426626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<6.grd $B
grdraster 44- $*<42<526626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<4.grd $B
grdraster 442 $*<52<626626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<5.grd $B
grdraster 446 $*<62<<26626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<6.grd $B
grdraster 444 $*<<2<;26626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<<.grd $B
grdraster 445 $*<;2<926626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<;.grd $B
grdraster 446 $*<92;026626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0<9.grd $B
grdraster 44< $*;02;-26626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0;0.grd $B
grdraster 44; $*;-2;226626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0;-.grd $B
grdraster 449 $*;22;626626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0;2.grd $B
grdraster 450 $*;62;426626< $I0.05m
$!2data24el420#2!"#2>?*@%#?8?2IA%I02A66&0;6.grd $B
$$$$$$$$$
gridmerge
$$$$$$$$$
IQ2bin2sh
I merge !"# .grd files incrementially I
I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I
I )tarting @ongitude I
0R60
PRSexpr =0 T -S
5RSexpr =P T -S
I &nding @ongitude I
%R;9
I @atitude I
latR2;&0
grdpaste A=lat=0.grd A=lat=P.grd $!A=lat=0=P.grd $B
/hile ' =P QR =% (
do
grdpaste A=lat=0=P.grd A=lat=5.grd $!A=lat=0=5.grd $B
:rm: A=lat=0=P.grd
PRSexpr =P T -S
5RSexpr =5 T -S
done

Vous aimerez peut-être aussi