Skip to content

Commit

Permalink
Merge 4dd0392 into 220bd49
Browse files Browse the repository at this point in the history
  • Loading branch information
dnomadb committed Dec 22, 2016
2 parents 220bd49 + 4dd0392 commit 1d343c5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var mapnikOmnivore = require('mapnik-omnivore'),
var mapnikOmnivore = require('@mapbox/mapnik-omnivore'),
path = require('path'),
mercRes = require('./lib/merc_res');

Expand All @@ -22,5 +22,5 @@ function get_scene_zoom(res, zoombreaks, upzoom, callback) {
mercRes.metatile_size(res, zoombreaks, upzoom, function(err, metatileZoom) {
if (err) callback(err);
return callback(null, metatileZoom);
})
});
}
2 changes: 1 addition & 1 deletion lib/merc_res.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var r_utils = require('mapnik-omnivore/lib/utils');
var r_utils = require('@mapbox/mapnik-omnivore/lib/utils');

module.exports.get_resolution = function(metadata, maxRes, snapping, callback) {

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"colonel-mercator": "./bin/colonel-mercator"
},
"dependencies": {
"mapnik-omnivore": "^8.1.0",
"@mapbox/mapnik-omnivore": "^8.2.0",
"minimist": "^1.1.0",
"split": "^0.3.3"
},
Expand Down
16 changes: 16 additions & 0 deletions test/lib.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ tape('[LIB - get resolution] Test gets correct resolution', function(assert) {
});
});

tape('[LIB - get resolution] Test gets correct resolution, ft', function(assert) {
var metadata = {
projection: '+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs',
raster: {
pixelSize: [0.101599998984, 0.101599998984]
}
}
var maxRes = 0;
var snapping = false;
merc_res.get_resolution(metadata, maxRes, snapping, function(err, res) {
assert.error(err);
assert.deepLooseEqual(res, [0.101599998984, 0.101599998984]);
assert.end();
});
});

tape('[LIB - get resolution] Test gets correct resolution, respects maxres', function(assert) {
var metadata = {
projection: '+proj=utm +zone=10 +datum=WGS84 +units=m +no_defs',
Expand Down

0 comments on commit 1d343c5

Please sign in to comment.