4917 Commits

Author SHA1 Message Date
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
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
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
b0d67ecddf Move QgsVectorFileWriter::SymbologyExport to Qgis, promote to enum class 2023-05-15 16:38:52 +10:00
Alessandro Pasotti
f63dd2c360 Move CadConstraintType to Qgis, translate degree symbol 2023-05-12 06:32:11 +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
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
8682a20150 Add layer tree group name and sort key to QgsProcessingContext::LayerDetails 2023-05-03 18:29:28 +10:00
Denis Rouzaud
30a641111d
Merge pull request #52847 from 3nids/settings-treewidget
Settings editors
2023-05-02 21:31:35 +02:00
Alexander Bruy
10b02e02ed move expression type enum to qgis.h 2023-05-02 14:00:43 +02:00
Alexander Bruy
d93111ccec [processing] add enum to expression parameter to make it possible
distinguish between native QGIS expressions and point cloud filter
expressions
2023-05-02 14:00:43 +02:00
Nyall Dawson
ab19e8ed32 Add new attribute form container type "Row"
This container always lays out child widgets in a horizontal
row, where the number of columns is automatically determined
by the number of child widgets.

It's useful for creation of compact forms, where no space will
be wasted by assigning extraneous horizontal width to widgets
where the expected values will always be short.

Eg: creating 3 rows with 3, 2, 1 child widgets respectively
results in the layout:

    Attr 1: [...] Attr 2: [...] Attr 3: [...]
    Attr 4: [..........] Attr 5: [..........]
    Attr 6: [...............................]

Without the option of row containers then the all horizontal
rows will have the same number of columns, eg:

    Attr 1: [...] Attr 2: [...] Attr 3: [...]
    Attr 4: [...] Attr 5: [...] Attr 6: [...]

(leaving insufficient horizontal length for attributes 4-6), or

    Attr 1: [..........] Attr 2: [..........]
    Attr 2: [..........] Attr 3: [..........]
    Attr 4: [..........] Attr 5: [..........]
    Attr 6: [..........]

(resulting in wasted horizontal space next to attribute 6, and
an extra row taking up vertical space)

Sponsored by NIWA
2023-05-01 18:39:23 +10:00
Yoann Quenach de Quivillic
3dcfbe8cc3 Fix QgsSettingsTreeNode constness 2023-05-01 01:47:24 +02:00
Denis Rouzaud
7498d0994c fix dox 2023-04-27 10:29:09 +02:00
Nyall Dawson
a434d0e7c0 Use enums for attribute form container types instead of bools
Gives flexibility for adding additional container types in future
2023-04-27 12:54:20 +10:00
Vincent Cloarec
004f6d3704
Mesh layer style following dataset group name (#52312)
* copy mesh layer style following dataset group name

* fix typo and sipify

* fix const

* fix version in doc

* fix version in doc
2023-04-26 19:44:28 +00:00
Nyall Dawson
9e552967f2 Promote attribute editor enums to enum class, move to Qgis 2023-04-27 03:58:30 +10:00
Matthias Kuhn
69a2bb81f9
Merge pull request #52321 from YoannQDQ/clear-recent-crs 2023-04-26 10:34:03 +02:00
Alexander Bruy
1c1e46029a address review 2023-04-25 05:41:04 +10:00
Alexander Bruy
0f2d2bc360 allow changing number of threads through the algorithm settings panel 2023-04-25 05:41:04 +10:00
Yoann Quenach de Quivillic
79973312e6 Add missing auto_additions 2023-04-25 05:35:37 +10:00
Yoann Quenach de Quivillic
99f453344d Apply suggestions from review 2023-04-25 05:35:37 +10:00
Yoann Quenach de Quivillic
4891c9f344 Add icon size and allow creation settings 2023-04-25 05:35:37 +10:00
Yoann Quenach de Quivillic
e1b6d8f723 Add lastProfile / defaultProfile in QgsUserProfileManager 2023-04-25 05:35:37 +10:00
Yoann Quenach de Quivillic
08bf81dbeb Add methods to clear recent crs or remove one crs 2023-04-24 09:22:32 +02:00
Nyall Dawson
8282b6631e Add QgsCodeEditorShell code editor subclass for Bash or Batch scripts 2023-04-24 15:26:50 +10:00
Denis Rouzaud
fe4e9b5ff8
remove outdated sip files (#52848) 2023-04-23 08:50:22 +02:00
Denis Rouzaud
9f3ac79b8b sipify + CMakeLists 2023-04-23 07:19:47 +02:00
Yoann Quenach de Quivillic
4dcd0d4af0 Add a way to disable map tips for a specific layer (fix #23400) 2023-04-23 11:01:37 +07:00
Nyall Dawson
af02946e51 Expand docs 2023-04-22 17:54:35 +10:00
Nyall Dawson
b28bf20372 Add api to determine attribute capabilities for QgsVectorLayerExporter 2023-04-22 09:18:06 +10:00
Nyall Dawson
308eb1d86f Expose api to determine capabilities of QgsVectorFileWriter
Currently allows determining whether field comments and aliases
are supported by the writer
2023-04-22 09:18:06 +10:00
Nyall Dawson
d9d41ad9ef Doc 2023-04-21 06:12:28 +10:00
Nyall Dawson
70f2adb28c [processing][api] Add mechanism to get basic algorithm properties
efficiently for many calls

Allows retrieval of some basic algorithm properties (display name,
icon) in an optimised way for many calls. (Avoiding multiple
expensive algorithmById lookups)
2023-04-21 06:12:28 +10:00
Nyall Dawson
9aac2b8d8a [api] Add framework for setting field comments/aliases via
QgsAbstractDatabaseProviderConnection

When implemented by providers, will provide a method for
permanently setting field aliases/comments within a
database

Here we have no choice but to create a new Capability2
enum, as the original Capability has now consumed the
entire range of values for data types permitted by QFlag
2023-04-18 08:22:57 +10:00
Nyall Dawson
276ff97807 When creating new fields, only expose the 'Comment' option for
datasources which support editing comments

This support is currently limited to the postgres provider,
so exposing the comment field for all other vector layer types
is just misleading to users. The comment will be completed discarded
without any warning!
2023-04-14 14:14:41 +10:00