Skip to content
Permalink
Browse files
More GRASS direct modules
  • Loading branch information
blazek committed Dec 6, 2012
1 parent b777b51 commit cb7d1ec18ecd8a9c92a0aff4339145ce7d51b695
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Create aspect raster from DEM (digital elevation model)" module="r.slope.aspect">
<qgisgrassmodule label="Create aspect raster from DEM (digital elevation model)" module="r.slope.aspect" direct="1">
<option key="elevation" />
<option key="aspect" />
</qgisgrassmodule>
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Calculate average of raster within areas with the same category in a user-defined base map" module="r.average">
<!-- direct problem: r.average is using external r.stats, r.recode -->
<qgisgrassmodule label="Calculate average of raster within areas with the same category in a user-defined base map" module="r.average" direct="0">
<option key="base" />
<option key="cover" />
<flag key="c" />
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Create watershed subbasins raster" module="r.basins.fill">
<!-- direct note: the module runs, but it was not tested with real data -->
<qgisgrassmodule label="Create watershed subbasins raster" module="r.basins.fill" direct="1">
<option key="number" />
<option key="c_map" />
<option key="t_map" />
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Bilinear interpolation utility for raster maps" module="r.bilinear">
<!-- The GRASS module r.bilinear fails with fatal error: This module is deprecated. Please use 'r.resamp.interp' instead. -->
<qgisgrassmodule label="Bilinear interpolation utility for raster maps" module="r.bilinear" direct="1">
<option key="input" />
<option key="output" />
</qgisgrassmodule>
</qgisgrassmodule>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Compares bit patterns with raster" module="r.bitpattern">
<qgisgrassmodule label="Compares bit patterns with raster" module="r.bitpattern" direct="1">
<flag key="q" />
<option key="input" />
<option key="input" />
@@ -126,6 +126,19 @@ QgsGdalProvider::QgsGdalProvider( QString const & uri )
setDataSourceUri( vsiPrefix + uri );
QgsDebugMsg( QString( "Trying %1 syntax, uri= %2" ).arg( vsiPrefix ).arg( dataSourceUri() ) );
}
else
{
// TODO: this constructor is also called for new rasters, in that case GDAL prints error:
// "ERROR 4: `pok.tif' does not exist in the file system, and is not recognised as a supported dataset name."
// To avoid this message, we test first if the file exists at all.
// This should be done better adding static create() method or something like that
if ( !QFile::exists( uri ) )
{
QString msg = QString( "File does not exist: %1" ).arg( dataSourceUri() );
appendError( ERR( msg ) );
return;
}
}

QString gdalUri = dataSourceUri();

@@ -63,11 +63,13 @@ SET ( FUNCTIONS
"G_allocate_raster_buf"
"G__calloc"
"G_col_to_easting"
"G_convert_dirseps_to_host"
"G_define_flag"
"G_define_module"
"G_define_option"
"G_define_standard_option"
"G_free"
"G_free_raster_cats"
"G_get_fp_range_min_max"
"G_get_range_min_max"
"G_get_window"

0 comments on commit cb7d1ec

Please sign in to comment.