[GRASS5] please add r.in.mat to 5.7...

Jeff D. Hamann jeff.hamann at forestinformatics.com
Tue Mar 30 11:21:00 EST 2004


That would be great..... 


Message: 1
Date: Tue, 30 Mar 2004 03:19:28 +1200
From: Hamish <hamish_nospam at yahoo.com>
To: grass5 <grass5 at grass.itc.it>
Subject: [GRASS5] new module: r.in.mat

Hi,

I've just added a new module named r.in.mat for importing maps from
Matlab or Octave. This is the companion module to r.out.mat which I
added last week. Most of the caveats there apply here as well.

see  http://grass.itc.it/pipermail/grass5/2004-March/013937.html
[Correction from that email: use imagesc(map_data) not image(map_data)]



Here's the help & header comments:


Description:
 Import a binary MAT-File(v4) to a GRASS raster.

Usage:
 r.in.mat [-v] input=name [output=name]

Flags:
  -v   Verbose mode

Parameters:
   input   Name of an existing MAT-File(v4)
  output   Name for the output raster map (override)

/*
 *  FILE MUST CONTAIN THE FOLLOWING MATRIX :
 *    map_data     with the map data
 *
 *  AND OPTIONALLY :
 *    map_name     name for new map (max 64 chars, normal rules apply)
 *    map_title    contains map title (max 40 chars)
 *
 *  THESE MUST BE PRESENT UNLESS USING THE "XY" PROJECTION :
 *    map_northern_edge
 *    map_southern_edge    in decimal form (ie not DDD:MM:SS)
 *    map_eastern_edge
 *    map_western_edge
 *
 *  ALL OTHER MATRICES WILL BE PASSED OVER. (cleanly, I hope)
 *
 *   tip: Save a version 4 MAT-File with the command:
 *         "save filename.mat map_* -v4"
 */


The program works for me, but testing would be nice esp. on something
big endian or 64bit.

The speed & ease of matrix algebra in Matlab is pretty extraordinary,
& these two modules make for quick & easy GRASS->Matlab->GRASS trips.

In addition, it makes for a nice binary container format for
transferring maps around that other free software can read, even if 
you don't use Matlab or Octave. 


Shall I add these to 5.7?


---
Jeff D. Hamann
Forest Informatics, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
541-754-1428
jeff.hamann at forestinformatics.com
www.forestinformatics.com




More information about the grass-dev mailing list