File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,19 @@ module.exports.local = function(filename, callback) {
39
39
40
40
var geotransform = ds . geoTransform ;
41
41
var size = ds . rasterSize ;
42
+ var description = ( ds . driver || { } ) . description ;
43
+ var numBands = ( ds . bands && typeof ds . bands . count === 'function' ) ?
44
+ ds . bands . count ( ) : null ;
45
+ var srs = ( ds . srs && typeof ds . srs . toWKT === 'function' ) ?
46
+ ds . srs . toWKT ( ) : null ;
42
47
43
48
var metadata = {
44
49
filename : filename ,
45
- driver : ds . driver . description ,
50
+ driver : description ,
46
51
width : size . x ,
47
52
height : size . y ,
48
- numBands : ds . bands . count ( ) ,
49
- srs : ds . srs . toWKT ( ) ,
53
+ numBands : numBands ,
54
+ srs : srs ,
50
55
geotransform : ds . geoTransform ,
51
56
origin : [ geotransform [ 0 ] , geotransform [ 3 ] ] ,
52
57
pixel_size : [ geotransform [ 1 ] , geotransform [ 5 ] ] ,
You can’t perform that action at this time.
0 commit comments