Installations
npm install mapnik-omnivore
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
0.10.x
Node Version
4.4.5
NPM Version
2.15.5
Contributors
Unable to fetch Contributors
Languages
JavaScript (96.81%)
Batchfile (3.19%)
Developer
mapbox
Download Statistics
Total Downloads
105,412
Last Day
13
Last Week
63
Last Month
223
Last Year
1,448
GitHub Statistics
44 Stars
520 Commits
19 Forks
118 Watching
23 Branches
581 Contributors
Bundle Size
1.49 MB
Minified
501.71 kB
Minified + Gzipped
Package Meta Information
Latest Version
8.1.0
Package Id
mapnik-omnivore@8.1.0
Size
9.70 kB
NPM Version
2.15.5
Node Version
4.4.5
Total Downloads
Cumulative downloads
Total Downloads
105,412
Last day
0%
13
Compared to previous day
Last week
-12.5%
63
Compared to previous week
Last month
74.2%
223
Compared to previous month
Last year
-24.5%
1,448
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
mapnik-omnivore
Node module that returns metadata of spatial files. Version format follows Semantic Version
Currently supports the following file types:
geojson
topojson
kml
gpx
tif
vrt
: raster files listed in the VRT file must be in the same directory as the VRT filecsv
: must be valid geo CSV, and can be in the form ofcsv
,txt
, ortsv
shp
: In order to set the projection, the.prj
file must be in the same directory and have the same name as the.shp
file
Javascript Usage
var mapnikOmnivore = require('mapnik-omnivore'),
path = require('path');
var file = path.resolve('test/data/zip/world_merc/world_merc.shp');
mapnikOmnivore.digest(file, function(err, metadata){
if (err) return callback(err);
else {
console.log('Metadata returned!');
console.log(metadata);
}
});
mapnikOmnivore.digest(filepath, callback)
- filepath
required
- callback
(err, metadata)
Example of returned metadata
metadata:
{ filesize: 428328, // size of file in bytes
projection: '+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',
filename: 'world_merc',
center: [ 0, 12.048603815490733 ],
extent: [ -180, -59.47306100000001, 180, 83.57026863098147 ],
json: {
vector_layers: [ {
id: 'world_merc',
description: '',
minzoom: 0,
maxzoom: 22,
fields: {
FIPS: 'String',
ISO2: 'String',
ISO3: 'String',
UN: 'Number',
NAME: 'String',
AREA: 'Number',
POP2005: 'Number',
REGION: 'Number',
SUBREGION: 'Number',
LON: 'Number',
LAT: 'Number' }
} ]
},
minzoom: 0, // calculates the optimal minimum and
maxzoom: 5, // maximum zoom levels for the file
layers: [ 'world_merc' ],
dstype: 'shape',
filetype: '.shp' }
Raster files will include a raster
object:
metadata:
{ filesize: 1494,
projection: '+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
raster:
{ pixelSize: [ 7.502071930146189, 7.502071930145942 ],
bandCount: 1,
bands: [ [Object] ],
nodata: null,
origin: [ -1134675.2952829634, 2485710.4658232867 ],
width: 984,
height: 804,
units: { linear: [Object], angular: [Object] } },
filename: 'sample',
center: [ -110.32476292309875, 44.56502238336985 ],
extent:
[ -110.3650933429331,
44.53327824851143,
-110.28443250326441,
44.596766518228264 ],
minzoom: 0,
maxzoom: 13,
dstype: 'gdal',
filetype: '.vrt',
layers: [ 'sample' ] }
CLI Usage
$ npm install --global mapnik-omnivore
$ digest <filepath>
# Prints a JSON string
Generating Mapnik XML
-
Install the https://github.com/mapbox/tilelive-omnivore
-
Use the command line tool it provides, called
mapnik-omnivore
to generate Mapnik XML
Install
npm install mapnik-omnivore
Tests
npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/mapbox/.github/SECURITY.md:1
- Info: Found linked content: github.com/mapbox/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/mapbox/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/mapbox/.github/SECURITY.md:1
Reason
branch protection is not maximal on development and all release branches
Details
- Info: 'allow deletion' disabled on branch 'master'
- Info: 'force pushes' disabled on branch 'master'
- Warn: 'branch protection settings apply to administrators' is disabled on branch 'master'
- Warn: 'stale review dismissal' is disabled on branch 'master'
- Warn: required approving review count is 1 on branch 'master'
- Warn: codeowners review is not required on branch 'master'
- Warn: 'last push approval' is disabled on branch 'master'
- Warn: no status checks found to merge onto branch 'master'
- Info: PRs are required in order to make changes on branch 'master'
Reason
Found 5/16 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 22 are checked with a SAST tool
Reason
40 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6
- Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9
- Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f
- Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p
- Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv
- Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8
- Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65
- Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
3.2
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More