67 Commits

Author SHA1 Message Date
Nyall Dawson
2366440f66
Fix typo 2025-05-19 10:55:55 +10:00
Nyall Dawson
2d52ed36fc Apply suggestions from code review 2025-05-16 14:37:30 +10:00
Till Frankenbach
01ed5b5c0e Add QgsGeometry.from_shapely() conversion method 2025-05-16 14:37:30 +10:00
Nyall Dawson
0fc05051dd Fix docstrings for QgsDateRange/QgsDateTimeRange
We can't rely on sip to generate these -- it outputs malformed
docstrings where the constructor docs are incorrectly placed
before the class docstrings
2025-04-11 10:03:58 +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
1328a2bb4b Add Python hash for QgsUnsetAttributeValue 2025-02-13 19:46:34 +10:00
Till Frankenbach
106e5aa21a Fix QgsRasterBlock and QgsRasterLayer as_numpy methods 2025-01-26 15:12:51 +01:00
merydian
3d407300ef Align PyQt5 and PyQt6 files 2024-12-09 15:30:17 +10:00
merydian
da47ee41b7 Use geometry_type variable in else block 2024-12-09 15:30:17 +10:00
merydian
ceff8fe727 Make Z and M values accessible in QgsGeometry.as_numpy() 2024-12-09 15:30:17 +10:00
Nyall Dawson
aaf4b90911
Fix malformed docstrings (#59244)
* Fix malformed docstrings

Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/188

* Fix malformed docstrings

* Fix more malformed docs
2024-10-28 14:29:21 +01:00
Nyall Dawson
2f4e5f0269 Mark QgsOptional bool operator as explicit
And reimplement for Python
2024-10-16 10:51:47 +10:00
Nyall Dawson
b5fa8d51fb Mark QgsProperty bool operator as explicit
And reimplement in Python, as sip can't handle explicit bool
operator from c++
2024-10-16 10:51:47 +10:00
Nyall Dawson
8a61127bd0 Fix exception with older shapely versions 2024-10-08 14:33:57 +10:00
merydian
a7621a2e54 Use QByteArray.data() for as_shapely 2024-09-30 13:22:21 +10:00
merydian
bb6ec91291 Improve performance of as_shapely
By utilizing QgsGeometry.asWkb() this is ~8.45 times faster than the previous implementation.
2024-09-30 13:22:21 +10:00
merydian
82772b7865 Place shapely related things in separate try statement 2024-09-30 13:22:21 +10:00
merydian
bbf6bc5e11 Implement QgsGeometry.as_numpy and .as_shapely 2024-09-30 13:22:21 +10:00
Denis Rouzaud
eafa4b48b2
fix Python API compatibility (#58860)
* fix Python API compatibility

* Update qgis.h
2024-09-25 07:06:11 +02:00
Nyall Dawson
a6f5c50b36 Move some style related enums out of global namespace 2024-08-31 06:20:02 +10:00
merydian
1b892d683f Add suggestions 2024-08-21 09:05:41 +10:00
merydian
21a276fff2 Implement QgsRasterLayer.as_numpy 2024-08-21 09:05:41 +10:00
Nyall Dawson
41f8db6503 Don't leak typing into qgis.core 2024-08-20 16:40:32 +02:00
Nyall Dawson
262ade625e Don't leak LinePlacementFlags 2024-08-19 11:16:01 +02:00
Nyall Dawson
98f3ca0650 Don't leak mapping functions into core 2024-08-19 11:16:01 +02:00
Nyall Dawson
1c119bde15 Avoid leaking processing repr into core 2024-08-19 11:16:01 +02:00
Nyall Dawson
fa518f6795 Don't leak fromFunction into core 2024-08-19 11:16:01 +02:00
Nyall Dawson
3dbbb16aa6 Don't leak range repr functions into qgis.core 2024-08-19 11:16:01 +02:00
Nyall Dawson
85df8609c5 Don't leak dummy DirectionSymbols class into core 2024-08-19 11:16:01 +02:00
Nyall Dawson
deeada9a54 Avoid leaking more helper functions into qgis.core 2024-08-16 07:28:46 +10:00
Nyall Dawson
0bca48ddca Add docs for exception classes 2024-08-16 07:28:29 +10:00
Nyall Dawson
faa4670f4c Add docs for as_numpy 2024-08-15 13:38:54 +10:00
Nyall Dawson
83c58995b3 Don't leak numpy import into qgis.core 2024-08-15 13:38:54 +10:00
Till Frankenbach
93770eca37
Add Method to Convert QgsRasterBlock to NumPy Array (#58232) 2024-08-14 10:16:40 +02:00
Nyall Dawson
3aae3a9ee4 Remove redundant duplicate enum 2024-06-06 13:57:48 +10:00
Nyall Dawson
587a80dcc2 Move label quadrant setting to QgsLabelPointSettings 2024-05-23 17:20:30 +10:00
Nyall Dawson
65ba3ddfef Cleanup QgsRasterTransparency API
- Make classes less like to be created with uninitialized members
- Use opacity instead of transparency, to match API from elsewhere in
  QGIS
2024-03-04 07:25:51 +10:00
Even Rouault
f36caa7274 [Qt6] Fix crash with Python on QgsLocatorResult::userData (fixes #56456) 2024-02-28 06:04:20 +10:00
Nyall Dawson
2357d80d25 Avoid sip property code for old api compatibility
This causes crashes on Qt6. Use Python monkey patching instead.
2024-02-17 05:38:14 +10:00
Nyall Dawson
e95ec5bae9 Fix compatibility 2024-02-04 05:54:31 +10:00
Nyall Dawson
6df159f2a2 Add missing compatibility code 2024-02-04 05:54:31 +10:00
Nyall Dawson
3e07b06d87 Fix broken old API compatibility code on Qt 6 builds
The old sip based approach to handling property -> getter/setter
conversion is broken on sip6, so move the patching into Python.

Also fix incorrect checks in tests, and add additional test
for compatiblity code.
2024-02-04 05:54:31 +10:00
Nyall Dawson
ef4f8efdcc Remove unused 2018 WKT variants, monkey patch for api compatibility 2024-01-17 10:16:32 +10:00
Julien Cabieces
3e27ac5985 [PyQt6] Build PyQt6 2024-01-16 12:18:11 +10: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
Nyall Dawson
888dc334f5 Remove duplicate enum 2023-05-15 16:38:52 +10:00
Nyall Dawson
1142e8ffac
Move QgsMapLayerType enum to Qgis.LayerType (#51874)
For consistency with other enums
2023-02-16 13:02:57 +01:00
Nyall Dawson
6453d5f35a Condense duplicate enums 2021-10-23 05:16:41 +10:00
Nyall Dawson
9752abe10b Fix python startup 2021-10-23 05:16:41 +10:00