New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mapnik-omnivore

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapnik-omnivore - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

appveyor.yml

1

index.js

@@ -33,3 +33,2 @@ var fs = require('fs'),

var filesize = stats['size'];
if (filesize > 216066856) return callback(invalid('File is larger than 200MB. Too big to process.'));
getFileType(file, function(err, filetype) {

@@ -36,0 +35,0 @@ if (err) return callback(err);

{
"name": "mapnik-omnivore",
"version": "1.1.1",
"description": "Node module that returns metadata of spatial files.",
"main": "index.js",
"keywords": ["mapbox", "mapnik"],
"dependencies": {
"srs": "~0.4.1",
"mapnik": "~1.4.4",
"sphericalmercator": "1.0.2"
},
"repository": {
"type": "git",
"url": "https://github.com/mapbox/mapnik-omnivore"
},
"engines": {
"node": "0.10.x"
},
"devDependencies": {
"mocha": "1.17.x"
},
"scripts": {
"test": "./node_modules/.bin/mocha"
},
"author": "Carol B. Hansen"
"name": "mapnik-omnivore",
"version": "1.1.2",
"description": "Node module that returns metadata of spatial files.",
"main": "index.js",
"keywords": [
"mapbox",
"mapnik",
"geodata"
],
"dependencies": {
"srs": "~0.4.3",
"mapnik": "~1.4.10",
"sphericalmercator": "1.0.2"
},
"repository": {
"type": "git",
"url": "https://github.com/mapbox/mapnik-omnivore"
},
"engines": {
"node": "0.10.x"
},
"devDependencies": {
"mocha": "1.x",
"coveralls": "~2.10.1",
"istanbul": "~0.2.14",
"mapnik-test-data": "http://mapbox-npm.s3.amazonaws.com/package/mapnik-test-data-0.0.1-b78eaf920405fffd8016deaecbb5df94337c4956.tgz"
},
"scripts": {
"test": "mocha -R spec",
"coverage": "istanbul cover ./node_modules/.bin/_mocha && coveralls < ./coverage/lcov.info"
},
"author": "Carol B. Hansen"
}

@@ -5,3 +5,3 @@ # mapnik-omnivore

[![Build Status](https://travis-ci.org/mapbox/mapnik-omnivore.svg?branch=master)](https://travis-ci.org/mapbox/mapnik-omnivore)
[![Build Status](https://travis-ci.org/mapbox/mapnik-omnivore.svg?branch=master)](https://travis-ci.org/mapbox/mapnik-omnivore) [![Coverage Status](https://coveralls.io/repos/mapbox/mapnik-omnivore/badge.png)](https://coveralls.io/r/mapbox/mapnik-omnivore)

@@ -85,2 +85,2 @@ Currently supports the following file types:

## Tests
`npm test`
`npm test`

@@ -1,12 +0,13 @@

var mapnikOmnivore = require('./index.js'),
path = require('path');
console.log("You must first edit \'runModule.js\' for it to complete: add your filepath and uncomment.");
// var mapnikOmnivore = require('./index.js'),
// path = require('path');
var file = path.resolve('test/data/geojson/DC_polygon.geo.json');
// var file = path.resolve('insert/your/filepath/here');
mapnikOmnivore.digest(file, function(err, metadata){
if(err) console.log(err);
else {
console.log('Metadata returned!');
console.log(metadata);
}
});
// mapnikOmnivore.digest(file, function(err, metadata){
// if(err) console.log(err);
// else {
// console.log('Metadata returned!');
// console.log(metadata);
// }
// });

@@ -5,3 +5,5 @@ var assert = require('assert'),

mapnik = require('mapnik'),
testData = path.dirname(require.resolve('mapnik-test-data')),
datasourceProcessor = require('../lib/datasourceProcessor.js');
console.log(testData);
//json fixtures

@@ -19,3 +21,3 @@ var expectedMetadata_world_merc = JSON.parse(fs.readFileSync(path.resolve('test/fixtures/metadata_world_merc.json')));

var proj = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over';
var shapefile = path.resolve('test/data/zip/world_merc/world_merc.shp');
var shapefile = testData + '/data/shp/world_merc/world_merc.shp';
var ds = new mapnik.Datasource({

@@ -42,3 +44,3 @@ type: 'shape',

var proj = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs';
var csvFile = path.resolve('test/data/csv/bbl_current_csv.csv');
var csvFile = testData + '/data/csv/bbl_current_csv.csv';
var filetype = '.csv';

@@ -67,3 +69,3 @@ var options = {

var proj = '+init=epsg:4326';
var kmlFile = path.resolve('test/data/kml/1week_earthquake.kml');
var kmlFile = testData + '/data/kml/1week_earthquake.kml';
var type = '.kml';

@@ -91,3 +93,3 @@ var options = {

var proj = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs';
var geoJsonFile = path.resolve('test/data/geojson/DC_polygon.geo.json');
var geoJsonFile = testData + '/data/geojson/DC_polygon.geo.json';
var type = '.geo.json';

@@ -115,3 +117,3 @@ var options = {

var proj = '+init=epsg:4326';
var gpxFile = path.resolve('test/data/gpx/fells_loop.gpx');
var gpxFile = testData + '/data/gpx/fells_loop.gpx';
var type = '.gpx';

@@ -142,3 +144,3 @@ var options = {

it('should return expected layers and json', function(done) {
var shpFile = path.resolve('test/data/zip/world_merc/world_merc.shp');
var shpFile = testData + '/data/shp/world_merc/world_merc.shp';
var filesize = 428328;

@@ -162,3 +164,3 @@ var type = '.shp';

it('should return expected layers and json', function(done) {
var csvFile = path.resolve('test/data/csv/bbl_current_csv.csv');
var csvFile = testData + '/data/csv/bbl_current_csv.csv';
var filesize = 1667;

@@ -182,3 +184,3 @@ var type = '.csv';

it('should return expected layers and json', function(done) {
var kmlFile = path.resolve('test/data/kml/1week_earthquake.kml');
var kmlFile = testData + '/data/kml/1week_earthquake.kml';
var filesize = 1082451;

@@ -202,3 +204,3 @@ var type = '.kml';

it('should return expected datasource and layer name', function(done) {
var geoJsonFile = path.resolve('test/data/geojson/DC_polygon.geo.json');
var geoJsonFile = testData + '/data/geojson/DC_polygon.geo.json';
var filesize = 367;

@@ -222,3 +224,3 @@ var type = '.geo.json';

it('should return expected datasource and layer name', function(done) {
var gpxFile = path.resolve('test/data/gpx/fells_loop.gpx');
var gpxFile = testData + '/data/gpx/fells_loop.gpx';
var filesize = 36815;

@@ -246,3 +248,3 @@ var type = '.gpx';

it('should throw an error due to [0,0,0,0] extent', function(done) {
var invalidFile = path.resolve('test/data/kml/TIMS.kml');
var invalidFile = testData + '/data/kml/TIMS.kml';
var filename = 'TIMS';

@@ -333,3 +335,3 @@ var options = {

it('should return the correct projection for a shapefile', function(done) {
var file = path.resolve('test/data/zip/world_merc/world_merc.shp');
var file = testData + '/data/shp/world_merc/world_merc.shp';
var type = '.shp';

@@ -336,0 +338,0 @@ var expectedProj = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over';

var assert = require('assert'),
path = require('path'),
fs = require('fs'),
testData = path.dirname(require.resolve('mapnik-test-data')),
mapnik_omnivore = require('../index.js');

@@ -16,3 +17,3 @@ //json fixtures

it('should return expected metadata', function(done) {
var file = path.resolve('test/data/zip/world_merc/world_merc.shp');
var file = testData + '/data/shp/world_merc/world_merc.shp';
mapnik_omnivore.digest(file, function(err, metadata) {

@@ -34,3 +35,3 @@ if (err) return done(err);

it('should return expected metadata', function(done) {
var file = path.resolve('test/data/csv/bbl_current_csv.csv');
var file = testData + '/data/csv/bbl_current_csv.csv';
mapnik_omnivore.digest(file, function(err, metadata) {

@@ -52,3 +53,3 @@ if (err) return done(err);

it('should return expected metadata', function(done) {
var file = path.resolve('test/data/kml/1week_earthquake.kml');
var file = testData + '/data/kml/1week_earthquake.kml';
mapnik_omnivore.digest(file, function(err, metadata) {

@@ -70,3 +71,3 @@ if (err) return done(err);

it('should return expected datasource and layer name', function(done) {
var file = path.resolve('test/data/geojson/DC_polygon.geo.json');
var file = testData + '/data/geojson/DC_polygon.geo.json';
mapnik_omnivore.digest(file, function(err, metadata) {

@@ -88,3 +89,3 @@ if (err) return done(err);

it('should return expected datasource and layer name', function(done) {
var file = path.resolve('test/data/gpx/fells_loop.gpx');
var file = testData + '/data/gpx/fells_loop.gpx';
var expectedLayers = ['waypoints', 'routes', 'tracks'];

@@ -91,0 +92,0 @@ mapnik_omnivore.digest(file, function(err, metadata) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc