95 Commits

Author SHA1 Message Date
Nyall Dawson
356974e401 When loading a new vector tile source into a project, if the associated
MapBox GL style includes any raster sublayers, then also load those
into the project with converted styles.

Fixes #46593
2022-07-08 16:06:19 +10:00
Nyall Dawson
6bb01c80f3 Convert raster sublayers in mapbox gl style layers, including
data defined layer opacity
2022-07-08 16:06:19 +10:00
Nyall Dawson
31fc7405d1 Add method to convert raster source to QgsRasterLayer 2022-07-08 16:06:19 +10:00
Nyall Dawson
dd3058eb42 Add support for parsing raster sources to QgsMapBoxGlStyleConverter 2022-07-08 16:06:19 +10:00
Nyall Dawson
56912b1602 Don't select invisible features 2022-07-08 09:12:46 +10:00
Nyall Dawson
542015a3df Implement toggling support for selecting single features 2022-07-08 09:12:46 +10:00
Nyall Dawson
1f48f16b2f Render selected features on top of vector tile layer 2022-07-08 09:12:46 +10:00
Nyall Dawson
721bcaab66 Implement API for selecting features in a vector tile layer 2022-07-08 09:12:46 +10:00
Nyall Dawson
54a979c600 Handle stops in text-field when converting mapbox styles 2022-06-21 11:10:55 +10:00
Nyall Dawson
0acfff04fb Fix setting vector tile layer maximum tile zoom to levels > 14
Fixes #47933
2022-04-04 13:28:41 +10:00
Nyall Dawson
bc0b982e26 Read metadata from vtpk files 2022-03-16 14:07:06 +10:00
Nyall Dawson
1ad8639315 Support reading ESRI vector tile packages (.vtpk) files directly 2022-03-16 14:07:06 +10:00
Nyall Dawson
222ce1b5ab Don't apply tile scale doubling hack to esri generated vector tiles
We shouldn't apply this hack if we want to match ESRI's zoom to scale
level handling
2022-03-11 12:09:32 +10:00
Nyall Dawson
2faa91a327 Remove redunant z0 extent members 2022-03-11 12:09:32 +10:00
Nyall Dawson
59059a9a72 Switch to using QgsMatrixTileSet as common tile set class 2022-03-11 12:09:32 +10:00
Nyall Dawson
549398dec1 Spelling 2022-03-11 12:09:32 +10:00
Nyall Dawson
508a87dd4f Correctly load arcgis vector tiles in non-EPSG:3857 crs 2022-03-11 12:09:32 +10:00
Nyall Dawson
b39761f8f0 Ensure that non-EPSG:3857 vector tiles layers can be rendered in the
correct place

This fixes the rendering of vector tiles layers which are constructed
in any non web mercator CRS.

(Unfortunately the required information is not recorded in mbtiles
packages, so it's necessary to set the correct parameters via
API calls when trying to load non-3857 mbtiles.)
2022-03-11 12:09:32 +10:00
Nyall Dawson
caee2cabbd Add Qgis::MapLayerProperty flag for layers which should be considered
as "basemap" layers

This flag identifies if the layer is considered a 'basemap' layer, where
certain properties of the layer should be ignored when calculating
project-level properties. For instance, the extent of basemap layers
should be ignored when calculating the overall extent of a project,
as these layers are typically global and extend outside of a project's
area of interest.
2022-02-24 16:20:51 +10:00
Mathieu Pellerin
91c5364666
[vectortile] Fix mapbox gl converter line-dasharray handling (#46082) 2021-11-18 05:38:31 +00:00
nirvn
4b868bef06 [vectortile] Support the 'background' concept for vector tile rendering 2021-11-13 03:23:06 +07:00
Juergen E. Fischer
c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00
nirvn
ef84e48a09 Run sipify_all.sh 2021-10-12 16:34:05 +10:00
Denis Rouzaud
ec16736306 run sipify 2021-10-12 16:34:05 +10:00
Even Rouault
08ad87f123
Merge pull request #45262 from nyalldawson/provider
Always pass on transform context to providers, even minimal ones
2021-09-28 21:20:53 +02:00
mhugent
de5ab2948f
Merge pull request #45037 from mhugent/mvt_expressions_interpolate
Mvt expressions interpolate
2021-09-28 10:49:35 +02:00
Nyall Dawson
094302d9e1 Correctly handle transform context for vector tile layers 2021-09-28 10:45:51 +10:00
Nyall Dawson
cfaf56cb4b Add a minimal data provider for vector tile layers
Fixes #45153
2021-09-23 12:59:48 +10:00
Marco Hugentobler
055bcec072 Detect colors before parseValue method to avoid string missinterpreted as a color 2021-09-16 13:06:38 +02:00
Marco Hugentobler
2f274f0101 Make new parameter optional 2021-09-14 18:14:46 +02:00
Marco Hugentobler
93d3a2c629 Keep API compatibility for QgsMapBoxGlStyleConverter::interpolateExpression (although the comment says it is private API 2021-09-14 17:55:40 +02:00
Marco Hugentobler
94ab07c356 Cleanup 2021-09-14 17:09:03 +02:00
rldhont
da4240449d Encode and write vector tiles in different CRS than EPSG:3857
The Mapbox Vector Tile specification provides these definition for projection and bounds.

A Vector Tile represents data based on a square extent within a projection. A Vector Tile SHOULD NOT contain information about its bounds and projection. The file format assumes that the decoder knows the bounds and projection of a Vector Tile before decoding it.

Web Mercator is the projection of reference, and the Google tile scheme is the tile extent convention of reference. Together, they provide a 1-to-1 relationship between a specific geographical area, at a specific level of detail, and a path such as https://example.com/17/65535/43602.mvt.

Vector Tiles MAY be used to represent data with any projection and tile extent scheme.

It is possible to encode and write vector tiles in different CRS than EPSG:3857.

The implementation used the CRS bounds to defined the tile 0 top left coordinates and the scale denominator for 0 zoom level.
2021-09-10 11:44:34 +02:00
David Marteau
f7cc194efd xpose single vector tile encoding method 2021-09-07 04:51:34 -07:00
Marco Hugentobler
78f637651a Convert styles where interpolated colors are expressions 2021-09-03 16:25:24 +02:00
Marco Hugentobler
cf3de158a3 Fix interpolation with expression values, literal filter and geometry-type 2021-08-26 10:58:07 +02:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Peter Petrik
da5f9db091
add circle vector tile layer support (#41584)
* fix #41529: add circle vector tile layer support
2021-02-20 08:01:02 +10:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Harrissou Sant-anna
8a8d2a2c66 Fix some formatting in pyQGIS doc 2021-01-30 08:25:03 +10:00
Nyall Dawson
819fc50b0e Don't use generic "QgsMapLayer" class name in map layer Python repr
strings

Rather use actual layer subclass type, e.g. QgsVectorLayer
2020-11-12 16:05:52 +10:00
Matthias Kuhn
1cbfb35b23 Escape # in doxy 2020-10-23 08:28:21 +02:00
Matthias Kuhn
42af1efa18 Fix a bunch of doc issues 2020-10-22 20:42:14 +02:00
Nyall Dawson
746ee315bd Fix boolean literal presentation in dox/PyQGIS docs 2020-10-16 16:03:26 +10:00
Even Rouault
a76670e521 QStringLiteral -> QLatin1String changes generated by scripts/qstringfixup.sh --all 2020-10-11 12:30:58 +10:00
Nyall Dawson
bd9c8a7621 Show warnings generated during mapbox gl style conversion after loading vector tiles with default styles 2020-09-15 14:06:21 +07:00
Nyall Dawson
01f942fd63 More helpful warnings generated during style conversion 2020-09-15 14:06:21 +07:00
Nyall Dawson
789eccb572 [vectortiles] Optimise rendering of complex vector tiles
Instead of ALWAYS converting all features in a tile to QGIS representations,
now we intelligently skip over any layers which aren't required for
rendering or labeling (e.g. because the current renderer/labeling
configuration is disabling these layers or doesn't have a rule for
them).

This improves rendering speed with sources like the OS ZoomStack tiles,
which have a LOT of detail even at small map scales (e.g. building
data is present in very zoomed out tiles!!).
2020-09-15 05:05:57 +10:00
nirvn
1de8d01e30 Support hidpi sprites when converting mapboxgl styles 2020-09-14 16:47:09 +10:00
Nyall Dawson
229c240b59 Correctly parse 'match' interpolation list values during conversion 2020-09-14 12:42:49 +10:00