File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,9 @@ int main( int argc, char **argv )
108
108
stdoutFile.open ( stdout, QIODevice::WriteOnly | QIODevice::Unbuffered );
109
109
QDataStream stdoutStream ( &stdoutFile );
110
110
111
+ qint32 proj, zone;
112
+ stdinStream >> proj >> zone;
113
+
111
114
QgsRectangle extent;
112
115
qint32 rows, cols;
113
116
stdinStream >> extent >> cols >> rows;
@@ -118,6 +121,8 @@ int main( int argc, char **argv )
118
121
{
119
122
G_fatal_error ( " Cannot set region: %s" , err.toUtf8 ().data () );
120
123
}
124
+ window.proj = ( int ) proj;
125
+ window.zone = ( int ) zone;
121
126
122
127
G_set_window ( &window );
123
128
Original file line number Diff line number Diff line change @@ -241,6 +241,14 @@ bool QgsGrassRasterImport::import()
241
241
return false ;
242
242
}
243
243
244
+
245
+ struct Cell_head defaultWindow;
246
+ if ( !QgsGrass::defaultRegion ( mGrassObject .gisdbase (), mGrassObject .location (), &defaultWindow ) )
247
+ {
248
+ setError ( " Cannot get default window" );
249
+ return false ;
250
+ }
251
+
244
252
int redBand = 0 ;
245
253
int greenBand = 0 ;
246
254
int blueBand = 0 ;
@@ -326,6 +334,8 @@ bool QgsGrassRasterImport::import()
326
334
327
335
QDataStream outStream ( mProcess );
328
336
337
+ outStream << ( qint32 ) defaultWindow.proj ;
338
+ outStream << ( qint32 ) defaultWindow.zone ;
329
339
outStream << mExtent << ( qint32 )mXSize << ( qint32 )mYSize ;
330
340
outStream << ( qint32 )qgis_out_type;
331
341
You can’t perform that action at this time.
0 commit comments