EnglishFrenchSpanish

OnWorks favicon

r.out.matgrass - Online in the Cloud

Run r.out.matgrass in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command r.out.matgrass that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


r.out.mat - Exports a GRASS raster to a binary MAT-File.

KEYWORDS


raster, export

SYNOPSIS


r.out.mat
r.out.mat --help
r.out.mat input=name output=name [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:
--overwrite
Allow output files to overwrite existing files

--help
Print usage summary

--verbose
Verbose module output

--quiet
Quiet module output

--ui
Force launching GUI dialog

Parameters:
input=name [required]
Name of input raster map

output=name [required]
Name for output binary MAT file

DESCRIPTION


r.out.mat will export a GRASS raster map to a MAT-File which can be loaded into Matlab or
Octave for plotting or further analysis. Attributes such as map title and bounds will
also be exported into additional array variables.
Specifically, the following array variables are created:

·
map_data

·
map_name

·
map_title (if it exists)

·
map_northern_edge

·
map_southern_edge

·
map_eastern_edge

·
map_western_edge
In addition, r.out.mat makes for a nice binary container format for transferring
georeferenced maps around, even if you don’t use Matlab or Octave.

NOTES


r.out.mat exports a Version 4 MAT-File. These files should successfully load into more
modern versions of Matlab and Octave without any problems.
Everything should be Endian safe, so the resultant file can be simply copied between
different system architectures without binary translation.
As there is no IEEE value for NaN for integer maps, GRASS’s null value is used to
represent it within these maps. You’ll have to do something like this to clean them once
the map is loaded into Matlab:
map_data(find(map_data < -1e9)) = NaN;
Null values in maps containing either floating point or double-precision floating point
data should translate into NaN values as expected.
r.out.mat must load the entire map into memory before writing, therefore it might have
problems with huge maps. (a 3000x4000 DCELL map uses about 100mb RAM)
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 the map’s resolution information:
[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

EXAMPLE


In Matlab, plot with either:
imagesc(map_data), axis equal, axis tight, colorbar
or
contourf(map_data, 24), axis ij, axis equal, axis tight, colorbar

TODO


Add support for exporting map history, category information, color map, etc.
Option to export as a version 5 MAT-File, with map and support information stored in a
single structured array.

Use r.out.matgrass online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    strace
    strace
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • 2
    gMKVExtractGUI
    gMKVExtractGUI
    A GUI for mkvextract utility (part of
    MKVToolNix) which incorporates most (if
    not all) functionality of mkvextract and
    mkvinfo utilities. Written in C#NET 4.0,...
    Download gMKVExtractGUI
  • 3
    JasperReports Library
    JasperReports Library
    JasperReports Library is the
    world's most popular open source
    business intelligence and reporting
    engine. It is entirely written in Java
    and it is able to ...
    Download JasperReports Library
  • 4
    Frappe Books
    Frappe Books
    Frappe Books is a free and open source
    desktop book-keeping software that's
    simple and well-designed to be used by
    small businesses and freelancers. It'...
    Download Frappe Books
  • 5
    Numerical Python
    Numerical Python
    NEWS: NumPy 1.11.2 is the last release
    that will be made on sourceforge. Wheels
    for Windows, Mac, and Linux as well as
    archived source distributions can be fou...
    Download Numerical Python
  • 6
    CMU Sphinx
    CMU Sphinx
    CMUSphinx is a speaker-independent large
    vocabulary continuous speech recognizer
    released under BSD style license. It is
    also a collection of open source tools ...
    Download CMU Sphinx
  • More »

Linux commands

crm
crm
Use crm online using onworks.net
services. ...
Run crm
  • 4
    crmgr
    crmgr
    crmgr - administration utility for QDBM
    Curia ...
    Run crmgr
  • 5
    gappletviewer
    gappletviewer
    gappletviewer - Load and runs an applet
    ...
    Run gappletviewer
  • 6
    gaps
    gaps
    mummer - package for sequence alignment
    of multiple genomes ...
    Run gaps
  • s-processed="true">
    g15stats
    g15stats - A CPU/Memory/Swap usage
    meter for G15Daemon DESCRIPTION: The
    packages provides the following usage
    meter for LCD on some Logitech
    keyboards, usind g...
    Run g15stats
  • More »
  • Ad