File tree 1 file changed +25
-12
lines changed
1 file changed +25
-12
lines changed Original file line number Diff line number Diff line change @@ -455,18 +455,31 @@ describe('gdal', function() {
455
455
456
456
assert . equal ( value , 123 ) ;
457
457
} ) ;
458
- it ( 'should throw error if GDAL can\'t create transformer' , function ( ) {
459
- src = gdal . open ( __dirname + '/data/unsupported-srs.tif' ) ;
460
458
461
- var options = {
462
- src : src ,
463
- s_srs : src . srs ,
464
- t_srs : gdal . SpatialReference . fromEPSG ( 3857 )
465
- } ;
466
-
467
- assert . throws ( function ( ) {
468
- gdal . suggestedWarpOutput ( options ) ;
469
- } , 'Mercator_1SP with scale != 1.0 and latitude of origin != 0, not supported by PROJ.4.' ) ;
470
- } ) ;
459
+ function greaterThan2 ( version ) {
460
+ var parts = version . split ( '.' ) . map ( function ( part ) { return + part ; } ) ;
461
+ if ( parts [ 0 ] >= 2 ) {
462
+ return true ;
463
+ }
464
+ return false ;
465
+ }
466
+
467
+ if ( greaterThan2 ( gdal . version ) ) {
468
+ it ( 'should throw error if GDAL can\'t create transformer' , function ( ) {
469
+ src = gdal . open ( __dirname + '/data/unsupported-srs.tif' ) ;
470
+
471
+ var options = {
472
+ src : src ,
473
+ s_srs : src . srs ,
474
+ t_srs : gdal . SpatialReference . fromEPSG ( 3857 )
475
+ } ;
476
+
477
+ assert . throws ( function ( ) {
478
+ gdal . suggestedWarpOutput ( options ) ;
479
+ } , 'Mercator_1SP with scale != 1.0 and latitude of origin != 0, not supported by PROJ.4.' ) ;
480
+ } ) ;
481
+ } else {
482
+ it . skip ( 'should throw error if GDAL can\'t create transformer' , function ( ) { } ) ;
483
+ }
471
484
} ) ;
472
485
} ) ;
You can’t perform that action at this time.
0 commit comments