[GRASS-SVN] r44045 - grass-addons/imagery/i.landsat.acca
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Oct 25 19:05:57 EDT 2010
Author: martinl
Date: 2010-10-25 16:05:57 -0700 (Mon, 25 Oct 2010)
New Revision: 44045
Modified:
grass-addons/imagery/i.landsat.acca/algorithm.c
Log:
fix r44043
Modified: grass-addons/imagery/i.landsat.acca/algorithm.c
===================================================================
--- grass-addons/imagery/i.landsat.acca/algorithm.c 2010-10-25 22:50:32 UTC (rev 44044)
+++ grass-addons/imagery/i.landsat.acca/algorithm.c 2010-10-25 23:05:57 UTC (rev 44045)
@@ -216,15 +216,19 @@
int count[], int cold[], int warm[], double stats[])
{
int i, row, col, nrows, ncols;
+ char *mapset;
char code;
double pixel[5], nsdi, rat56;
/* Creation of output file */
- out->rast = G_allocate_raster_buf(CELL_TYPE);
+ mapset = G_find_cell2(out->name, "");
+ if (mapset == NULL)
+ G_fatal_error(_("Raster map <%s> not found"), out->name);
if ((out->fd = G_open_new(out->name, CELL_TYPE)) < 0)
G_fatal_error(_("Unable to create raster map <%s>"), out->name);
+ out->rast = G_allocate_raster_buf(CELL_TYPE);
/* ----- ----- */
G_message(_("Processing first pass..."));
More information about the grass-commit
mailing list