This file is indexed.

/usr/share/doc/grass-doc/html/r.in.mat.html is in grass-doc 6.4.3-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS manual: r.in.mat</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>r.in.mat</b></em>  - Imports a binary MAT-File(v4) to a GRASS raster.
<h2>KEYWORDS</h2>
raster, import
<h2>SYNOPSIS</h2>
<b>r.in.mat</b><br>
<b>r.in.mat help</b><br>
<b>r.in.mat</b> [-<b>v</b>] <b>input</b>=<em>string</em>  [<b>output</b>=<em>string</em>]   [--<b>overwrite</b>]  [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>-v</b></DT>
<DD>Verbose mode</DD>

<DT><b>--overwrite</b></DT>
<DD>Allow output files to overwrite existing files</DD>
<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>input</b>=<em>string</em></DT>
<DD>Name of an existing MAT-File(v4)</DD>

<DT><b>output</b>=<em>string</em></DT>
<DD>Name for the output raster map (override)</DD>

</DL>
<h2>DESCRIPTION</h2>

<em>r.in.mat</em> will import a GRASS raster map from a Version 4 MAT-File 
which was created with Matlab or Octave.
Attributes such as map title and bounds will also be imported if they exist.
<br>
<br>
Specifically, the following array variables will be read:<br>
</ul>
  <li><b> map_data</b>
  <li><b> map_name</b>
  <li><b> map_title</b>
  <li><b> map_northern_edge</b>
  <li><b> map_southern_edge</b>
  <li><b> map_eastern_edge</b>
  <li><b> map_western_edge</b>
</ul>

Any other variables in the MAT-file will be simply skipped over.<br>
<br>
The '<b>map_name</b>' variable is optional, if it exists, and is valid, the 
new map will be thus named. If it doesn't exist or a name is specified with
the <b>output=</b> option, the raster map's name will be set to 
"<tt>MatFile</tt>" or the name specified respectively.
(maximum 64 characters; normal GRASS naming rules apply)
<br>
<br>
The '<b>map_title</b>' variable is optional, the map's title is set if it 
exists.
<br>
<br>
The '<b>map_northern_edge</b>' and like variables are mandatory unless the 
user is importing to a "XY" non-georeferenced location
(e.g. imagery data). Latitude and longitude values should be in decimal form.


<h2>NOTES</h2>

<em>r.in.mat</em> imports a Version 4 MAT-File. These files can be 
successfully created with more modern versions of Matlab and Octave
(see "EXAMPLES" below).<br><br>

Everything should be Endian safe, so the file to be imported can be simply 
copied between different system architectures without binary translation
(caveat: see "TODO" below).<br><br>

As there is no IEEE value for <tt>NaN</tt> in integer arrays, GRASS's null 
value may be used to represent it within these maps. Usually Matlab will save 
any integer based matrix with <tt>NaN</tt> values as a double-precision 
floating point array, so this usually isn't an issue. To save space, once the 
map is loaded into GRASS you can convert it back to an integer map with the 
following command:
<div class="code"><pre>
r.mapcalc int_map="int(MATFile_map)"
</pre></div>

<tt>NaN</tt> values in either floating point or double-precision floating point
matrices should translate into null values as expected.<br><br>


<em>r.in.mat</em> must load the entire map array into memory before writing,
therefore it might have problems with <i>huge</i> arrays.
(a 3000x4000 DCELL map uses about 100mb RAM)<br><br>

GRASS defines its map bounds at the outer-edge of the bounding cells, not at
the coordinates of their centroids. Thus, the following Matlab commands may 
be used to determine and check the map's resolution information will be correct:
<div class="code"><pre>
    [rows cols] = size(map_data)
    x_range = map_eastern_edge - map_western_edge
    y_range = map_northern_edge - map_southern_edge
    ns_res = y_range/rows
    ew_res = x_range/cols
</pre></div>

<br>
Remember Matlab arrays are referenced as <tt>(row,column)</tt>,
i.e. <tt>(y,x)</tt>.
<br><br>
In addition, <em>r.in.mat</em> and <em>r.out.mat</em> make for a nice 
binary container format for transferring georeferenced maps around, 
even if you don't use Matlab or Octave. 

<h2>EXAMPLES</h2>

In Matlab, save with:
<div class="code"><pre>
save filename.mat map_* -v4
</pre></div>

In Octave, save with:
<div class="code"><pre>
save -mat4-binary filename.mat map_*
</pre></div>

<br>

<h2>TODO</h2>

Robust support for mixed-Endian importation.
<i>(This is a work in progress, please help by reporting any failures to the
<a href="http://trac.osgeo.org/grass/">
GRASS bug tracking system</a></i>; you will need to login with an OSGeo Userid)
<br>
Add support for importing map history, category information, color map, etc.
if they exist.
<br>
Option to import a version 5 MAT-File, with map and support information 
stored in a single structured array.

<h2>BUGS</h2>

If you encounter any problems, please contact the GRASS Development Team.

<h2>SEE ALSO</h2>

<i>
<a href="r.out.mat.html">r.out.mat</a>,
<a href="r.in.ascii.html">r.in.ascii</a>, 
<a href="r.in.bin.html">r.in.bin</a>,
<a href="r.mapcalc.html">r.mapcalc</a>,
<a href="r.null.html">r.null</a>.<p>
The <a href="http://www.octave.org">Octave</a> project
</i>


<h2>AUTHOR</h2>

Hamish Bowman<br> <i>
Department of Marine Science<br>
University of Otago<br>
New Zealand</i><br>

<br>
<p><i>Last changed: $Date: 2011-11-08 03:29:50 -0800 (Tue, 08 Nov 2011) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="raster.html">raster index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2013 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>