@mapbox/preprocessorcerer

1.2.0 • Public • Published

Preprocessorcerer

Build Status codecov

[wip] Makes magical adjustments to geospatial files

Usage

perform-preprocessorcery /some/folder/file.tif
# {"outfile":"/some/folder/eddd5fb92364d75d","parts":1,"descriptions":["Reproject TIFF file to EPSG:3857"]}

Potential Preprocessorcery

This table lists the various preprocessing steps that a file might undergo. These steps are written in the preprocessors folder, each file representing a distinct preprocessing step. Each preprocessor exposes a criteria function that determines whether or not it should act on the incoming file. The order of this list is the order in which preprocessors would be applied to any single file that matches multiple criteria.

preprocessor criteria description
tif-toBytes TIF file with 16-bit pixels Scale 16-bit TIFF files to 8-bit
tif-reproject TIF file that is not in EPSG:3857 Reproject TIFF file to EPSG:3857
tif-overviews TIF file Generate overviews for TIFF files
shp-index Shapefile that has no mapnik index Add a spatial index to shapefile
geojson-bom GeoJSON string with a BOM char Remove a byte-order-mark from a geojson string
spatial-index GeoJSON or CSV has no mapnik index Add spatial index (*.index) to GeoJSON or CSV

Part Splitting

splitter criteria description
mbtiles-byTiles mbtiles file 100,000 tiles per part, up to 50 parts max
serialtiles-byTiles serialtiles file 200,000 tiles per part, up to 50 parts max
default none of above criteria matched Split into parts based on file size

Versions

Current Tags

Version History

Package Sidebar

Install

npm i @mapbox/preprocessorcerer

Weekly Downloads

23

Version

1.2.0

License

ISC

Unpacked Size

34.5 kB

Total Files

20

Last publish

Collaborators

  • mbx-npm-ci-production
  • mbx-npm-ci-staging
  • mbx-npm-advanced-actions-production
  • mbx-npm-advanced-actions-staging
  • mbx-npm-09-production
  • mbx-npm-08-production
  • mbx-npm-07-production
  • mbx-npm-06-production
  • mbx-npm-05-production
  • mbx-npm-04-production
  • mbx-npm-03-production
  • mbx-npm-02-production
  • mbx-npm-01-production
  • mbx-npm-02-staging
  • mapbox-npm-01
  • mapbox-npm-02
  • mapbox-npm-07
  • mapbox-npm-03
  • mapbox-npm-04
  • mapbox-npm-09
  • mapbox-npm-05
  • mapbox-npm-06
  • mapbox-npm-08
  • mapbox-npm-advanced-actions
  • mapbox-npm-ci
  • mapbox-npm
  • mapbox-admin
  • mapbox-machine-user