312 Commits

Author SHA1 Message Date
Mathieu Pellerin
a351a3e301 Fix QgsGeometry documentation inaccuracy 2022-07-08 08:05:07 +10:00
Nyall Dawson
f439a649d6 Optimise 3d clipping to work directly with coordinate arrays, so that
we avoid the (signficant) overhead of point conversion and sequence
allocations
2022-05-26 06:20:32 +10:00
Nyall Dawson
e912f29415 Hide QgsLineString::setPoints from python (raw pointers to arrays cannot be used through the bindings), dox update 2022-05-26 06:20:32 +10:00
Nyall Dawson
c94463144c Dox update for QgsBox3D 2022-05-26 06:20:32 +10:00
bdm-oslandia
f8139e1df8 fixes from review and rebase to master 2022-05-26 06:20:32 +10:00
bdm-oslandia
eba8ff58b2 rebase from master 2022-05-26 06:20:32 +10:00
bdm-oslandia
52e130f699 Minor fixes
* QgsBox3d: fix scale function
* QgsLineString:
  - add setPoints function with data arrays
  - improve calculateBoundingBox3d
2022-05-26 06:20:32 +10:00
bdm-oslandia
07d26a6e2f fix qgslinestring bbox calculation and qgsbox3d tests 2022-05-26 06:20:32 +10:00
bdm-oslandia
f569f59cda qgsbox3d: fix sipify 2022-05-26 06:20:32 +10:00
bdm-oslandia
8e6a8fc8bb fix clipping for geocentric projections 2022-05-26 06:20:32 +10:00
Loïc Bartoletti
742c860f9f QgsTriangle: constify isDegenerate method 2022-03-24 06:41:30 +01:00
Antoine
556df9d4f6 3.24 to 3.26 2022-03-10 09:11:39 +01:00
Antoine
53b92e14c6 fix documentation 2022-03-10 09:11:38 +01:00
Antoine
ced846856b change distToInfiniteLine method parameters 2022-03-10 09:11:38 +01:00
Antoine
9fb24b424c add method to compute distance between point and infinite line 2022-03-10 09:11:38 +01:00
Denis Rouzaud
b98c1df904 use default args for Z/M values in QgsGeometry::coerceToType 2022-01-28 06:21:18 +01:00
Nyall Dawson
ce7d4220c5 Apply suggestions from code review 2022-01-06 13:01:08 +10:00
Tobias Schmetzer
4a32f0d344 Correct parameter name and version description for doxygen 2022-01-06 13:01:08 +10:00
Tobias Schmetzer
f0c7727467 Make segmentLength argument optional with default as 0 instead of the nullptr option 2022-01-06 13:01:08 +10:00
Tobias Schmetzer
7640026100 Adapt function to comply with default behavior at segmentLength value 0, adapt and improve test cases, include .sip.in files, corrected segmentLength calculation 2022-01-06 13:01:08 +10:00
Tobias Schmetzer
9cbcae58b5 Add QgsGeometryUtils::perpendicularCenterSegment() with description in header file, test case and sip.in for Docx 2022-01-06 13:01:08 +10:00
Nyall Dawson
fa123251a4 Add method which promotes all non-point WKB types to multitype
equivalent

Specifically, this method should be used to determine the
most-permissive possible resultant WKB type which can result
from subtracting parts of a geometry. A single-point geometry
type can never become a multi-point geometry type as
a result of a subtraction, but a single-line or single-polygon
geometry CAN become a multipart geometry as a result of subtracting
portions of the geometry.
2021-12-10 09:32:48 +10:00
Nyall Dawson
aaca87ca06 Move curve orientation enum (Clockwise/CounterClockwise) to Qgis and
generalise the name

These values are useful for more than just curve orientations
2021-11-10 18:42:42 +11:00
Antoine Facchini
97b288dcee
Add roundness method to curve polygon (#45154)
* add roundness function

* add roundness function tests

* add roundness function help

* add roundness expression

* add roundness expression tests

* add roundness expression help

* add roundness processing

* add roundness processing tests

* add roundness processing help

* fix import and typo

* Fix typo

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Add tag

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Fix typo

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Modify the description

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Replace equality condition by qgsDoubleNear

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* Change types for literals

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* add since version

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* add a const

* add the \since adding in the sip file

* Fix typo

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* Fix typo

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* Remove SIP factory annotation

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Remove double calculation of permimeter

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Always add an attribute

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Use QGSCOMPARENEAR in tests

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Shorten the short description

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Make a more complete help string

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Correct the description

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* reformat bad code styles

* sipify

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2021-11-04 08:44:03 +01:00
Nyall Dawson
4b7dff669c Improve docs 2021-11-02 15:03:56 +11:00
Nyall Dawson
11dc9cca18 Add force_polygon_cw and force_polygon_ccw expression functions
These are recommended for use instead of the existing force_rhr
function, due to the variability in definition of the "right hand
rule" between different software applications. Using an explicit
force_polygon_cw/ccw function removes user confusion when the
results vary between different applications.
2021-11-01 12:10:41 +11:00
Nyall Dawson
0795f726cf [api] Add function to apply a dash pattern vector to a geometry
This returns a new multilinestring geometry which represents the
input geometry with the dash pattern applied to the lines or rings
of the input geometry.

Options are available to set rules for the start/end of the pattern,
e.g. ending on a full dash or gap, or half dash or gap.

Sponsored by North Road, thanks to SLYR
2021-10-30 18:18:03 +11:00
Nyall Dawson
7c03c9ec4a Calling QgsGeometry.asPoint on a multipoint with a single point part
should be allowed
2021-10-23 05:18:09 +10:00
Nyall Dawson
430c5b24b0 [api] Add methods to create triangular, square, and sine-like waves
along a geometry's boundaries

also includes variations on these which allow for randomized
triangle/square/sine-like waves, with amplitude and wavelength
randomly generated using a specified range
2021-10-23 05:17:07 +10:00
Juergen E. Fischer
c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00
nirvn
ef84e48a09 Run sipify_all.sh 2021-10-12 16:34:05 +10:00
Denis Rouzaud
ec16736306 run sipify 2021-10-12 16:34:05 +10:00
Nyall Dawson
e8bb89855d Update tests 2021-10-12 14:54:26 +10:00
Nyall Dawson
e733b517b3 Split QgsVertexId out to own file, promote type to enum class 2021-10-12 14:54:26 +10:00
Loïc Bartoletti
48c77a3bde more const 2021-09-24 11:17:54 +10:00
Loïc Bartoletti
e7568f24ef const qgsrectangle 2021-09-24 11:17:54 +10:00
Loïc Bartoletti
c63c630c16 const qgsgeometryutils 2021-09-24 11:17:54 +10:00
Loïc Bartoletti
9e363a4aea more const in qgscircle 2021-09-24 11:17:54 +10:00
Loïc Bartoletti
1623d8e5a0 sipify 2021-09-24 08:54:47 +10:00
Nyall Dawson
e6b39077a2
Promote QgsCoordinateTransform::TransformDirection to enum class, move to Qgis
This enum was forcing an include of qgscoordinatetransform.h within the
widely used qgsabstractgeometry.h header, causing an absolute explosion
of includes of a bunch of very heavy header classes all across QGIS. By
removing the forced include we can avoid a ton of unwanted includes
and make wider use of forward declarations...
2021-09-22 16:40:49 +10:00
Sandro Santilli
acf302e7cd Add a distanceWithin method to the QgsGeometryEngine virtual class
And use it from QgsVectorLayerFeatureIterator

References #472

The current implementation is really just a wrapper around distance()
but opens the door for future improvements
2021-09-22 08:36:06 +10:00
Nyall Dawson
3d599fe4b5 Fix QgsGeometry.fromPolygonXY docs
Fixes #45099
2021-09-21 09:14:52 +10:00
Nyall Dawson
01e3e1dddc [api] Move QgsGeometry enums to Qgis, promote to enum classes 2021-08-04 09:54:32 +10:00
Harrissou Sant-anna
5bbae769d7 Fix QgsPoint code samples 2021-07-21 10:17:37 +10:00
Nyall Dawson
c8156b0106 Add c++20 todo for replacing equality operators with default implementations 2021-07-02 12:19:58 +10:00
Nyall Dawson
711a615be3 Fix raises sphinx format 2021-06-25 10:50:04 +10:00
Even Rouault
8a6ed7d8f9 Address -Woverloaded-virtual clang virtual and enable the warning 2021-06-25 06:37:49 +10:00
Olivier Dalang
527042ee1d [convert to curve] style
# Conflicts:
#	src/app/vertextool/qgsvertextool.cpp
2021-06-19 06:24:13 +10:00
Olivier Dalang
2c69acabe5 [convert to curve] PR review 2021-06-19 06:24:13 +10:00
Olivier Dalang
9739e07c38 [convert to curve] avancement 2021-06-19 06:24:13 +10:00