GeoCat / bridge-style

Cartography library making style format conversions as easy as using Python.
MIT License
45 stars 14 forks source link

Releases/semver #47

Open tomchadwin opened 4 years ago

tomchadwin commented 4 years ago

Would you consider using numbered releases? I just tried to bump the copy of bridgestyle I use in qgis2web to current master (to try to fix https://github.com/tomchadwin/qgis2web/issues/895), and changes since 13 May have stopped point layers working for me (QGIS > MBGLJS). I don't yet know why, but the output from the bumped bridgestyle looks very different to what it was.

tomchadwin commented 4 years ago

Current master:

{
    "version": 8,
    "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
    "name": "airports",
    "sources": {
        "vector-source": {
            "type": "vector",
            "tiles": [
                "URL to tiles - airports"
            ],
            "minZoom": 0,
            "maxZoom": 20
        }
    },
    "layers": [
        {
            "type": "symbol",
            "layout": {
                "icon-image": "circle-#279319-1.0-#000000-1.0-1",
                "icon-rotate": 0.0,
                "icon-size": 0.11160714285714285
            },
            "Z": 0,
            "source": "vector-source",
            "source-layer": "airports",
            "id": "airports:(rule#0):0"
        }
    ],
    "sprite": "spriteSheet"
}

Master as of 13 May:

{
    "version": 8,
    "name": "airports",
    "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
    "sources": {
        "airports": "TODO:Configure this!!!"
    },
    "layers": [
        {
            "type": "circle",
            "paint": {
                "circle-radius": [
                    "/",
                    7.5590551182,
                    2
                ],
                "circle-color": "#279319",
                "circle-opacity": 1.0,
                "circle-stroke-width": 1,
                "circle-stroke-color": "#000000"
            },
            "source": "airports",
            "id": ":0"
        }
    ],
    "sprite": "spriteSheet"
}
tomchadwin commented 4 years ago

So I guess this change came about with this commit: https://github.com/GeoCat/bridge-style/commit/f84ebf9a10cbed35d6e60e6fb5570f6d167d134e. If I read this correctly, does this commit increase use of SVG markers, and decrease the use of MB style-defined symbols? If so, this might have unwanted consequences, such as the inability to change marker style properties via script.

volaya commented 4 years ago

Hi Tom, sorry for this. The change is to better support sprites (@davidblasby can probably give some more detail), and also to support several layers in a single style.

I guess we could publish the library in PyPi, and change the major version number whenever we introduce some changes in the API. Would that be OK for you?

davidblasby commented 4 years ago

yes - I added support for sprite and automatic generation of sprite sheets.

It supports a lot more of QGIS features now.