1r.in.bin(1)                   Grass User's Manual                  r.in.bin(1)
2
3
4

NAME

6       r.in.bin  - Import a binary raster file into a GRASS raster map layer.
7

KEYWORDS

9       raster
10

SYNOPSIS

12       r.in.bin
13       r.in.bin help
14       r.in.bin    [-sfdbh]    input=string    output=name    [title="phrase"]
15       [bytes=integer]      [north=float]      [south=float]      [east=float]
16       [west=float]    [rows=float]    [cols=float]   [anull=float]   [--over‐
17       write]
18
19   Flags:
20       -s  Signed data (high bit means negative value)
21
22       -f  Import as Floating Point Data (default: Integer)
23
24       -d  Import as Double Precision Data (default: Integer)
25
26       -b  Byte Swap the Data During Import
27
28       -h  Get region info from GMT style header
29
30       --overwrite
31
32   Parameters:
33       input=string
34           Bin raster file to be imported
35
36       output=name
37           Name for output raster map
38
39       title=
40           Title for resultant raster map
41
42       bytes=integer
43           Number of bytes per cell (1, 2, 4) Default: 1
44
45       north=float
46           Northern limit of geographic region (outer edge)
47
48       south=float
49           Southern limit of geographic region (outer edge)
50
51       east=float
52           Eastern limit of geographic region (outer edge)
53
54       west=float
55           Western limit of geographic region (outer edge)
56
57       rows=float
58           Number of rows
59
60       cols=float
61           Number of columns
62
63       anull=float
64           Set Value to NULL
65

DESCRIPTION

67       r.in.bin allows a user to create a (binary) GRASS raster map layer from
68       a variety of binary raster data formats.
69
70       The  -s flag is used for importing two's-complement signed data.
71
72       The   -h flag is used to read region information from a Generic Mapping
73       Tools (GMT) type binary header. It is compatible with GMT  binary  grid
74       types 1 and 2.
75
76       The  north,  south, east, and west field values entered are the coordi‐
77       nates of the edges of the geographic region.  The rows and  cols  field
78       values entered describe the dimensions of the matrix of data to follow.
79       If input is a GMT binary array (-h flag), the six dimension fields  are
80       obtained  from  the  GMT  header.  If the bytes field is entered incor‐
81       rectly an error will be generated suggesting a closer bytes value.
82
83       r.in.bin can be  used  to  import  numerous  binary  arrays  including:
84       ETOPO30,  ETOPO-5, ETOPO-2, Globe DEM, BIL, AVHRR and GMT binary arrays
85       (ID 1 & 2)
86

NOTES

88       If optional parameters are not supplied, r.in.bin attempts to calculate
89       them.  For  example if the rows and columns parameters are not entered,
90       r.in.bin automatically calculates them by subtracting south from  north
91       and  west  from  east.  This  will  only produce correct results if the
92       raster resolution equals 1. Also, if the north, south, east,  and  west
93       parameters  are  not  entered,  r.in.bin assigns them from the rows and
94       columns parameters. In the above AVHRR example,  the  raster  would  be
95       assigned a north=128, south=0, east=128, west=0.
96
97       The  geographic  coordinates  north, south, east, and west describe the
98       outer edges of the geographic region.  They run along the edges of  the
99       cells  at  the edge of the geographic region and not through the center
100       of the cells at the edges.
101
102       Eastern limit of geographic region (in projected  coordinates  must  be
103       east  of the west parameter value, but in geographical coordinates will
104       wrap around the globe; user errors can be  detected  by  comparing  the
105       ewres and nsres values of the imported map layer carefully).
106       Western  limit  of  geographic region (in projected coordinates must be
107       west of the east parameter value, but in geographical coordinates  will
108       wrap  around  the  globe;  user errors can be detected by comparing the
109       ewres and nsres values of the imported map layer carefully).
110
111       Notes on (non)signed data:
112
113       If you use the -s flag the highest bit is the sign bit. If  this  is  1
114       the  data  is  negative,  and the data interval is half of the unsigned
115       (not exactly).
116
117       This flag is only used if bytes= 1. If bytes= is  greater  than  1  the
118       flag is ignored.
119

EXAMPLES

121   GTOPO30 DEM
122       The following is a sample call of r.in.bin to import GTOPO30 DEM data:
123
124
125       r.in.bin -sb input=E020N90.DEM output=gtopo30 bytes=2 north=90 south=40
126       east=60 west=20 r=6000 c=4800
127
128
129       (you can add "anull=-9999" if you want sea level to have a NULL value)
130
131   GMT
132       The  following  is  a  sample  call  of r.in.bin to import a GMT type 1
133       (float) binary array:
134
135
136       r.in.bin -hf input=sample.grd output=sample.grass
137
138
139       (-b could be used to swap bytes if required)
140
141   AVHRR
142       The following is a sample call of r.in.bin to import an AVHRR image:
143
144
145       r.in.bin in=p07_b6.dat out=avhrr c=128 r=128
146
147
148   ETOPO2
149       The following is a sample call of r.in.bin to import  ETOPO2  DEM  data
150       (here full data set):
151
152
153       r.in.bin  ETOPO2.dos.bin out=ETOPO2min r=5400 c=10800 n=90 s=-90 w=-180
154       e=180 bytes=2
155       r.colors ETOPO2min rules=terrain
156
157
158   TOPEX/SRTM30 PLUS
159       The following is a sample call of r.in.bin to import SRTM30 PLUS data:
160
161
162       r.in.bin -sb input=e020n40.Bathmetry.srtm output=e020n40_topex  bytes=2
163       north=40 south=-10 east=60 west=20 r=6000 c=4800
164       r.colors e020n40_topex rules=etopo2
165
166

SEE ALSO

168         r.out.bin,  r.in.ascii,  r.out.ascii, r.in.arc, r.out.arc, r.in.gdal,
169       r.out.gdal
170

AUTHORS

172       Jacques Bouchard, France (bouchard@onera.fr)
173       Bob Covill, Canada (bcovill@tekmap.ns.ca)
174       Man page: Zsolt Felker (felker@c160.pki.matav.hu)
175
176       Last changed: $Date: 2007/02/08 11:23:14 $
177
178       Full index
179
180
181
182GRASS 6.2.2                                                        r.in.bin(1)
Impressum