22512 Commits

Author SHA1 Message Date
Nyall Dawson
5597a2a640 Add flags to QgsTiledMeshRequest 2023-08-05 05:05:46 +10:00
Nyall Dawson
12bf02cc89 Avoid ambiguity in 'refinement' naming, remove ambiguity about
whether a tile has children available, no children, or not-yet-
fetched children
2023-08-05 05:05:46 +10:00
Nyall Dawson
e1f62940d9 Remove QgsTiledMeshNode from public api 2023-08-05 05:05:46 +10:00
Nyall Dawson
ce0358ef74 Move parent tile ID filter to QgsTiledMeshRequest 2023-08-05 05:05:46 +10:00
Nyall Dawson
c42407143e Add intersects tests for QgsAbstractTiledMeshNodeBoundingVolume 2023-08-05 05:05:46 +10:00
Nyall Dawson
00f63c3b76 Introduce QgsTiledMeshIndex
This is an equivalent of the point cloud index class, with some
notable differences:

- The class is designed to be thread safe. There's a shallow copy
QgsTiledMeshIndex class, which contains an implicitly shared
QgsAbstractTiledMeshIndex object. Tiled mesh data providers will
be accompanied by a concrete class of QgsAbstractTiledMeshIndex.
- The QgsTiledMeshIndex class takes care of thread safety by
protecting the underlying QgsAbstractTiledMeshIndex via a read/write
lock
- Callers can request tiled mesh tiles from the index by calling
QgsTiledMeshIndex::getTiles along with a QgsTiledMeshRequest object.
This will return the unique IDs of tiles matching the request.
Currently only geometric error based filtering is supported
by QgsTiledMeshRequest, but bounding box based filtering will
also be introduced.
- Individual tile details are retrieved by calling
QgsTiledMeshIndex::getTile along with the tile's unique ID.
- A caller can determine whether a specific tile can be further
refined by checking QgsTiledMeshIndex::tileCanRefine. This allows
the caller to check whether more children are available for a
tile, but which haven't yet been fetched (eg due to a sub dataset
tileset which hasn't yet been retrieved)
- A tile can be refined by calling QgsTiledMeshIndex::refineAsync.
(Non async refinement will be introduced later)
- Clients can request tile content by calling
  QgsTiledMeshIndex::retrieveContent. This will either return
a cached version of the content (if available), or retrieve and cache
the content for future retrieval. Currently this uses a custom caching
mechanism, but this will be replaced in future with
QgsTileDownloadManager. (Currently QgsTileDownloadManager lacks support
for blocking gets which is required by the index to avoid use
of local event loops)

The api is implemented by the cesium tiles data provider, which
builds the index upfront from the cesium tiles tileset.json definitions.
2023-08-05 05:05:46 +10:00
Nyall Dawson
08e739fea7 Add class for storing hierarchy tree of QgsTiledMeshTile 2023-08-05 05:05:46 +10:00
Nyall Dawson
c22796d6fe Add QgsTiledMeshRequest
Encapsulates parameters for filtering tiled mesh tiles
2023-08-05 05:05:46 +10:00
Nyall Dawson
0e77729860 Add method to transform a tiled mesh bounding volume via QgsMatrix4x4 2023-08-05 05:05:46 +10:00
Nyall Dawson
f3c987f5e5 Introduce QgsTiledMeshTile
Represents an individual tile from a tiled mesh scene
2023-08-05 05:05:46 +10:00
Nyall Dawson
77f8b83ac0 Minor optimisations to QgsExpressionNodeFunction construction 2023-08-04 11:59:37 +10:00
Nyall Dawson
08b8c6d7be Improve cost of QgsExpression::functionIndex
This is called a LOT! Optimise the function by avoiding multiple
list copies and by caching previous found function indexes
2023-08-04 11:59:37 +10:00
Etienne Trimaille
54438f76b6 Minor review of the Python code in the QGIS plugin manager 2023-08-04 08:25:48 +10:00
Nyall Dawson
0dc49da0c4 Remove unused method, add reference 2023-08-03 22:13:03 +10:00
Nyall Dawson
22fd8d9698 Add method to detect whether two QgsOrientedBox3Ds intersect 2023-08-03 22:13:03 +10:00
Nyall Dawson
2ae70ebd8a Add repr, equality operators for QgsMatrix4x4 2023-08-03 15:27:22 +10:00
Nyall Dawson
5b0b7e3c2f Add repr for QgsBox3D, QgsOrientedBox3D 2023-08-03 15:27:22 +10:00
Nyall Dawson
519c32a3ff Hold GIL for more methods 2023-08-03 15:27:22 +10:00
Nyall Dawson
c3159d5a28 Add method to get corners of QgsBox3D 2023-08-03 15:27:22 +10:00
Nyall Dawson
5bdbcc4f6c Add more helpful methods for 3d objects 2023-08-03 15:27:22 +10:00
Nyall Dawson
6c24fa8571 Add some more convenience methods for QgsOrientedBox3D 2023-08-03 15:27:22 +10:00
Nyall Dawson
2683d7802a Add method to project a QgsVector3D onto another QgsVector3D 2023-08-03 15:27:22 +10:00
Nyall Dawson
37ec173868 Add Qgis::SymbolLayerUserFlags for user-controlled flags which
alter the handling of symbol layers

These differ from Qgis::SymbolLayerFlag in that
Qgis::SymbolLayerFlag flags are used to reflect the inbuilt properties
of a symbol layer type, whereas Qgis::SymbolLayerUserFlag are optional,
user controlled flags which can be toggled for a symbol layer.

Add a flag `DisableSelectionRecoloring` which can be set for
symbol layers which prevents the layer from being recolored to
the render context selection color even when the feature
being rendered is selected

This provides a mechanism for an individual symbol layer to
avoid the forced recolor of selected features.
2023-08-02 12:49:01 +10:00
Nyall Dawson
e5bddbab1a Don't discard custom color/symbol when changing layer selection
mode
2023-07-29 18:36:11 +10:00
Nyall Dawson
e5eb082a81 Add API to set specific symbol to render for selected features in
a vector layer

If set, then that symbol will be used for selected features. Allows
eg selected lines to be rendered in a thicker line style vs
non-selected lines for improved visibility.
2023-07-29 18:36:11 +10:00
Nyall Dawson
8931268c74 Add API to set selected feature color for vector layers 2023-07-29 18:36:11 +10:00
Nyall Dawson
71a778e492 Introduce framework for QgsMapLayerSelectionProperties
QgsMapLayerSelectionProperties exposes settings for controlling
how an individual QgsMapLayer behaves with respect to feature selection.
2023-07-29 18:36:11 +10:00
Mathieu Pellerin
749aa705a9
Merge pull request #53965 from nirvn/copy_paste_duplicate
Insure that copied features within the same layer respect project relationship(s) strength
2023-07-28 23:30:47 +07:00
Mathieu Pellerin
859558a1a5 Add test + address review 2023-07-28 19:16:36 +07:00
Nyall Dawson
6cdc01b888 Fix exception when running an algorithm which has no parameters
through the toolbox

We were passing a float to a PyQt method requiring int in newer
Python versions, which raises an exception instead of silently
truncating.
2023-07-28 13:35:24 +10:00
Mathieu Pellerin
3734bee6a5 [map tool] When copy-moving a feature, use duplicate feature function to insure composition relationships are respected 2023-07-27 15:40:40 +07:00
bdm-oslandia
e0f71afeaa
qgsgeometry: Add fromBox3D constructor 2023-07-26 09:17:17 +02:00
bdm-oslandia
4c23966008
qgsgeometry: Add fromPoint constructor 2023-07-26 08:58:49 +02:00
Nyall Dawson
d7ba6b5ca6 Port Processing "Keep N Biggest Parts" algorithm to c++
Also:
- Ensure that z/m coordinates in parts are not stripped away
- Handle curved geometries
- Allow dynamic data defined num of parts
2023-07-25 13:27:33 +10:00
Yoann Quenach de Quivillic
a4a49b05bc Fix hasFixedMapPosition logic 2023-07-25 05:06:49 +10:00
Yoann Quenach de Quivillic
a1c2885ea1 Add hasFixedMapPosition to QgsMapDecoration 2023-07-25 05:06:49 +10:00
pathmapper
5fee930371 Fix plugin voting from within plugin manager
Update URL, check reply status code and use blockingPost to be able to handle redirects.
2023-07-25 05:05:29 +10:00
Nyall Dawson
83bc6be01c Fix broken processing script editor actions
SIP is totally messed up here -- the dialog wrapper or something
is always prematurely cleaned which results in broken QObject
connections throughout.
Hack around this by storing dialog instances in a global list to
prevent too early wrapper garbage collection
2023-07-24 19:44:04 +10:00
Martin Dobias
ecc1bf2c19 sip fix 2023-07-20 14:03:55 +02:00
Martin Dobias
e8f0e1cca1 fixes after rebase 2023-07-20 14:03:55 +02:00
Martin Dobias
5e3c230262 Small additions to QgsBox3d and QgsOrientedBox3D API
- operators to move QgsBox3d by a QgsVector3D
- reproject QgsOrientedBox3D and get its axis-aligned bounding box
- get length of sides of QgsOrientedBox3D
- transform QgsOrientedBox3D with a QgsMatrix4x4
2023-07-20 14:03:55 +02:00
Nyall Dawson
a39b5df615 Rename mesh "3d" classes to "3D" and monkey patch compatibility 2023-07-20 15:31:00 +10:00
Nyall Dawson
5967344117 Rename QgsBox3d to QgsBox3D for consistency, monkey patch in old
name for PyQGIS compatibility
2023-07-20 15:31:00 +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
aafd4f96fe Add more efficient multipoint constructor which can avoid point cloning 2023-07-19 16:52:05 +10:00
Nyall Dawson
78ecd083d3 Add a bunch of optimised/easier to use constructor variants
for creating QgsMultiPoint objects
2023-07-19 16:52:05 +10:00
Nyall Dawson
8c91e8fa97 By default, QgsProjectionSelectionTreeWidget should only
show horizontal (and compound) CRS in order to match behavior
of older releases

But allow opt in filters for display of vertical crs
2023-07-19 10:47:47 +10:00
Nyall Dawson
ef6057aadd Documentation, string cleanups 2023-07-19 10:47:47 +10:00
Nyall Dawson
dd933c9565 Use actual model in projection selection widget 2023-07-19 10:47:47 +10:00
Nyall Dawson
731123a425 Create a QAbstractItemModel and proxy model for displaying tree
view of coordinate reference systems
2023-07-19 10:47:47 +10:00