to allow layers to be added from them
Otherwise it's impossible to select multiple gpkg files from the
browser to add them all at once, and users have to add them
one-by-one
Previously the code was calculating the exact zoom level (a double
value) and then rounding this to an integer in order to determine
which rules should be applied.
This appears to violate the vector tile styling specifications,
which are designed to "round down" the zoom level, so that styling
rules like:
- layer zoom range: 12-22
- interpolated expression:
case when @zoom_level > 12 and @zoom_level <= 14 then 1
when @zoom_level > 14 and @zoom_level < 18 then 2
when @zoom_level >=18 then 4 end
work correctly when the exact zoom level is just less than 12, e.g. 11.8
So now we use floor when converting a zoom level to int so that the
styling rules work correctly.
Additionally, this adds a new @vector_tile_zoom expression variable
which contains the original double value of the calculated tile zoom
(not the integer one used for layer visibility). Many mapbox GL styling
rules rely on non-integer zoom levels for interpolation, e.g.
Case when @vector_tile_zoom >= 11.2 then 4 ...
This change allows for smooth interpolation between zoom levels which
matches the web map appearance, instead of "jumpy" fixed level interpolation
we previously had.
The settings were being restored, but the dialog was not updating
the reflect the loaded settings, so clicking OK caused the previous
settings to overwrite the loaded ones immediately.
Fixes#35343
Commits 98261bcfd4bd05948bd1b2a68c741c80e4e2e515 and ebdb546c1044b793d25097ddc04ed34b5fb6d956
for #35465 have changed the logic to compute the default number of bins
for the histogram. While appropriate in the context of #35465, that tends
to augment the number of bins, which is inappropriate for the raster histogram
chart, where beyond 1000, the chart becomes unreadable.
However I think the logic for plotting the raster histogram should probably be
revised, but I'm not clear how: ask the user for a number of bins and/or take
into account the width in pixels of the chart to determine the number of bins
(should that depend if the user has zoomed in... ?)
Fixes#38567 where the SRID was not detected if the table was empty.
Also: do not override the SRID passed explicitly in the data source
URI.
Note: the logic in the provider is becoming a bit convoluted, there
are too many corner cases, at least the test coverage is pretty
good.