178 Commits

Author SHA1 Message Date
Nyall Dawson
756cb0552e [sensorthings] Use reasonable entity-specific defaults for expansions 2024-06-06 16:54:37 +10:00
Nyall Dawson
501a6a23f0 [sensorthings] Filter should be configurable on each expansion level
Filters must be configurable for each individual expansion level,
as we can't achieve the same results by a single top-level filter.
For instance, this prevents filtering children from the expansion
to return just the most recent observation.
2024-06-06 16:54:37 +10:00
Julien Cabieces
0ccaf2d299 sipify 2024-05-31 08:46:33 +10:00
Nyall Dawson
91c17de4d5 Correct handle many-to-one and one-to-one relationships in expansions 2024-05-16 15:14:49 +10:00
Nyall Dawson
08451d7dc6 Fix build on older sip 2024-05-16 15:14:49 +10:00
Nyall Dawson
ecfcf6ced1 Use a more flexible API for handling SensorThings expansions
This allows us to control the sort order and limit for each expansion,
and gives us more flexibility in future to eg handle per expansion
filter strings
2024-05-16 15:14:49 +10:00
Nyall Dawson
742fa6b486 [sensorthings] Support feature expansion
This change allows SensorThings entities to be expanded to contain
their related child feature attributes, exposing the relational
SensorThings model as a traditional "flat" GIS-friendly table
structure.

Eg when selecting Location entities, you can now opt to expand
to "Things > Datastreams > Observations". This would result in
multiple "stacked" point location features, one corresponding
to each observation, with the attributes for each point feature
containing the location, thing, datastream and observation
attributes.

(Best used combined with some extent, feature limit, or custom
filter option, as this can otherwise result in very heavy
requests to the backend service!)

Fixes #56805
2024-05-16 15:14:49 +10:00
Nyall Dawson
4d442441f8 [sensorthings] Add support for Multidatastreams
This adds support for the Multidatastream entity type, as
implemented in the SensorThings version 1.1 "MultiDatastream extension"

While the specification mandates that MultiDatastreams have an
optional polygon geometry, I've encountered numerous servers
which expose different geometry types for this entity or which
return errors when attempting to read the geometries from
MultiDatastreams. Accordingly we always expose an option to
load MultiDatastreams as geometryless layers alongside the
default option to load them as polygon layers, to handle a
wider range of connections.
2024-03-25 19:16:56 +10:00
Nyall Dawson
24edefb684 Add extent based filtering for SensorThings layers
Allows users to set an extent limit for the layer, so that
features are only ever loaded within this extent

The extent can be set from the data source manager before adding
the layer initially, or modified from the layer properties, source
tab.
2024-03-04 08:26:10 +10:00
Nyall Dawson
ebea330398 Add data provider flags for FastExtent2D/FastExtent3D
These flags reflect that retrieval of the provider's 2D or 3D extent
retrieval via QgsDataProvider::extent()/extent3D() are ALWAYS guaranteed
to be trivial/fast to calculate and involve absolutely no extra work.
2024-02-28 06:04:50 +10:00
Nyall Dawson
58e31ad3c0
Revert "Restore default metadata from DB" 2024-02-23 09:12:26 +10:00
Alessandro Pasotti
1850b9b2e6
Merge pull request #55924 from elpaso/bugfix-gh55726-restore-default-metadata
Restore default metadata from DB
2024-02-20 18:14:51 +01:00
Even Rouault
d26b498192
Merge pull request #56223 from rouault/remove_obsolete_since
Remove obsolete "since QGIS 1.x/2.x/3.0" mentions
2024-02-19 14:52:21 +01:00
Vytax
88ac2056a3
ArcGIS URL's with web proxy prefix support
Support of the ArcGIS server links with WEB Proxy prefixes
2024-02-19 15:15:55 +10:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Nyall Dawson
9fd9b1ccab Need to adjust geometry type filter depending on entity type 2024-02-15 12:39:11 +10:00
Nyall Dawson
b5c3857c94 Add button to retrieve available geometry type for source
Clicking this queries the backend for available types, taking the
guesswork out of selecting the geometry type
2024-02-15 12:39:11 +10:00
Nyall Dawson
edc26aeb0b Restrict results to ONLY those matching the selected geometry types 2024-02-15 12:39:11 +10:00
Nyall Dawson
32b8f2fd56 Start on source properties widget for sensor things, support
changing entity type for existing layers
2024-02-15 12:39:11 +10:00
Nyall Dawson
b00c8d246a Correctly parse geometry field to geo query 2024-02-15 12:39:11 +10:00
Nyall Dawson
5503e0232b Only some entity types can have geometry attached 2024-02-15 12:39:11 +10:00
Nyall Dawson
a3b64fcb4d Setup field structure for provider 2024-02-15 12:39:11 +10:00
Nyall Dawson
6a41ed7777 Add methods to convert strings to entity types 2024-02-15 12:39:11 +10:00
Nyall Dawson
90f180c07f Start on utils class 2024-02-15 12:39:11 +10:00
Nyall Dawson
62cd14189f Use proper enum flags type instead of int as return value
And promote enum to enum class. Notably fixes a bunch of startup
errors when loading the Processing plugin under Qt6
2024-02-13 08:13:43 +10:00
Nyall Dawson
179e2ca59a Promote some more enums to enum class to fix PyQt6 support 2024-02-02 04:59:04 +10:00
Alessandro Pasotti
6b18c7fb1d Restore default metadata from DB
Fix #55726
2024-01-22 16:00:00 +01:00
bdm-oslandia
d3604b5c0b feat(QgsDataProvider): handle 3D extent/boundingbox 2023-11-16 14:59:16 +01:00
Nyall Dawson
89f40b05f8 Move ::htmlMetadata from some data provider subclasses up to base class
Allows all layer types (including vector, mesh and point cloud)
providers to show custom metadata in the layer properties dialog.
Previously this was limited to raster/vector tile and tiled
scene layers only.

Also fix const for a lot of raster providers as a consequence.
2023-11-08 21:28:09 +10:00
Alessandro Pasotti
eaafa66353 flake8 2023-10-28 05:07:14 +10:00
Sandro Mani
9b095c5605 Revert "Revert "Allowing storing GPGK raster layer styles to DB""
This reverts commit 9d8a72256893bd31a51d85927e9abd9cdb5eed29.
2023-10-23 13:47:40 +10:00
Sandro Santilli
c99a33d224 Add QgsArcGisRestUtils::convertRectangle
See
https://github.com/qgis/QGIS/pull/54944#pullrequestreview-1680737873
2023-10-17 00:18:30 +02:00
Nyall Dawson
9d8a722568 Revert "Allowing storing GPGK raster layer styles to DB" 2023-10-06 12:15:46 +10:00
Sandro Mani
b308bceb83 Revert moving storageType to QgsDataProvider, reword style location labels in QgsMapLayerLoad/SaveStyleDialog 2023-09-18 14:16:02 +02:00
Sandro Mani
e2169be02f Introduce Qgis::ProviderStyleStorageCapabilities 2023-09-18 14:16:02 +02:00
Sandro Mani
ee357346bb Move isSaveAndLoadStyleToDatabaseSupported and isDeleteStyleFromDatabaseSupported to QgsDataProvider 2023-09-18 14:16:02 +02:00
Sandro Mani
1fb7e142c3 Rename QgsVectorLayerSaveStyleDialog to QgsMapLayerSaveStyleDialog and allow using it for non-vector layers 2023-09-18 14:16:01 +02:00
Nyall Dawson
9f57fb2ef0 Rename "tiled mesh" to "tiled scene"
Better reflects that these types can contain lines and point
data, not just meshes
2023-08-05 21:31:49 +10:00
vcloarec
c3611c60a1 create postgres RO connection in the thread where the provider live 2023-07-19 10:10:11 +02:00
Nyall Dawson
61a3f44e98 Provider registry tiled mesh file handling support 2023-06-28 17:39:09 +10:00
Nyall Dawson
80f97c5e72
Implement responsive cancelation also for fields retrieval 2023-06-13 10:55:38 +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
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
fd11e0b45d Add file filter handling for vector tile layers to QgsProviderMetadata
And move QgsProviderMetadata.FilterType to Qgis
2023-04-02 20:04:02 +10:00
Nyall Dawson
50c76929e1
Followup 30700f1, ensure links to Qgis members are set in docstrings 2023-03-31 10:46:24 +10:00
Martin Dobias
289f47690d
Refactor QgsMapLayer's encodedSource()/decodedSource() (#51901)
Conversion between relative and absolute paths when reading/writing project files
has been inconveniently done in subclasses of QgsMapLayer in encodedSource() and
decodedSource() methods, with a lot of provider specific code.

This is a refactoring to finally fix this - there is a new pair of functions added
to QgsProviderMetadata and QgsProviderRegistry:
- absoluteToRelativeUri()
- relativeToAbsoluteUri()

This new pair of functions delegates the actual conversion between absolute and
relative path to provider code - where it belongs.

The existing code from encodedSource() and decodedSource() functions has been moved
to providers. Unit tests were added to confirm the existing behavior.

There should be no change of behavior apart from removal of old compatibility code
for WMS provider for projects from QGIS < 1.9 (10 years ago).
2023-02-22 17:53:44 +10:00
Nyall Dawson
046883fa9c Promote QgsWkbTypes enums to enum class, move to Qgis 2023-02-22 12:39:21 +10:00
Nyall Dawson
1142e8ffac
Move QgsMapLayerType enum to Qgis.LayerType (#51874)
For consistency with other enums
2023-02-16 13:02:57 +01:00