Open mattdreisbach opened 1 month ago
After working with QGIS for some more time it seems that the alpha channel can be included in the color for example:
"fill": "#ff000000", // patern is #aarrggbb so this is black with no opacity
// "fill-opacity": 0.5, // no longer needed
"radius": 1.5,
"stroke": "#800000ff", // patern is #aarrggbb so this is blue with 50% opacity
"stroke-width": 1,
// "stroke-opacity": 1.0// no longer needed
Partially done. I think we match QGIS now for color. The stroke/radius piece is a little more work as they aren't tied to a field yet.
Also, regardless of file type (gpkg, geojson, kml) if there is a field called fill or stroke they are also pulled by default to be the fill or stroke items.
Works like a champ!
Playing around with this, seems you encoded the alpha bytes at the end: #rrggbbaa
but the standard encoding puts the alpha bytes first: #aarrggbb
Oh weird. I'm following the css standard https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
QGIS has "admitted" that the #aarrggbb is a mistake that they won't fix 😂
(the three and four color hex codes won't work right now either, but imma PR that in a minute)
:fire:
There is no way to specify style within the geopapckage.
Can you parse the geopackage for style properties if they exist?
Perhaps you could use standard QGIS Styling names:
Example:
Should yield something like this (colors incorrect for points)
gejson could also support this:
should yield something like this: