113 Commits

Author SHA1 Message Date
Loïc Bartoletti
42f90dfc74 refactor(QgsGeometryUtils): remove useless parameter distanceFromStart in interpolatePointOnSegment function 2025-08-05 14:33:49 +02:00
Loïc Bartoletti
12bf031796 docs(QgsGeometryUtils): Explicit mention CircularArc about the three fillet arc points 2025-08-05 13:45:54 +02:00
Loïc Bartoletti
1d246cdb27 refactor(QgsGeometryUtils): replace raw pointers by smart pointers 2025-08-05 11:53:27 +02:00
Loïc Bartoletti
bd5eb76ba7 style: replace seg* by segment* 2025-08-05 11:00:53 +02:00
Loïc Bartoletti
b76cbadde8 refactor(chamfer/fillet): move logic to qgsgeometryutils 2025-08-05 07:24:23 +02:00
Loïc Bartoletti
98d9c612aa refactor(chamfer/fillet): const'em all 2025-08-05 07:24:23 +02:00
Loïc Bartoletti
ccad35a431 fix(version): replace 3.40 by 4.0 for QgsGeometry chamfer/fillet 2025-08-05 07:24:22 +02:00
Loïc Bartoletti
391a07bb12 fix(version): replace 3.40 by 4.0 for QgsGeometryUtilsBase chamfer/fillet 2025-08-05 07:24:22 +02:00
Loïc Bartoletti
fe1a52b070 feat(tests): add Python tests for QgsGeometry chamfer and fillet methods 2025-08-05 07:24:22 +02:00
Loïc Bartoletti
922964da6f feat(geometry): add chamfer and fillet methods to QgsGeometry
Add vertex-based and segment-based chamfer() and fillet() methods with
Z/M coordinate interpolation support. Handles both LineString modification
and standalone segment operations for CAD-style corner editing.
2025-08-05 07:24:22 +02:00
Loïc Bartoletti
351ae63ab1 feat(geometry): add chamfer and fillet core functions to QgsGeometryUtilsBase
Add createChamfer() and createFillet() methods for 2D geometric operations.
These low-level functions handle segment intersection, angle calculation,
and tangent point computation for CAD-style corner modifications.
2025-08-05 07:24:22 +02:00
Martin Dobias
d3e7411417 QgsOrientedBox3D: new constructor using rotation + longestSide() 2025-07-30 22:57:27 +02:00
Alessandro Pasotti
ae2cf3bed9 Expose QgsPolyline to SIP 2025-06-24 11:11:32 +12:00
Alessandro Pasotti
89e165dfdf [GML] Add parsing support for Z geometries
Funded by: QGIS Danish User Group
2025-06-24 11:11:32 +12:00
Germán Carrillo
24565cf6cc [fix] Make Oriented Minimum Bounding Box of a singlepart point return the bounding box of the point, instead of features with no extent and misleading geometric attributes 2025-06-19 10:33:29 +12:00
Jacky Volpes
3bb6b9799e fix(qgsgeometry): add grid size for merge lines 2025-06-17 13:32:10 +12:00
Nyall Dawson
fa96f4c9bb Cleanup geometry collection creation from wkt
- don't create a whole set of empty possible geometries, just use wkb types
  directly
- don't expose to python -- this method is an internal detail. No-one
  has been relying on it, as calling it would have immediately crashed
  due to the missing SIP_TRANSFER annotation.
2025-06-05 10:27:23 +10:00
Alexander Bruy
3cf314fcdd add a flag to coerceToType() to control whether duplicated nodes should
be kept
2025-05-06 07:48:08 +10:00
Nyall Dawson
67036b670f Add isMaximal method to QgsRectangle 2025-04-24 12:00:42 +02:00
Nyall Dawson
4a6fef278e Cleanup docs, don't mention QString in python docs 2025-04-19 18:17:34 +10:00
Nyall Dawson
0e6d5f5593 Properly silence overloaded-virtual warning on Fedora 42 2025-04-12 06:38:32 +10:00
Nyall Dawson
71420a5628 Cleanup global constants
- Deprecate global geographic crs strings, these should not be used
- Move some global constants to Qgis, and monkey patch for
  API compatibility
- Deprecate global qgsVsiPrefix. Use QgsGdalUtils::vsiPrefixForPath()
  instead
2025-04-03 11:44:59 +10:00
Nyall Dawson
3f6b490218 Sipify 2025-04-02 11:11:10 +10:00
Nyall Dawson
afd2e4f42d Fix doxygen class briefs which aren't full sentences 2025-04-01 09:44:00 +10:00
Nyall Dawson
5f82c62212 Add missing sip downcasts for triangulated surface, polyhedral surface 2025-03-12 11:05:35 +10:00
Nyall Dawson
403bdbd405 Don't allow qgsgeometry_cast to cast away const 2025-03-12 11:05:35 +10:00
Nyall Dawson
632d196e62 Don't show useless "available in python as" notes in PyQGIS docs
Since the method name used in the docs is ALREADY the python version!
2025-02-28 18:32:09 +10:00
Nyall Dawson
a152cbecdb
Fix numerous leaks in sip method code
From the sip documentation:

    If state is not NULL then the location it points to is set to
    describe the state of the returned C/C++ instance and is the
    value returned by any %ConvertToTypeCode. The calling code
    must then release the value at some point to prevent a memory
    leak by calling sipReleaseType().

These methods were only calling sipReleaseType in the case that
an error occurred, which is incorrect -- it should always be
called.
2025-02-17 10:42:19 +10:00
Loïc Bartoletti
a6beaa96e8 docs(QgsCircle): pet doxygen 2025-02-14 08:56:11 +10:00
Loïc Bartoletti
e637eb3df2 move SegmentCalculationMethod to qgis.h 2025-02-14 08:56:11 +10:00
Loïc Bartoletti
157383300c feat(QgsCircle): Add segment calculation methods 2025-02-14 08:56:11 +10:00
Nyall Dawson
a48ec1012f Add methods to directly buffer/offset GEOS geometry in QgsGeos
These methods directly work with GEOS geometries and avoid the
forced conversions to/from QgsAbstractGeometry objects, and are
intended for use in chained operations where the intermediate conversions
are not required.
2025-02-13 14:54:20 +10:00
Nyall Dawson
038036d021 Use "auto" for std::unique_ptr<X> = std::make_unique<X>
Refs https://github.com/qgis/QGIS-Enhancement-Proposals/pull/319
2025-02-07 13:10:27 +10:00
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