240 Commits

Author SHA1 Message Date
Mathieu Pellerin
b9898d0fa1
Merge pull request #57166 from nirvn/fields_gadget
[qml] Make QgsFields a QGadet and make some functions Q_INVOKABLE
2024-04-21 05:53:41 +07:00
Nyall Dawson
0a877ea4af Documentation improvements 2024-04-21 06:46:35 +10:00
Nyall Dawson
de0f5cf87c Make API more future proof 2024-04-21 06:46:35 +10:00
Nyall Dawson
75455dffad Move class to own file 2024-04-21 06:46:35 +10:00
Nyall Dawson
d4369f714d Make log of each separate child algorithm available for retrieval after
running model
2024-04-21 06:46:35 +10:00
Nyall Dawson
172a1c2b03 Make execution status available for child algorithms 2024-04-21 06:46:35 +10:00
Nyall Dawson
8302259463 Make child results handling API more flexible 2024-04-21 06:46:35 +10:00
Nyall Dawson
5ebbb3da46 Make child results and inputs always available for models
Even when the model execution fails, store the child inputs and
results for all steps which successfully completed in the context.

This gives more debugging information to a user when a model fails,
because these values will now be reflected in the model designer
view for all steps which completed.
2024-04-21 06:46:35 +10:00
Nyall Dawson
7f4fe65bee Ensure that QgsProcessingAlgorithm::postProcess is always called
We now always call QgsProcessingAlgorithm::postProcess, even when
the algorithm fails for some reason (eg it raises an exception).
This ensures that the context cleanup logic in postProcess is
always run. Note that we still ONLY call an algorithm's specific
postProcessAlgorithm implementation for successful executions,
so the public facing API and behavior remains unchanged.

This is intented to provide a consistent handling of the cleanup
logic in postProcess, specifically to make sure that that the
context thread handling logic is triggered in all cases.
2024-04-21 06:46:35 +10:00
Nyall Dawson
9d6faf3d00 Prevent changing ID if layer is owned 2024-04-20 16:50:56 +10:00
Nyall Dawson
ed2d4f559b Add idChanged signal, property 2024-04-20 16:50:56 +10:00
Nyall Dawson
19585bf1fd Add api to set QgsMapLayer IDs
With appropriate warnings on when this should be used...
2024-04-20 16:50:56 +10:00
Mathieu Pellerin
d9677bcb1c
Merge pull request #57016 from gacarrillor/dxf_overridden_name
[dxf] Allow users to override the layer name to be exported to DXF
2024-04-19 20:44:09 +07:00
Nyall Dawson
b70fba6762 Download Google fonts from github, not broken Google fonts download url
Note that not all fonts available from Google fonts are present on
the github repo for some reason, eg Open Sans Condensed is not.

Fixes #57070
2024-04-18 11:31:55 +10:00
Mathieu Pellerin
6709debbac Fix sipify.pl script not handling Q_INVOKABLE inline 2024-04-17 18:07:43 +07:00
Mathieu Pellerin
6f1f5d2ef6 [qml] Make a couple of vector layer editing/deletion functions invokable 2024-04-17 18:07:43 +07:00
Mathieu Pellerin
5d796e9dfa [qml] Make QgsFields a QGadet and make some functions invokable 2024-04-17 11:15:23 +07:00
Denis Rouzaud
709690551d
[sipify] support different since versions in C++ bs PyQGIS 2024-04-11 11:01:19 +02:00
Germán Carrillo
4b2c7deedc [core] Allow users to override a layer name when exporting to DXF; DxfLayerJob->layerTitle replaced by layerDerivedName, to avoid confusion with one of the final DXF layer name sources (layer metadata title, layer server properties title, layer name, layer's overridden name) 2024-04-10 16:09:17 +02:00
Nyall Dawson
3d59b88329 Move server specific layer properties to QgsMapLayerServerProperties
Eg server layer title, abstract, etc, and deprecate the related
methods at the QgsMapLayer level

This should avoid accidental creep of these specifically server-related
properties into wider use, and help disambiguate them from the
standard layer metadata properties
2024-04-10 19:03:15 +10:00
mhugent
6a1b775dcc
Merge pull request #57036 from mhugent/dxf_dd_blocks_default_on
Enable dd blocks by default and remove global setting
2024-04-10 10:29:06 +02:00
Nyall Dawson
365d26ece4 Ensure raster elevation filtering works nicely with contour renderer
With the contour renderer we must treat out of range pixels as
no data values, so that the gdal contouring algorithm correctly
ignores them
2024-04-10 12:10:08 +10:00
Nyall Dawson
b5a8722446 Improve documentation 2024-04-10 09:05:23 +10:00
Nyall Dawson
37c69d1b60 Add validation to calls to QgsProject.setVerticalCrs 2024-04-10 09:05:23 +10:00
Nyall Dawson
e2a3edc76d [api] Add vertical crs option to QgsProject
If the project crs() is a compound CRS, then the CRS returned
by QgsProject::verticalCrs()  be the vertical component of
QgsProject::crs(). Otherwise it will be the value explicitly
set by a call to setVerticalCrs().

The vertical crs is a persistent property of a project, which
is saved/restored to xml.
2024-04-10 09:05:23 +10:00
Marco Hugentobler
5a23cc4bb5 Enable dd blocks by default and remove global setting 'enable-datadefined-blocks' 2024-04-09 16:37:30 +02:00
Marco Hugentobler
077a161ef1 Move query of layerTreeInsertionMethod setting out of core 2024-04-09 06:52:29 +10:00
Marco Hugentobler
ffeb91c2eb Fix documentation 2024-04-09 06:52:29 +10:00
Marco Hugentobler
96d5cc99b3 Consider setting layerTreeInsertionMethod when adding content from qlr to canvas 2024-04-09 06:52:29 +10:00
Mathieu Pellerin
d68a428f6e Address review 2024-04-08 11:47:51 +07:00
Mathieu Pellerin
4bd2e66b3f Rename classes 2024-04-08 11:18:35 +07:00
Mathieu Pellerin
d7325cba40 [raster] New single color renderer 2024-04-08 11:18:35 +07:00
Mathieu Pellerin
6dafb5d495 More review addressed 2024-04-08 09:27:58 +10:00
Mathieu Pellerin
e9b3408a6c Optimize a bit 2024-04-08 09:27:58 +10:00
Mathieu Pellerin
feabbe722e Address review 2024-04-08 09:27:58 +10:00
Mathieu Pellerin
891a8efc84 [raster][temporal] Add a brand new temporal mode: pixel value as temporal datetime 2024-04-08 09:27:58 +10:00
Jean Felder
1a4e1a77e7 qgsgeometry: Add contains method from x,y coordinates 2024-04-03 20:38:40 +02:00
Julien Cabieces
dc677f4230
Merge pull request #56600 from troopa81/feat_add_srs_getfeatureinfo_json
[Feature][WMS] Add crs information in WMS GetFeatureInfo output when it differs from WGS84
2024-04-02 17:54:00 +02:00
Nyall Dawson
94bef546b2 Ensure temporal and elevation filters work correctly in conjunction
Fixes #56938
2024-03-26 08:54:31 +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
t0b3
57517b7292
fix: build without qtserialport
closes: https://github.com/qgis/QGIS/issues/56944
Signed-off-by: t0b3 <thomas.bettler@gmail.com>
2024-03-24 14:24:12 +01:00
Nyall Dawson
3f44760a82 Add "Fixed Time Range Per Band" mode for raster temporal control
This mode can be used when each band in the raster layer is associated
with a fixed time range, eg. NetCDF files.

The user can either manually populate a table with begin/end dates for
each band in the raster, or build the table using QGIS expressions
which return datetime values.
2024-03-22 12:40:54 +10:00
Nyall Dawson
4383a3a225 Add "dynamic elevation range per band" mode for rasters
In this mode, the user can specify a QGIS expression for the
lower and upper value corresponding to raster bands, using
variables like @band, @band_name and @band_description.

E.g

    @band * 100

Can be used when each band represents a 100 m vertical slice
of data.

The expression will be evaluated when required to determine
the actual elevation range corresponding to each band.

This differs from the existing "Fixed Elevation Range Per Band"
mode in that "Fixed Elevation Range Per Band" requires users
to manually enter an elevation for each band separately,
and these values are then treated as constants. That mode works
best for rasters with non-regular steps in the band
elevation values, while this new mode is better for regular
band elevation steps
2024-03-21 12:33:33 +01:00
Nyall Dawson
40847d0596 Avoid some unnecessary redraws 2024-03-19 13:29:40 +10:00
Nyall Dawson
0bb3a26b20 Implement fixed elevation range for mesh layers
Just like the equivalent mode for raster layers, this mode indicates
that a fixed constant z range should be applied to the entire mesh
layer.
2024-03-19 13:29:40 +10:00
Nyall Dawson
e9730b1bb3 Add capabilities for raster renderers
And selectively expose some of QgsRasterRendererRegistry to python
2024-03-18 21:26:20 +01:00
Nyall Dawson
1796318afe Add a "fixed range per band" elevation mode for rasters
In this mode, each band in the raster can have a fixed elevation
range associated with it. This is designed for data sources which
expose elevation related data in bands, eg netcdf files, such
as a raster with temperate data at different ocean depths.
2024-03-18 21:26:20 +01:00
Nyall Dawson
7fc4ed3999 Add range limits api to QgsRange 2024-03-16 13:11:54 +10:00
Nyall Dawson
253623feb0 Introduce fixed elevation range for raster layers
This introduces a new option for specifying how raster layers
have associated elevation. It permits a fixed elevation range
to be set for the layer. It can be used when the layer has
a single fixed elevation, or a range (slice) of elevation values.

Users can set the lower and upper elevation range for the layer,
and whether the lower or upper limits are inclusive or
exclusive.

When enabled, the layer will only be visible in elevation
filtered 2d maps when the layer's range is included in the map's
z range.
2024-03-16 13:11:54 +10:00
Nyall Dawson
4a0bc4ae99 Deprecated subclass methods 2024-03-16 06:35:16 +10:00