80 Commits

Author SHA1 Message Date
Martin Dobias
8511426304 doc and clang tidy fixes 2025-01-30 09:31:35 +10:00
Martin Dobias
a0414c4883 QgsChunkBoundsEntity: use 3D boxes in map coordinates + QgsGeoTransform
Until now, chunk bounds entity used axis-aligned bboxes in world coordinates (floats)
We are switching to bboxes in map coordinates (doubles) and we use
QgsGeoTransform to react correctly when the origin vector changes.
2025-01-30 09:31:35 +10:00
Denis Rouzaud
185dc1fdb9 enable snapping in georeferenceer 2025-01-16 15:33:15 +01:00
Nicolas Godet
f549d4c554
typo 2025-01-06 18:45:00 +01:00
Julien Cabieces
0fdb3508a5 api(Deprecated): Remove strong requirement on \deprecated
Because some method (only QgsGeometry::set actually) can be deprecated
only in python, not in C++. But \deprecated triggers the need for Q_DECL_DEPRECATED
2024-12-17 09:06:44 +01:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
Julien Cabieces
398f00bc26 doc(Deprecated): Fix missing \deprecated instruction 2024-12-17 09:05:46 +01:00
Nyall Dawson
af8e4432a9 Consistently return QgsAbstractGeometry from QgsGeos methods
This is more flexible then always returning QgsGeometry
2024-12-06 19:20:26 +10:00
Nyall Dawson
dbb20bb5da Add sip cast code to QgsGeos
Ensures QgsGeometry.createGeometryEngine returns a QgsGeos object
for use in Python
2024-12-06 19:20:26 +10:00
Nyall Dawson
afac0312aa Expose QgsGeos class to PyQGIS
This class has lots of (very useful!) GEOS specific functionality which
is not exposed through the base QgsGeometryEngine class
2024-12-06 19:20:26 +10:00
Nyall Dawson
37478db0c1 Fix more function links 2024-12-03 12:57:44 +10:00
Nyall Dawson
8d60d4f6d7 Make some factories return unique_ptr 2024-12-03 07:06:02 +10:00
Mathieu Pellerin
cbef4f7172 [qml] Upgrade QgsRectangle to Q_GADGET 2024-11-25 10:26:38 +10:00
Nyall Dawson
e82b375ed0 Revert "[qml] Upgrade QgsRectangle to Q_GADGET"
This reverts commit 657d3d3190417fc1578f53559fd5133cf07f5199.
2024-11-23 09:01:05 +10:00
Mathieu Pellerin
657d3d3190 [qml] Upgrade QgsRectangle to Q_GADGET 2024-11-22 17:35:55 +07:00
Nyall Dawson
fe78267c66 'throw' is not used/required on sip >=6
And generates hundreds of deprecation warnings during build
2024-11-04 15:13:37 +10:00
Martin Dobias
ae13cfea17 Add QgsBox3D tests and fix the implementation 2024-10-30 06:20:42 +10:00
Martin Dobias
4f183696b0 Make QgsChunkNode use doubles instead of floats for bounding boxes
- move from QgsAABB to QgsBox3D
- also switch from "world" coordinates (relative to 3d map scene origin,
  and flipped axes) to map coordinates
2024-10-30 06:20:42 +10:00
Nyall Dawson
2fcd8b99b5 Fix crashes on newer GEOS with empty polygon rings
There was a previous fix for this protecting some geos calls, but
on newer GEOS versions we get crashes with other methods (eg
calculating centroid) when using geos geometries with empty
interior rings.

Avoid this by ALWAYS defaulting to skipping empty rings when
creating GEOS polygons, UNLESS explicitly asked to. Then, only
explicitly ask to do this when we are using GEOS to validate
a geometry. In all other cases we don't need or want empty rings.
2024-10-26 04:49:56 +10:00
David Koňařík
8039ccb50d Fix elevation profile on intersecting polyline 2024-10-24 09:52:58 +10:00
Jean Felder
721b0459c4
qgspolyhedralsurface: Implement isValid (#59031)
`QgsPolyhedralSurface` inherits from `QgsSurface` which implements
`QgsAbstractgeometry::isValid` by calling `isValid` from
GEOS. However, GEOS does not handle polyhedral surface. This means
that `isValid` will always return False even if the polyhedral surface
is valid.

This issue is fixed by implementing
`QgsPolyhedralSurface::isValid`. It checks that all the polygons of
the polyhedral surface are valid.
2024-10-10 15:21:47 +02:00
Nyall Dawson
391b61544e
Handle SIP_OUT with void functions 2024-09-10 11:46:47 +10:00
Nyall Dawson
b39f760cbc
Correctly handle multiline SIP_OUT param documentation 2024-09-10 11:11:25 +10:00
Jean Felder
f43e5ad17c geometry: Add triangulatedsurface support 2024-09-09 06:16:25 +02:00
Jean Felder
59e12d50ae qgsgeometry: Use QgsPolyhedralSurface in fromBox3D 2024-09-09 06:16:25 +02:00
Jean Felder
371eca55e8 geometry: Add polyhedralsurface support 2024-09-09 06:16:25 +02:00
Jean Felder
e99d4d2306 qgssurface: Do not define surfaceToPolygon
`surfaceToPolygon` is only useful for `QgsCurvePolygon` which inherits
from `QgsSurface`. The next commit will introduce
`QgsPolyhedralSurface` which also inherits from `QgsSurface`. For
`QgsPolyhedralSurface`, it does not make sense to have
`surfaceToPolygon`.

By moving `surfaceToPolygon` definition in `QgsCurvePolygon` this
allows to keep the functionality.
2024-09-09 06:16:25 +02:00
Nyall Dawson
94f6e9c71b Correctly handle \param[in,out] in sipify 2024-09-04 13:54:39 +10:00
Nyall Dawson
f2e4c3dfb7 Don't mangle http see links in PyQGIS docs 2024-09-04 06:32:03 +10:00
Nyall Dawson
534ca73c59 Fix missing see also trailing notes in PyQGIS documentation 2024-09-04 06:32:03 +10:00
Nyall Dawson
0f1daa11f3 Fix formatting of some \see links 2024-09-04 06:32:03 +10:00
Nyall Dawson
ef0289f3ec Fix formatting of Python ..deprecated annotations in docstrings
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/174
2024-09-02 11:42:12 +10:00
Nyall Dawson
765cbb32db Standardise some deprecated annotations 2024-09-02 11:42:12 +10:00
Denis Rouzaud
ba46a95aca
wedge buffers support start and end angles (#58473) 2024-08-30 15:07:08 +02:00
Nyall Dawson
49d31fa527 Fix some malformed docs 2024-08-30 05:47:07 +10:00
Nyall Dawson
bc52832b47 Lazily hack around markdown title underline not being long enough
Causes a bunch of warnings when building the PyQGIS docs
2024-08-28 11:58:21 +10:00
Nyall Dawson
5c1427c807 Add QgsLineString::lineLocationPointByM
This method attempts to interpolate the point on a linestringM
where a specified m value falls. It does this by interpolating
M values along the line string segments, finding the first
segment at which the target M value falls. If the M value
corresponds to a part of the line with constant m values, then
the center point of this constant m value portion will be
returned.
2024-08-25 12:34:38 +10:00
Nyall Dawson
8b04562ba7 Avoid fragile reg for argument removal 2024-08-14 13:05:46 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
be8dce7d0d Valid improvements from new sipify 2024-08-13 20:28:55 +10:00
Nyall Dawson
6f652d251b Drop no-value copy constructor dox 2024-07-25 04:02:55 +10:00
Nyall Dawson
28943f9c1b Remove a bunch of useless default constructor doxygen 2024-07-23 02:08:28 +10:00
Jean Felder
849df1bae4 qgsbox3d: Add support for set method 2024-07-11 17:43:00 +02:00
Jean Felder
180e2bd3e3 qgsbox3d: Add support for area method 2024-07-11 17:43:00 +02:00
Nyall Dawson
102874e6d2 Port geos simplify linestring
Add QgsAbstractGeometry::simplifyByDistance, which is a direct
port of GEOS Douglas Peucker algorithm.

This is a trivial algorithm to implement, and we benefit from
avoiding the conversion to/from GEOS geometries.
2024-06-20 05:41:37 +10:00
Nyall Dawson
d4ddd04efe Add missing HOLDGIL annotation for QgsGeometry::isEmpty 2024-06-12 13:50:13 +02:00
Nyall Dawson
9626644c7c Add option to remove redundant vertices in QgsAbstractGeometry::snappedToGrid
If opted in, then vertices which form a midpoint of a straight line segment will be removed in the output
2024-06-04 21:33:29 +10:00
Jacky Volpes
ab663b485b Use WkbType instead of GeometryType enum for addPart
Deprecating QgsGeometry::addPart in favor of QgsGeometry::addPartV2
to use Qgis::WkbType instead of Qgis::GeometryType because the latter
can't handle curved geometries (not specific enough).

Fixes #57255
2024-06-03 19:40:48 +02:00
Nyall Dawson
b43537680c Add API to add list of geometries to collections
More efficient then adding one by one, and allows for efficient
transferral of geometries when pared with the new takeGeometries
method.
2024-06-03 14:38:57 +10:00
Nyall Dawson
27a2bcf064 Add API to take geometries from a collection
Removes the geometries from the collection and returns ownership
to the caller.

Can be used to avoid clones in some scenarios.
2024-06-03 14:38:57 +10:00