Skip to content
Permalink
Browse files

read window from map

git-svn-id: http://svn.osgeo.org/qgis/trunk@13064 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 16, 2010
1 parent 72c7dd0 commit 74141c9288943c44c71a086c120c919cb56dd3b9
Showing with 9 additions and 7 deletions.
  1. +9 −7 src/providers/grass/qgis.d.rast.c
@@ -54,7 +54,15 @@ int main( int argc, char **argv )

name = map->answer;

G_get_window( &window );
/* Make sure map is available */
mapset = G_find_cell2( name, "" );
if ( mapset == NULL )
G_fatal_error(( "Raster map <%s> not found" ), name );

/* It can happen that GRASS data set is 'corrupted' and zone differs in WIND and
* cellhd, and G_open_cell_old fails, so it is better to read window from map */
/* G_get_window( &window ); */
G_get_cellhd( name, mapset, &window );
window.west = atof( win->answers[0] );
window.south = atof( win->answers[1] );
window.east = atof( win->answers[2] );
@@ -64,12 +72,6 @@ int main( int argc, char **argv )
G_adjust_Cell_head( &window, 1, 1 );
G_set_window( &window );

/* Make sure map is available */
mapset = G_find_cell2( name, "" );
if ( mapset == NULL )
G_fatal_error(( "Raster map <%s> not found" ), name );


fp = G_raster_map_is_fp( name, mapset );

/* use DCELL even if the map is FCELL */

0 comments on commit 74141c9

Please sign in to comment.
You can’t perform that action at this time.