70 Commits

Author SHA1 Message Date
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
Nyall Dawson
94b6003e3c Add list constructor for QgsMultiLineString too 2024-06-01 19:28:50 +10:00
Nyall Dawson
2871f5b8af Add constructor to directly create QgsMultiPolygon from list of polygons 2024-06-01 19:28:50 +10:00
Germán Carrillo
2768e41f0a Adjust docstring in qgsgeometryutils_base.h 2024-05-24 07:30:09 +10:00
Nyall Dawson
2860f23fa3 Add QgsLineString method to interpolate nan m values along line
Fills in any nan m values by interpolating from non-nan values
in neighbouring vertices
2024-05-11 08:33:21 +10:00
Jean Felder
1a4e1a77e7 qgsgeometry: Add contains method from x,y coordinates 2024-04-03 20:38:40 +02:00
uclaros
9796d3766b update topological point snap threshold 2024-03-13 15:37:06 +01:00
uclaros
bf8433bf6d Fix splitting when snapping to segment is used 2024-03-12 09:13:51 +01:00
Even Rouault
a68422b982 Various typo fixes
Including 3 public methods, which are deprecated by this commit and replaced by a typo-fixed version
2024-02-29 06:03:03 +10:00
Nyall Dawson
80c0c385f8 Use better python repr for null QgsRectangle 2024-02-28 13:00:01 +10:00
Even Rouault
f3ef66d073
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-19 11:35:07 +01:00