Skip to content

Commit 8b744fb

Browse files
committed
Expand docs with notes on caching
1 parent 637713f commit 8b744fb

File tree

3 files changed

+163
-23
lines changed

3 files changed

+163
-23
lines changed

python/PyQt6/core/auto_generated/proj/qgscoordinatereferencesystem.sip.in

+50-5
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ If no prefix is specified, WKT definition is assumed.
203203

204204
:param definition: A String containing a coordinate reference system definition.
205205

206+
.. note::
207+
208+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
209+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
210+
206211
.. seealso:: :py:func:`createFromString`
207212
%End
208213

@@ -245,6 +250,11 @@ QgsCoordinateReferenceSystem object.
245250
%Docstring
246251
Creates a CRS from a given OGC WMS-format Coordinate Reference System string.
247252

253+
.. note::
254+
255+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
256+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
257+
248258
:param ogcCrs: OGR compliant CRS definition, e.g., "EPSG:4326"
249259

250260
:return: matching CRS, or an invalid CRS if string could not be matched
@@ -256,6 +266,11 @@ Creates a CRS from a given OGC WMS-format Coordinate Reference System string.
256266
%Docstring
257267
Creates a CRS from a given EPSG ID.
258268

269+
.. note::
270+
271+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
272+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
273+
259274
:param epsg: epsg CRS ID
260275

261276
:return: matching CRS, or an invalid CRS if string could not be matched
@@ -265,6 +280,11 @@ Creates a CRS from a given EPSG ID.
265280
%Docstring
266281
Creates a CRS from a proj style formatted string.
267282

283+
.. note::
284+
285+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
286+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
287+
268288
:return: matching CRS, or an invalid CRS if string could not be matched
269289

270290
.. seealso:: :py:func:`createFromProj`
@@ -291,6 +311,11 @@ Creates a CRS from a proj style formatted string.
291311
%Docstring
292312
Creates a CRS from a WKT spatial ref sys definition string.
293313

314+
.. note::
315+
316+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
317+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
318+
294319
:param wkt: WKT for the desired spatial reference system.
295320

296321
:return: matching CRS, or an invalid CRS if string could not be matched
@@ -302,6 +327,11 @@ Creates a CRS from a WKT spatial ref sys definition string.
302327
%Docstring
303328
Creates a CRS from a specified QGIS SRS ID.
304329

330+
.. note::
331+
332+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
333+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
334+
305335
:param srsId: internal QGIS SRS ID
306336

307337
:return: matching CRS, or an invalid CRS if ID could not be found
@@ -354,7 +384,8 @@ and refer to QGIS internal CRS IDs.
354384

355385
.. note::
356386

357-
this method uses an internal cache. Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
387+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
388+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
358389

359390
.. seealso:: :py:func:`fromOgcWmsCrs`
360391
%End
@@ -390,7 +421,8 @@ and :py:func:`~QgsCoordinateReferenceSystem.createFromOgcWmsCrs` is used to init
390421

391422
.. note::
392423

393-
this method uses an internal cache. Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
424+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
425+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
394426

395427
.. seealso:: :py:func:`fromWkt`
396428
%End
@@ -408,7 +440,8 @@ user's local CRS database from home directory is used.
408440

409441
.. note::
410442

411-
this method uses an internal cache. Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
443+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
444+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
412445

413446
.. seealso:: :py:func:`fromSrsId`
414447

@@ -445,7 +478,8 @@ We try to match the Proj string to internal QGIS CRS ID using the following logi
445478

446479
.. note::
447480

448-
This method uses an internal cache. Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
481+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
482+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
449483

450484
.. seealso:: :py:func:`fromProj`
451485

@@ -484,7 +518,8 @@ We try to match the Proj string to internal QGIS CRS ID using the following logi
484518

485519
.. note::
486520

487-
This method uses an internal cache. Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
521+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
522+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
488523

489524
.. seealso:: :py:func:`fromProj`
490525

@@ -507,6 +542,11 @@ If no prefix is specified, WKT definition is assumed.
507542

508543
:param definition: A String containing a coordinate reference system definition.
509544

545+
.. note::
546+
547+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
548+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
549+
510550
:return: ``True`` on success else ``False``
511551
%End
512552

@@ -531,6 +571,11 @@ For more details on supported formats see OGRSpatialReference.SetFromUserInput()
531571

532572
this function generates a WKT string using OSRSetFromUserInput() and
533573
passes it to :py:func:`~QgsCoordinateReferenceSystem.createFromWkt` function.
574+
575+
.. note::
576+
577+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
578+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
534579
%End
535580

536581
static void setupESRIWktFix() /Deprecated/;

python/core/auto_generated/proj/qgscoordinatereferencesystem.sip.in

+50-5
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ If no prefix is specified, WKT definition is assumed.
203203

204204
:param definition: A String containing a coordinate reference system definition.
205205

206+
.. note::
207+
208+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
209+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
210+
206211
.. seealso:: :py:func:`createFromString`
207212
%End
208213

@@ -245,6 +250,11 @@ QgsCoordinateReferenceSystem object.
245250
%Docstring
246251
Creates a CRS from a given OGC WMS-format Coordinate Reference System string.
247252

253+
.. note::
254+
255+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
256+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
257+
248258
:param ogcCrs: OGR compliant CRS definition, e.g., "EPSG:4326"
249259

250260
:return: matching CRS, or an invalid CRS if string could not be matched
@@ -256,6 +266,11 @@ Creates a CRS from a given OGC WMS-format Coordinate Reference System string.
256266
%Docstring
257267
Creates a CRS from a given EPSG ID.
258268

269+
.. note::
270+
271+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
272+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
273+
259274
:param epsg: epsg CRS ID
260275

261276
:return: matching CRS, or an invalid CRS if string could not be matched
@@ -265,6 +280,11 @@ Creates a CRS from a given EPSG ID.
265280
%Docstring
266281
Creates a CRS from a proj style formatted string.
267282

283+
.. note::
284+
285+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
286+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
287+
268288
:return: matching CRS, or an invalid CRS if string could not be matched
269289

270290
.. seealso:: :py:func:`createFromProj`
@@ -291,6 +311,11 @@ Creates a CRS from a proj style formatted string.
291311
%Docstring
292312
Creates a CRS from a WKT spatial ref sys definition string.
293313

314+
.. note::
315+
316+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
317+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
318+
294319
:param wkt: WKT for the desired spatial reference system.
295320

296321
:return: matching CRS, or an invalid CRS if string could not be matched
@@ -302,6 +327,11 @@ Creates a CRS from a WKT spatial ref sys definition string.
302327
%Docstring
303328
Creates a CRS from a specified QGIS SRS ID.
304329

330+
.. note::
331+
332+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
333+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
334+
305335
:param srsId: internal QGIS SRS ID
306336

307337
:return: matching CRS, or an invalid CRS if ID could not be found
@@ -354,7 +384,8 @@ and refer to QGIS internal CRS IDs.
354384

355385
.. note::
356386

357-
this method uses an internal cache. Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
387+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
388+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
358389

359390
.. seealso:: :py:func:`fromOgcWmsCrs`
360391
%End
@@ -390,7 +421,8 @@ and :py:func:`~QgsCoordinateReferenceSystem.createFromOgcWmsCrs` is used to init
390421

391422
.. note::
392423

393-
this method uses an internal cache. Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
424+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
425+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
394426

395427
.. seealso:: :py:func:`fromWkt`
396428
%End
@@ -408,7 +440,8 @@ user's local CRS database from home directory is used.
408440

409441
.. note::
410442

411-
this method uses an internal cache. Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
443+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
444+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
412445

413446
.. seealso:: :py:func:`fromSrsId`
414447

@@ -445,7 +478,8 @@ We try to match the Proj string to internal QGIS CRS ID using the following logi
445478

446479
.. note::
447480

448-
This method uses an internal cache. Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
481+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
482+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
449483

450484
.. seealso:: :py:func:`fromProj`
451485

@@ -484,7 +518,8 @@ We try to match the Proj string to internal QGIS CRS ID using the following logi
484518

485519
.. note::
486520

487-
This method uses an internal cache. Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
521+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
522+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
488523

489524
.. seealso:: :py:func:`fromProj`
490525

@@ -507,6 +542,11 @@ If no prefix is specified, WKT definition is assumed.
507542

508543
:param definition: A String containing a coordinate reference system definition.
509544

545+
.. note::
546+
547+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
548+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
549+
510550
:return: ``True`` on success else ``False``
511551
%End
512552

@@ -531,6 +571,11 @@ For more details on supported formats see OGRSpatialReference.SetFromUserInput()
531571

532572
this function generates a WKT string using OSRSetFromUserInput() and
533573
passes it to :py:func:`~QgsCoordinateReferenceSystem.createFromWkt` function.
574+
575+
.. note::
576+
577+
This method uses an internal cache to speed up creation of multiple CRS with the same definition.
578+
Call :py:func:`~QgsCoordinateReferenceSystem.invalidateCache` to clear the cache.
534579
%End
535580

536581
static void setupESRIWktFix() /Deprecated/;

0 commit comments

Comments
 (0)