Hi all,
I started writing a plugin for QGIS to style vector layers with CartoCSS. It looks like this:
Why? Because QGIS can create printed maps like nothing else.
Mapnik uses CartoCSS, but it takes time to see your style changes. TileMill uses CartoCSS and shows changes immediately, but what it exports is limited.
And QGIS has:
a legend for items!
a customizeable scale label!
rotation!
any projection you want, not just Mercator!
Just imagine it could take an hour between nothing and a nice, customized paper map in your hand.
The plugin is nearly done, but other projects took over.
So, what does everyone think? Should I go back to it? Yay or nay?
If it makes styes more portable between systems then that’s great. It often feels like every bit of software has its own special way of doing things so even if you find something that you like and that’s suitable licensed you can’t necessarily get it into where you want it.
The translation of the vector tile styles that QGIS has been doing in recent version is a good start but often quite buggy.
I noticed that CartoCSS has fewer styling options than QGIS (and what I expect to have on actual maps) so I’d have to extend it. Still some interoperability, I guess.
What are those translations in QGIS? Do you have a link?
I’m not really sure what to link there. I thought it was added as part of the MapTiler plugin, but it seems like it might have been added by Lutra with support expanded by them instead.
If you point to a MapBox JSON style when you add a vector tile connection it appears[1] to translate the style internally and show it in the viewport and symbology panels as if it were a native style.
e.g. Taking Americana’s OSM Tiles and MapTiler’s derivative of Positron and editing the style in QGIS to add housenumbers in an garish red gives:
Thanks! I took a look at the plugin, and it looks very simple. The problem with CartoCSS is that it doesn’t do styling in layers like QGIS, but in cascaded properties.
So instead of taking a style and drawing all relevant objects, CSS takes an object and figures out what the style should be.
Translating from one to the other is a royal pain, and that’s why my plugin already took 2 weeks of work and still isn’t done.