22276 Commits

Author SHA1 Message Date
Alessandro Pasotti
3db86bc236
Merge pull request #53168 from elpaso/attribute-table-defer-virtual-fields
Attribute table optimization: do not load hidden fields until required
2023-05-22 16:35:12 +02:00
Nyall Dawson
4c6018de92 Add option to limit the extent of "fill above" and "fill below"
elevation ranges for a layer in elevation profile plots

Fixes #51010
2023-05-22 14:48:57 +10:00
Nyall Dawson
6c4f96a5aa Add "Fill Above" mode for elevation profile drawing
Fixes #51074
2023-05-22 14:48:57 +10:00
Nyall Dawson
327a069e1c Handle VTPK tile data with zero sizes by falling back to lower
zoom levels for the tile's data

It seems that every VTPK behaves a bit like an indexed VTPK
where higher zoom level tiles may be replaced with lower
zoom level tiles. This new special handling is required
for non-indexed VTPKs where the high zoom level tile data
is empty, but there's not explicit tilemap present to
advise of us this situation in advance.

Fixes #52872
2023-05-22 12:50:51 +10:00
Nyall Dawson
8a2c0e3561 Replace QgsDebugMsg(...) with QgsDebugError(...) and ensure it
is ONLY used for error message reporting

Everything else gets bumped to QgsDebugMsg(..., >= 2)
2023-05-20 16:19:17 +10:00
Nyall Dawson
7c7d5dc338 [profile tool] Add option to lock the horizontal/vertical scale to
matching scales

When activated, this option ensures that the horizontal and vertical
scales are always kept equal (so that eg a 45 degree slope will appear
as a 45 degree slope in the profile)
2023-05-20 13:18:54 +10:00
Alessandro Pasotti
d2c317a5d7 Attribute table optimization: do not store hidden fields
- defer hidden fields fetching
- allow caching of mixed full and subset attributes features
2023-05-19 19:15:10 +02:00
Alessandro Pasotti
5bc7b6fd5d
Merge pull request #53163 from elpaso/bugfix-followup-53061-floater-settings
Followup floater settings fix settings storage
2023-05-19 16:23:11 +02:00
Nyall Dawson
55226f56ad Use some heuristics to guess when a raster layer looks like a DEM
and auto-set the "represents elevation" flag for these

We do this when:

- the layer contains only one band
- the data type is int or float (not complex, rgb or byte)
- the layer doesn't have an attribute table
- there's something "dem-like" in the layer's name (ie 'elevation',
  'dem', 'height', 'srtm')

This should help make the elevation profile tool more user-friendly,
as these layers will be included in the profiles by default
2023-05-19 23:06:21 +10:00
Nyall Dawson
e036570c77 Setup framework for data provider's to provide information about
elevation related properties to their layers

And use this to ensure that wms tiles with maptiler terrain
or terrarium terrain interpretation are always included by
default in elevation profile plots.

Most specifically, this ensures that projects containing the
out-of-the-box "Mapzen Global Terrain" layer will be automatically
included in elevation plots.
2023-05-19 23:06:21 +10:00
Alessandro Pasotti
66a5604e84 Followup floater settings fix settings storage
Cleaning my own mess, followup #53061
2023-05-19 13:10:52 +02:00
Vincent Cloarec
e2fa27e4a6
Load layers in parallel threads when opening project (#53069)
* load layers in parallel threads when opening project

* parallel loading by default and settingsin advanced settings

* fix freezing when no layer supports parallel loading

* clean leftover

* fix unwanted remove and typo

* typo

* fix flake8

* load OGR metadata under global mutex

* Revert "load OGR metadata under global mutex"

This reverts commit adcaf9e66ca432ee35143c45af2b383108770a63.

* remove parallel loading capability for OGR

* start application in server test

* import start_app

* fix flake8
2023-05-18 16:11:43 +02:00
Alexander Bruy
a1013f87c6 [processing] add vector tile destination parameter 2023-05-18 07:09:16 +10:00
Alexander Bruy
daa8d5ca15 [processing] allow selecting vector tile layers in map layer and
multiple layers parameters
2023-05-18 07:09:16 +10:00
Nyall Dawson
27a4336f50 When rendering lower zoom level tiles vs actual render zoom level
due to presence of tilemap, ensure that we always use the actual
render zoom level to match styles for the tile instead of the
zoom level corresponding to the tile

Otherwise we'll be rendering different rules depending on the
actual tile source, when we should always use the actual
rules for the current map scale
2023-05-16 19:57:02 +10:00
Nyall Dawson
7ee5e32211 Add flag to indicate that vector tile provider matrix set should
always be used for the layer (as opposed to any previously
stored matrix sets)

For some vector tile data providers this is more appropriate --
specifically for those with tilemap information where we MUST
ensure that the tilemap matches the data source or missing
tiles may be present. (If we store the matrix set information
in projects then loading older projects may mean that a stored
tilemap is out-of-sync with the actual data source's current
tilemap).
2023-05-16 19:57:02 +10:00
Nyall Dawson
12c261b75b Move vector tile provider capabilities enum to Qgis 2023-05-16 19:57:02 +10:00
Nyall Dawson
babfd33acd Remove outdated see link 2023-05-16 19:57:02 +10:00
Nyall Dawson
bc2cc98790 Read ESRI tilemaps in vtpk and arcgis tile services
This allows us to correctly handle "indexed" vector tile sets,
where higher zoom level tiles may be missing where a lower
zoom level tile is deemed to have sufficient detail for higher
zoom levels.
2023-05-16 19:57:02 +10:00
Nyall Dawson
f4554e36fa [feature] Add control over horizontal / vertical stretch for attribute
form widgets

This exposes two new "size" options for edit form widgets, allowing
control over the horizontal and vertical stretch factors for the
widget. By setting a horizontal or vertical stretch, users can
control how edit widgets will relatively resize when resizing
an attribute form.

Eg a user can set a higher horizontal stretch value for widgets which should
"grab" more of the available horizontal space, eg for those widgets
which are expected to have longer values and accordingly will
benefit from the extra space.

Similarly, the vertical stretch setting controls how widgets
will relatively grow vertically when resizing forms vertically. (Note
that only some widgets can vertically grow -- eg. spin boxes
can't be stretched vertically!)

Together these options give more control to users over the exact
layout and sizing of their attribute forms.

By default, the stretch values are set to "Default" which is the
same as previous behavior.
2023-05-16 17:38:13 +10:00
Nyall Dawson
888dc334f5 Remove duplicate enum 2023-05-15 16:38:52 +10:00
Nyall Dawson
28747c9b4d Use proper enum for return value 2023-05-15 16:38:52 +10:00
Nyall Dawson
b0d67ecddf Move QgsVectorFileWriter::SymbologyExport to Qgis, promote to enum class 2023-05-15 16:38:52 +10:00
Nyall Dawson
5efa6c06f8 Improve documentation, function names 2023-05-15 16:38:52 +10:00
Nyall Dawson
83d1e6cf55 Better name 2023-05-15 16:38:52 +10:00
Nyall Dawson
ecff6b9e3b Remove unused deprecated method which wasn't exposed to python 2023-05-15 16:38:52 +10:00
Nyall Dawson
b0be3d4816 Use enum class 2023-05-15 16:38:52 +10:00
Alessandro Pasotti
c2594774b3
Merge pull request #53061 from elpaso/advanced-digitizing-floater-options
Advanced digitizing: floater settings and bearing
2023-05-15 07:43:09 +02:00
Matthias Kuhn
7b284fee19
Merge pull request #53053 from m-kuhn/intsall_qgslayoutchecker 2023-05-13 13:42:06 +02:00
Matthias Kuhn
c8dd71e4d3 Set size for layout check 2023-05-13 08:47:22 +02:00
Alessandro Pasotti
4fab764af0 Advanced digitizing: floater settings and bearing
- visibility settings for floater
- option for bearing/azimuth
2023-05-12 07:30:23 +02:00
jakimowb
367b8ba332 added SIP_SKIP 2023-05-12 13:09:14 +10:00
Benjamin Jakimow
64c0f4aacd sipifyed qgsvectorlayersaveasdialog.h 2023-05-12 13:09:14 +10:00
jakimowb
4e49c9f17c added sip files 2023-05-12 13:09:14 +10:00
jakimowb
d3b91ca721 added QgsVectorLayerSaveAsDialog to public API 2023-05-12 13:09:14 +10:00
Alessandro Pasotti
f63dd2c360 Move CadConstraintType to Qgis, translate degree symbol 2023-05-12 06:32:11 +10:00
Alessandro Pasotti
49d1b61f30 Advanced digitizing: respect units for distance
- respect project settings for distance units
- format angle
- format geographic coordintates
2023-05-12 06:32:11 +10:00
CodeBardian
cce4d2ff45
Fix for accessing the strength of field constraints (#52976) 2023-05-11 10:12:46 +10:00
Julien Cabieces
09eac909fa register flags with Q_FLAG not Q_ENUM 2023-05-11 05:50:14 +10:00
Nyall Dawson
c32bc17973 Defer calling postProcessors until layers have been added to layer tree
It's possible that an algorithm's postProcessor may contain logic
relating to the layer tree, so make sure that all layers have
already been added to the tree before calling postProcessors
2023-05-10 13:17:55 +10:00
Nyall Dawson
f27195c165 [processing] Allow configuration of order of outputs created by a model
This adds a new "Reorder Model Outputs" action to the model designer
menu (to accompany the existing "Reorder Model Inputs" action).
Selecting this option allows model creators to set a specific order
which the outputs from their model must use when loading the results
into a project. This gives the model creator a means of ensuring
that layers are logically ordered, eg placing a vector layer over
a raster layer and a point layer over a polygon layer.

Optionally, the model creator can also set a "Group name" for the
outputs. If this is specified then all outputs from the model will
be placed into a (newly created if necessary) layer tree group
with that name.

Sponsored by the QGIS Germany User Group
2023-05-10 13:17:55 +10:00
Nyall Dawson
f1c0923fc1 Fix QgsLayoutChecker::testLayout python bindings 2023-05-10 12:33:48 +10:00
Nyall Dawson
5d9ea9845a Move determination of tiles in ranges to QgsTileMatrixSet
This gives more flexibility in future to handle known missing tiles or
other special circumstances (eg falling back to lower
zoom level tiles from the matrix set in certain circumstances)
2023-05-10 12:10:13 +10:00
Matthias Kuhn
da075fa259 Use QgsLayoutChecker from core 2023-05-09 14:41:31 +02:00
Nyall Dawson
171baf0013 Add equality operators for QgsTileXYZ 2023-05-09 19:41:53 +10:00
Nyall Dawson
35e3d49738 Add repr for QgsTileXYZ 2023-05-09 19:41:53 +10:00
Nyall Dawson
0d90cbcf1b sipify (followup cb1bfa1a) 2023-05-05 06:27:32 +10:00
Alessandro Pasotti
34933d0072 SIP_SKIP and tidy 2023-05-04 13:19:59 +02:00
Alessandro Pasotti
5f86a4011f Advanced Digitizing: more common angle options
- add 0.1, 0.5, 1.0 common angles
- add an option to show current common angle in the floater
- add 'N' 'SHIFT+N' keyboard shortcuts to cycle through the
  common angle options
2023-05-04 13:19:59 +02:00
Nyall Dawson
a52e0bdd22 Respect layer output ordering when adding processing results layers 2023-05-03 18:29:28 +10:00