mapnik-omnivore
Advanced tools
Comparing version 5.0.7 to 5.0.8
@@ -45,4 +45,2 @@ var gdal = require('gdal'); | ||
geotransform = this.gdalDatasource.geoTransform; | ||
this.details.pixelSize = [geotransform[1], geotransform[5]]; | ||
this.details.origin = [geotransform[0], geotransform[3]]; | ||
} | ||
@@ -53,2 +51,11 @@ catch (err) { | ||
var ratio = Math.abs(geotransform[1] / geotransform[5]); | ||
if (geotransform[1] <= 0 || geotransform[5] >= 0) throw invalid('Invalid raster: Invalid pixelsize in geotransform array'); | ||
if (ratio < 0.5 || ratio > 2) throw invalid('Invalid raster: Invalid pixelsize in geotransform array'); | ||
if (geotransform[2] !== 0 || geotransform[4] !== 0) throw invalid('Invalid raster: Invalid rotation value in geotransform array'); | ||
this.details.pixelSize = [geotransform[1], geotransform[5]]; | ||
this.details.origin = [geotransform[0], geotransform[3]]; | ||
try { this.projection = srs.parse(this.gdalDatasource.srs.toWKT()).proj4; } | ||
@@ -55,0 +62,0 @@ catch (err) { |
{ | ||
"name": "mapnik-omnivore", | ||
"version": "5.0.7", | ||
"version": "5.0.8", | ||
"description": "Node module that returns metadata of spatial files.", | ||
@@ -12,3 +12,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"srs": "~0.4.5", | ||
"srs": "~0.4.7", | ||
"mapnik": "~3.2.0", | ||
@@ -15,0 +15,0 @@ "sphericalmercator": "~1.0.2", |
30322
800
Updatedsrs@~0.4.7