1r.in.bin(1)                 GRASS GIS 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, import
10

SYNOPSIS

12       r.in.bin
13       r.in.bin --help
14       r.in.bin [-fdsbh] input=name output=name  [title=phrase]   [bytes=inte‐
15       ger]       [header=integer]       [bands=integer]        [order=string]
16       [north=float]   [south=float]   [east=float]   [west=float]   [rows=in‐
17       teger]    [cols=integer]    [anull=float]    [flip=string[,string,...]]
18       [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]
19
20   Flags:
21       -f
22           Import as floating-point data (default: integer)
23
24       -d
25           Import as double-precision floating-point data (default: integer)
26
27       -s
28           Signed data (two’s complement)
29
30       -b
31           Byte swap the data during import
32
33       -h
34           Get region info from GMT style header
35
36       --overwrite
37           Allow output files to overwrite existing files
38
39       --help
40           Print usage summary
41
42       --verbose
43           Verbose module output
44
45       --quiet
46           Quiet module output
47
48       --ui
49           Force launching GUI dialog
50
51   Parameters:
52       input=name [required]
53           Name of binary raster file to be imported
54
55       output=name [required]
56           Output name or prefix if several bands are imported
57
58       title=phrase
59           Title for resultant raster map
60
61       bytes=integer
62           Number of bytes per cell
63           Options: 1, 2, 4, 8
64
65       header=integer
66           Header size in bytes
67           Default: 0
68
69       bands=integer
70           Number of bands in input file
71           Bands must be in band-sequential order
72           Default: 1
73
74       order=string
75           Output byte order
76           Options: big, little, native, swap
77           Default: native
78
79       north=float
80           Northern limit of geographic region (outer edge)
81
82       south=float
83           Southern limit of geographic region (outer edge)
84
85       east=float
86           Eastern limit of geographic region (outer edge)
87
88       west=float
89           Western limit of geographic region (outer edge)
90
91       rows=integer
92           Number of rows
93
94       cols=integer
95           Number of columns
96
97       anull=float
98           Set Value to NULL
99
100       flip=string[,string,...]
101           Flip input horizontal and/or vertical
102           Options: h, v
103           h: Flip input horizontal (East - West)
104           v: Flip input vertical (North - South)
105

DESCRIPTION

107       r.in.bin  allows  the  user to create a (binary) GRASS raster map layer
108       from a variety of binary raster data formats.
109
110       The  -s flag is used for importing two’s-complement signed data.
111
112       The  -h flag is used to read region information from a Generic  Mapping
113       Tools  (GMT)  type binary header. It is compatible with GMT binary grid
114       types 1 and 2.
115
116       The north, south, east, and west field values are  the  coordinates  of
117       the  edges  of the geographic region. The rows and cols values describe
118       the dimensions of the matrix of data to follow. If the input is  a  GMT
119       binary  array  (-h flag), the six dimension fields (north, south, east,
120       west, rows and cols) are obtained from the GMT  header.  If  the  bytes
121       field  is  entered  incorrectly an error will be generated suggesting a
122       closer bytes value.
123
124       r.in.bin can be  used  to  import  numerous  binary  arrays  including:
125       ETOPO30,  ETOPO-5, ETOPO-2, Globe DEM, BIL, AVHRR and GMT binary arrays
126       (ID 1 & 2).
127

NOTES

129       If optional parameters are not supplied, r.in.bin attempts to calculate
130       them.  For  example if the rows and columns parameters are not entered,
131       r.in.bin automatically calculates them by subtracting south from  north
132       and  west  from  east.  This  will  only produce correct results if the
133       raster resolution equals 1. Also, if the north, south, east,  and  west
134       parameters  are  not  entered,  r.in.bin assigns them from the rows and
135       columns parameters. In the AVHRR example (see below), the raster  would
136       be assigned a north=128, south=0, east=128, west=0.
137
138       The  geographic  coordinates  north, south, east, and west describe the
139       outer edges of the geographic region. They run along the edges  of  the
140       cells  at  the edge of the geographic region and not through the center
141       of the cells at the edges.
142
143       Eastern limit of geographic region (in projected  coordinates  must  be
144       east  of the west parameter value, but in geographical coordinates will
145       wrap around the globe; user errors can be  detected  by  comparing  the
146       ewres and nsres values of the imported map layer carefully).
147       Western  limit  of  geographic region (in projected coordinates must be
148       west of the east parameter value, but in geographical coordinates  will
149       wrap  around  the  globe;  user errors can be detected by comparing the
150       ewres and nsres values of the imported map layer carefully).
151
152       Notes on (non)signed data:
153
154       If you use the -s flag, the highest bit is the sign bit. If this is  1,
155       the  data  is  negative,  and the data interval is half of the unsigned
156       (not exactly).
157
158       This flag is only used if bytes= 1. If bytes is  greater  than  1,  the
159       flag is ignored.
160

EXAMPLES

162   GTOPO30 DEM
163       The following is a sample call of r.in.bin to import GTOPO30 DEM data:
164
165       r.in.bin -sb input=E020N90.DEM output=gtopo30 bytes=2 north=90 south=40
166       east=60 west=20 r=6000 c=4800
167
168       (you can add "anull=-9999" if you want sea level to have a NULL value)
169
170   GMT
171       The  following  is  a  sample  call  of r.in.bin to import a GMT type 1
172       (float) binary array:
173
174       r.in.bin -hf input=sample.grd output=sample.grass
175
176       (-b could be used to swap bytes if required)
177
178   AVHRR
179       The following is a sample call of r.in.bin to import an AVHRR image:
180
181       r.in.bin in=p07_b6.dat out=avhrr c=128 r=128
182
183   ETOPO2
184       The following is a sample call of r.in.bin to import  ETOPO2  DEM  data
185       (here full data set):
186
187       r.in.bin ETOPO2.dos.bin out=ETOPO2min r=5400 c=10800 n=90 s=-90 w=-180 e=180 bytes=2
188       r.colors ETOPO2min rules=terrain
189
190   TOPEX/SRTM30 PLUS
191       The following is a sample call of r.in.bin to import SRTM30 PLUS data:
192
193       r.in.bin -sb input=e020n40.Bathymetry.srtm output=e020n40_topex \
194                bytes=2 north=40 south=-10 east=60 west=20 r=6000 c=4800
195       r.colors e020n40_topex rules=etopo2
196
197   GPCP
198       The  following  is  a  sample  call of r.in.bin to import GPCP 1DD v1.2
199       data:
200
201       YEAR="2000"
202       MONTH="01"
203       # number of days of this month
204       MDAYS=`date -d"${YEAR}-${MONTH}-01 + 1 month - 1 day" +%d`
205       r.in.bin in=gpcp_1dd_v1.2_p1d.${YEAR}${MONTH} out=gpcp_${YEAR}.${MONTH}. \
206                order=big bytes=4 -f header=1440 anull=-99999 \
207                n=90 s=-90 w=0 e=360 rows=180 cols=360 bands=$MDAYS
208
209       The following is a sample call of r.in.bin to import GPCP v2.2 data:
210
211       r.in.bin in=gpcp_v2.2_psg.1979 out=gpcp_1979. \
212                order=big bytes=4 -f header=576 anull=-99999 \
213                n=90 s=-90 w=0 e=360 rows=72 cols=144 bands=12
214

SEE ALSO

216        r.import, r.out.bin, r.in.ascii, r.out.ascii,  r.in.gdal,  r.out.gdal,
217       r.in.srtm
218

AUTHORS

220       Jacques Bouchard, France (bouchard@onera.fr)
221       Bob Covill, Canada (bcovill@tekmap.ns.ca)
222       Markus Metz
223       Man page: Zsolt Felker (felker@c160.pki.matav.hu)
224

SOURCE CODE

226       Available at: r.in.bin source code (history)
227
228       Accessed: Saturday Oct 28 18:17:34 2023
229
230       Main  index  | Raster index | Topics index | Keywords index | Graphical
231       index | Full index
232
233       © 2003-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual
234
235
236
237GRASS 8.3.1                                                        r.in.bin(1)
Impressum