mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[GRASS] suppress raster masking for rendering and querying
This commit is contained in:
parent
4f2da483ac
commit
e7a0167189
@ -60,6 +60,7 @@
|
||||
#define G_read_colors Rast_read_colors
|
||||
#define G_window_cols Rast_window_cols
|
||||
#define G_window_rows Rast_window_rows
|
||||
#define G_suppress_masking Rast_suppress_masking
|
||||
#endif
|
||||
|
||||
int display( char *name, char *mapset, RASTER_MAP_TYPE data_type, char *format );
|
||||
@ -123,6 +124,8 @@ int main( int argc, char **argv )
|
||||
G_adjust_Cell_head( &window, 1, 1 );
|
||||
G_set_window( &window );
|
||||
|
||||
G_suppress_masking(); // must be after G_set_window()
|
||||
|
||||
raster_type = G_raster_map_type( name, "" );
|
||||
|
||||
display( name, mapset, raster_type, format->answer );
|
||||
|
@ -54,6 +54,7 @@
|
||||
#define G_read_fp_range Rast_read_fp_range
|
||||
#define G_window_cols Rast_window_cols
|
||||
#define G_window_rows Rast_window_rows
|
||||
#define G_suppress_masking Rast_suppress_masking
|
||||
#endif
|
||||
|
||||
int main( int argc, char **argv )
|
||||
@ -114,7 +115,6 @@ int main( int argc, char **argv )
|
||||
if ( G_parser( argc, argv ) )
|
||||
exit( EXIT_FAILURE );
|
||||
|
||||
|
||||
if ( strcmp( "proj", info_opt->answer ) == 0 )
|
||||
{
|
||||
G_get_window( &window );
|
||||
@ -211,6 +211,7 @@ int main( int argc, char **argv )
|
||||
char buff[101];
|
||||
G_get_cellhd( rast_opt->answer, "", &window );
|
||||
G_set_window( &window );
|
||||
G_suppress_masking(); // must be after G_set_window()
|
||||
fd = G_open_cell_old( rast_opt->answer, "" );
|
||||
// wait for coords from stdin
|
||||
while ( fgets( buff, 100, stdin ) != 0 )
|
||||
@ -323,6 +324,7 @@ int main( int argc, char **argv )
|
||||
window.cols = ( int ) atoi( cols_opt->answer );
|
||||
|
||||
G_set_window( &window );
|
||||
G_suppress_masking(); // must be after G_set_window()
|
||||
fd = G_open_cell_old( rast_opt->answer, "" );
|
||||
|
||||
ncols = G_window_cols();
|
||||
|
@ -368,9 +368,11 @@ bool QgsGrass::init( void )
|
||||
return false;
|
||||
}
|
||||
|
||||
// I think that mask should not be used in QGIS as it can only confuses people,
|
||||
// I think that mask should not be used in QGIS as it can confuse users,
|
||||
// anyway, I don't think anybody is using MASK
|
||||
// TODO7: Rast_suppress_masking (see G_suppress_masking() macro above) needs MAPSET
|
||||
// (it should not be necessary, because rasters are read by modules qgis.g.info and qgis.d.rast
|
||||
// where masking is suppressed)
|
||||
#if GRASS_VERSION_MAJOR < 7
|
||||
G_suppress_masking();
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user