Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Builds administrative boundary datasets
osmfilter
osmconvert
Ubuntu provides osmfilter
and osmconvert
in a package called osmctools
which can be installed with
$ [sudo] apt-get install osmctools
Or you can build them as follows
$ wget -O - http://m.m.i24.cc/osmfilter.c | cc -x c - -O3 -o /usr/local/bin/osmfilter
$ wget -O - http://m.m.i24.cc/osmconvert.c | cc -x c - -lz -O3 -o /usr/local/bin/osmconvert
$ npm install -g fences
fences [options] [command]
Commands:
prep [options] <inputPBF> <outputPBF> extract all administrative boundaries into a new pbf file
build <inputFile> <outputDir> process an OSM file and generate geojson files for each admin_level of administrative boundaries
regions <inputRegionsFile> <sanitizedRegionsFil> Sanitize names and filter input regions file
slice <regionsFile> <inputDir> <outputDir> slice all geojson files in inputDir into specified regions
create [options] <inputPBF> <regionsFile> <outputDir> run fences creation process from start to finish (prep,build,slice)
Options:
-h, --help output usage information
prep
Typically you would run prep on planet-latest.pbf
before feeding it to the build
script.
prep
will intelligently filter the input file and preserve only administrative boundary relations and all their belonging members.
The original input file will not be changed. An output pbf file will be created in the specified location.
prep [options] <inputPBF> <outputPBF>
extract all administrative boundaries into a new pbf file
Options:
-h, --help output usage information
-t, --tempDir <tempDir> specify temp directory, defaults to /tmp/fences/
Examples:
$ fences prep /etc/data/planet-latest.pbf /etc/data/planet-filtered.pbf
$ fences prep -t /tmp/otherDir /etc/data/planet-latest.pbf /etc/data/planet-filtered.pbf
build
build [options] <inputFile> <outputDir>
process an OSM file and generate geojson files for each admin_level of administrative boundaries
Options:
-h, --help output usage information
Examples:
$ fences build /etc/data/planet-filtered.pbf /etc/data/planet-fences/
slice
This script will generate region extracts from a given directory of geojson files.
Regions to be extracted are specified in a geojson file where each feature will result in an extract directory.
It's important that each feature have a property name
under properties
. The resulting directories will correspond to those name
parameters.
slice [options] <regionsFile> <inputDir> <outputDir>
slice all geojson files in inputDir into specified regions
Options:
-h, --help output usage information
Examples:
$ fences slice /etc/data/regions.geojson /etc/data/planet-fences/ /etc/data/region-fences/
create
This script will run all the other steps in the correct order: prep -> build -> slice and produce region extracts of fences
create [options] <inputPBF> <regionsFile> <outputDir>
run fences creation process from start to finish (prep,build,slice)
Options:
-h, --help output usage information
-t, --tempDir <tempDir> specify temp directory, defaults to /tmp/fences/
Examples:
$ fences create /etc/data/planet-latest.pbf /etc/data/regions.json /etc/data/region-fences/
npm test
FAQs
Builds administrative boundary datasets
We found that fences demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.