@@ -482,32 +482,22 @@ void QgsGrassNewMapset::setGrassProjection()
482
482
std::cerr << " wkt = " << wkt << std::endl;
483
483
}
484
484
#endif
485
+
486
+ int ret;
485
487
// Note: GPJ_osr_to_grass() defaults in PROJECTION_XY if projection
486
488
// cannot be set
487
489
488
- // There was a bug in GRASS,
489
- // fixed Fri Jan 27 18:21:15 2006 UTC in HEAD(>=6.1)
490
- // it is present in 6.0.x line
491
- // G_version cannot be used as it was also buggy in 6.0.x
492
- int major = QString ( GRASS_VERSION_MAJOR ). toInt ();
493
- int minor = QString ( GRASS_VERSION_MINOR ). toInt ();
494
- # ifdef QGISDEBUG
495
- std::cerr << " major = " << major << " minor = " << minor << std::endl ;
490
+ // There was a bug in GRASS, it is present in 6.0.x line
491
+ # if GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 1
492
+ ret = GPJ_osr_to_grass ( & mCellHead , & mProjInfo ,
493
+ & mProjUnits , hSRS, 0 );
494
+ # else
495
+ // Buggy version:
496
+ ret = GPJ_osr_to_grass ( & mCellHead , & mProjInfo ,
497
+ & mProjUnits , ( void **)hSRS, 0 ) ;
496
498
#endif
497
- int ret;
498
-
499
- if ( major == 6 && minor == 0 )
500
- {
501
- // Buggy version:
502
- ret = GPJ_osr_to_grass ( &mCellHead , &mProjInfo ,
503
- &mProjUnits , (void **)hSRS, 0 );
504
-
505
- } else {
506
- ret = GPJ_osr_to_grass ( &mCellHead , &mProjInfo ,
507
- &mProjUnits , hSRS, 0 );
508
- }
509
499
510
- // Note: I seems that GPJ_osr_to_grass()returns always 1,
500
+ // Note: It seems that GPJ_osr_to_grass()returns always 1,
511
501
// -> test if mProjInfo was set
512
502
513
503
#ifdef QGISDEBUG
0 commit comments