@mapbox/preprocessorcerer
npm i @mapbox/preprocessorcerer

@mapbox/preprocessorcerer

Perform preprocessorcery and pick parts on particularly persnickity uploads

by mapbox

1.2.0 (see all)License:ISCTypeScript:Not Found
npm i @mapbox/preprocessorcerer
Readme

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.

preprocessorcriteriadescription
tif-toBytesTIF file with 16-bit pixelsScale 16-bit TIFF files to 8-bit
tif-reprojectTIF file that is not in EPSG:3857Reproject TIFF file to EPSG:3857
tif-overviewsTIF fileGenerate overviews for TIFF files
shp-indexShapefile that has no mapnik indexAdd a spatial index to shapefile
geojson-bomGeoJSON string with a BOM charRemove a byte-order-mark from a geojson string
spatial-indexGeoJSON or CSV has no mapnik indexAdd spatial index (*.index) to GeoJSON or CSV

Part Splitting

splittercriteriadescription
mbtiles-byTilesmbtiles file100,000 tiles per part, up to 50 parts max
serialtiles-byTilesserialtiles file200,000 tiles per part, up to 50 parts max
defaultnone of above criteria matchedSplit into parts based on file size

Downloads/wk

4

GitHub Stars

12

LAST COMMIT

2yrs ago

MAINTAINERS

14

CONTRIBUTORS

17

OPEN ISSUES

9

OPEN PRs

4
VersionTagPublished
1.2.0
latest
2yrs ago
1.2.0-dev1
dev
2yrs ago
No alternatives found
No tutorials found
Add a tutorial