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, import
10

SYNOPSIS

12       r.in.bin
13       r.in.bin help
14       r.in.bin    [-fdsbh]    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]  [--verbose]  [--quiet]
18
19   Flags:
20       -f
21           Import as Floating Point Data (default: Integer)
22
23       -d
24           Import as Double Precision Data (default: Integer)
25
26       -s
27           Signed data (high bit means negative value)
28
29       -b
30           Byte Swap the Data During Import
31
32       -h
33           Get region info from GMT style header
34
35       --overwrite
36           Allow output files to overwrite existing files
37
38       --verbose
39           Verbose module output
40
41       --quiet
42           Quiet module output
43
44   Parameters:
45       input=string
46           Binary raster file to be imported
47
48       output=name
49           Name for output raster map
50
51       title=
52           Title for resultant raster map
53
54       bytes=integer
55           Number of bytes per cell (1, 2, 4)
56           Default: 1
57
58       north=float
59           Northern limit of geographic region (outer edge)
60
61       south=float
62           Southern limit of geographic region (outer edge)
63
64       east=float
65           Eastern limit of geographic region (outer edge)
66
67       west=float
68           Western limit of geographic region (outer edge)
69
70       rows=float
71           Number of rows
72
73       cols=float
74           Number of columns
75
76       anull=float
77           Set Value to NULL
78

DESCRIPTION

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

NOTES

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

EXAMPLES

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

SEE ALSO

181        r.out.bin, r.in.ascii, r.out.ascii,  r.in.arc,  r.out.arc,  r.in.gdal,
182       r.out.gdal, r.in.srtm
183

AUTHORS

185       Jacques Bouchard, France (bouchard@onera.fr)
186       Bob Covill, Canada (bcovill@tekmap.ns.ca)
187       Man page: Zsolt Felker (felker@c160.pki.matav.hu)
188
189       Last changed: $Date: 2007-03-12 13:38:42 +0100 (Mon, 12 Mar 2007) $
190
191       Full index
192
193       © 2003-2008 GRASS Development Team
194
195
196
197GRASS 6.3.0                                                        r.in.bin(1)
Impressum