A command line interface for GeoStyler to convert between various formats for styling of geographic data.
npx geostyler-cli --output new-qgis-style.qml my-existing.sld
Requires Node.js and npx or npm, both usually come with Node.js.
npx geostyler-cli -s sld -t qgis -o output.qml input.sld
Once:
npm install -g geostyler-cli
You can then use the new geostyler
command, e.g.:
geostyler -s sld -t qgis -o output.qml input.sld
To process a folder of files:
geostyler -s sld -t qgis -o /outputdir /inputdir
npm update -g geostyler-cli
npm uninstall -g geostyler-cli
On a single file:
geostyler [options] -o /path/to/output.ext /path/to/input.ext
On a directory:
geostyler [options] -t qgis -o /path/to/output /path/to/input/
-h
/--help
Display the help and exit.-o
/--output
Output filename or directory. Required. [string]-s
/--source
Source parser, eithermapbox
,mapfile
ormap
,sld
(for SLD 1.0),se
(for SLD 1.1),qgis
orqml
. If not given, it will be guessed from the extension of the input file. Mandatory if the the target is a directory.-t
/--target
Target parser, eithermapbox
,sld
(for SLD 1.0),se
(for SLD 1.1),qgis
orqml
. If not given, it will be guessed from the extension of the output file. Mandatory if the the target is a directory. Mapfiles are currently not supported as target.-v
/--version
Display the version of the program.
In your clone of the repo, in the root directory:
npm install # get dependencies
npm run build # build from possibly changed source
# now you can call your build like this:
npm start -- -s sld -t qgis -o output.qml testdata/point_simplepoint.sld