@@ -175,6 +175,7 @@ Constructs an invalid CRS object
175
175
176
176
~QgsCoordinateReferenceSystem();
177
177
178
+
178
179
explicit QgsCoordinateReferenceSystem( const QString &definition );
179
180
%Docstring
180
181
Constructs a CRS object from a string definition using createFromString()
@@ -191,9 +192,9 @@ If no prefix is specified, WKT definition is assumed.
191
192
:param definition: A String containing a coordinate reference system definition.
192
193
193
194
.. seealso:: :py:func:`createFromString`
194
- / // TODO QGIS 3: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
195
195
%End
196
196
197
+
197
198
explicit QgsCoordinateReferenceSystem( long id, CrsType type = PostgisCrsId );
198
199
%Docstring
199
200
Constructor a CRS object using a PostGIS SRID, an EPSG code or an internal QGIS CRS ID.
@@ -205,7 +206,6 @@ Constructor a CRS object using a PostGIS SRID, an EPSG code or an internal QGIS
205
206
206
207
:param id: The ID valid for the chosen CRS ID type
207
208
:param type: One of the types described in CrsType
208
- / // TODO QGIS 3: remove type and always use EPSG code
209
209
%End
210
210
211
211
QgsCoordinateReferenceSystem( const QgsCoordinateReferenceSystem &srs );
@@ -294,6 +294,7 @@ Creates a CRS from a specified QGIS SRS ID.
294
294
%End
295
295
296
296
297
+
297
298
bool createFromId( long id, CrsType type = PostgisCrsId );
298
299
%Docstring
299
300
Sets this CRS by lookup of the given ID in the CRS database.
@@ -304,9 +305,9 @@ Sets this CRS by lookup of the given ID in the CRS database.
304
305
305
306
We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code
306
307
wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
307
- / // TODO QGIS 3: remove type and always use EPSG code, rename to createFromEpsg
308
308
%End
309
309
310
+
310
311
bool createFromOgcWmsCrs( const QString &crs );
311
312
%Docstring
312
313
Sets this CRS to the given OGC WMS-format Coordinate Reference Systems.
@@ -322,17 +323,16 @@ and refer to QGIS internal CRS IDs.
322
323
this method uses an internal cache. Call invalidateCache() to clear the cache.
323
324
324
325
.. seealso:: :py:func:`fromOgcWmsCrs`
325
- / // TODO QGIS 3: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
326
326
%End
327
327
328
+
328
329
bool createFromSrid( long srid );
329
330
%Docstring
330
331
Sets this CRS by lookup of the given PostGIS SRID in the CRS database.
331
332
332
333
:param srid: The PostGIS SRID for the desired spatial reference system.
333
334
334
335
:return: True on success else false
335
- / // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
336
336
%End
337
337
338
338
bool createFromWkt( const QString &wkt );
@@ -489,6 +489,7 @@ if that involves resorting to a hard coded default of geocs:wgs84.
489
489
.. seealso:: :py:func:`setCustomCrsValidation`
490
490
%End
491
491
492
+
492
493
long findMatchingProj();
493
494
%Docstring
494
495
Walks the CRS databases (both system and user database) trying to match
@@ -500,7 +501,6 @@ pieces of information about CRS.
500
501
The ellipsoid and projection acronyms must be set as well as the proj4string!
501
502
502
503
:return: long the SrsId of the matched CRS, zero if no match was found
503
- / // TODO QGIS 3: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
504
504
%End
505
505
506
506
bool operator==( const QgsCoordinateReferenceSystem &srs ) const;
@@ -538,12 +538,12 @@ Returns the internal CRS ID, if available.
538
538
:return: the internal sqlite3 srs.db primary key for this CRS
539
539
%End
540
540
541
+
541
542
long postgisSrid() const;
542
543
%Docstring
543
544
Returns PostGIS SRID for the CRS.
544
545
545
546
:return: the PostGIS spatial_ref_sys identifier for this CRS (defaults to 0)
546
- / // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
547
547
%End
548
548
549
549
QString authid() const;
0 commit comments