1

I'm struggling to convert SLD (from Qgis) to MapboxGL style format. Does anyone have any ideas if this is possible?

1
  • Use the plugin qgis2web to transform seamlessly your entire project to Mapbox GL (including styles).
    – Pepe N O
    Commented Oct 21, 2021 at 16:41

3 Answers 3

2

I used qml to convert Corine vector data style to mapbox style. Qml style doesn't work for raster style.

npx geostyler -t mapbox -o corine_AllClass.mapbox - s qml corine_AllClass.qml

0

https://github.com/terrestris/geostyler/blob/master/README.md GeoStyler will do this and other conversions

2
  • I am using rule based symbology method for Corine data. Geostyler gave a result without color info. qgis2web can't handle this type of symbology and give me just base map. Not only for mapbox, also for leaflet and openlayers option didn't work github.com/tomchadwin/qgis2web/issues/866
    – Iroh
    Commented Oct 22, 2021 at 7:53
  • I was also not getting the colors, till I replaced <SvpParameter> to <CssParameter>
    – Ralexrdz
    Commented Mar 18 at 17:48
0

As mentioned before. Geostyler can do thejob

Here is the repository: https://github.com/geostyler/geostyler-cli

and how to use it

npm install -g geostyler-cli

geostyler -t mapbox -o output.json input.sld

you can optionally use the option -s se for SLD 1.0 or -s sld SLD 1.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.