@@ -33,7 +33,7 @@ class QgsCoordinateReferenceSystem
33
33
34
34
/** Use this constructor when you want to create a CRS object using
35
35
* a postgis SRID, an EpsgCrsId id or a QGIS CRS_ID.
36
- * @note We encourage you to use EpsgCrsId, Wkt or Proj4 to describe CRS's in your code
36
+ * @note We encourage you to use EpsgCrsId, WKT or Proj4 to describe CRS's in your code
37
37
* wherever possible. QGSI CRS_IDs are not guaranteed to be permanent / involatile.
38
38
* @param theId The ID no valid for the chosen coordinate system id type
39
39
* @param theType One of the types described in QgsCoordinateReferenceSystem::CrsType
@@ -53,27 +53,27 @@ class QgsCoordinateReferenceSystem
53
53
*/
54
54
bool createFromOgcWmsCrs( QString theCrs );
55
55
56
- /** Set up this srs by fetching the appropriate information from the
56
+ /** Set up this CRS by fetching the appropriate information from the
57
57
* sqlite backend. First the system level read only srs.db will be checked
58
58
* and then the users ~/.qgis/qgis.db database will be checked for a match.
59
59
* @note Any members will be overwritten during this process.
60
60
* @param theSrid The postgis SRID for the desired spatial reference system.
61
61
*/
62
62
bool createFromSrid( const long theSrid );
63
63
64
- /** Set up this srs using a Wkt spatial ref sys definition.
65
- * The wkt will be converted to a proj4 string using OGR helper
66
- * functions. After this the srs databasses will be searched for matches.
64
+ /** Set up this CRS using a WKT spatial ref sys definition.
65
+ * The WKT will be converted to a proj4 string using OGR helper
66
+ * functions. After this the SRS databases will be searched for matches.
67
67
* First the system level read only srs.db will be checked
68
68
* and then the users ~/.qgis/qgis.db database will be checked for a match.
69
69
* @note Any members will be overwritten during this process.
70
- * @note SRID and EpsgCrsId may be blank if no match can be found on srs db.
71
- * @param theWkt The Wkt for the desired spatial reference system.
70
+ * @note SRID and EpsgCrsId may be blank if no match can be found on SRS db.
71
+ * @param theWkt The WKT for the desired spatial reference system.
72
72
* @return bool TRUE if success else false
73
73
*/
74
74
bool createFromWkt( const QString &theWkt );
75
75
76
- /** Set up this srs by fetching the appropriate information from the
76
+ /** Set up this CRS by fetching the appropriate information from the
77
77
* sqlite backend. If the srsid is < 100000, only the system srs.db
78
78
* will be checked. If the srsid > 100000 the srs will be retrieved from
79
79
* the ~/.qgis/qgis.db
@@ -83,7 +83,7 @@ class QgsCoordinateReferenceSystem
83
83
*/
84
84
bool createFromSrsId( const long theSrsId );
85
85
86
- /** Set up this srs by passing it a proj4 style formatted string.
86
+ /** Set up this CRS by passing it a proj4 style formatted string.
87
87
* The string will be parsed and the projection and ellipsoid
88
88
* members set and the remainder of the proj4 string will be stored
89
89
* in the parameters member. The reason for this is so that we
@@ -94,7 +94,7 @@ class QgsCoordinateReferenceSystem
94
94
*
95
95
* We try to match the proj string to and srsid using the following logic:
96
96
*
97
- * - perform a whole text search on srs name (if not null). The srs name will
97
+ * - perform a whole text search on CRS name (if not null). The CRS name will
98
98
* have been set if this method has been delegated to from createFromWkt.
99
99
* - if the above does not match perform a whole text search on proj4 string (if not null)
100
100
* - if none of the above match convert the proj4 string to an OGR CRS
@@ -111,7 +111,7 @@ class QgsCoordinateReferenceSystem
111
111
*/
112
112
bool createFromProj4( const QString &theProjString );
113
113
114
- /** Set up this srs from a string definition, by default a WKT definition. Otherwise
114
+ /** Set up this CRS from a string definition, by default a WKT definition. Otherwise
115
115
* the string defines a authority, followed by a colon, followed by the definition.
116
116
* The authority can be one of "epsg", "postgis", "internal" for integer definitions,
117
117
* and "wkt" or "proj4" for string definitions. The implementation of each authority
@@ -120,7 +120,7 @@ class QgsCoordinateReferenceSystem
120
120
*/
121
121
bool createFromString( const QString &theDefinition );
122
122
123
- /** Set up this srs from a various text formats.
123
+ /** Set up this CRS from a various text formats.
124
124
*
125
125
* Valid formats: WKT string, "EPSG:n", "EPSGA:n", "AUTO:proj_id,unit_id,lon0,lat0",
126
126
* "urn:ogc:def:crs:EPSG::n", PROJ.4 string, filename (with WKT, XML or PROJ.4 string),
@@ -145,7 +145,7 @@ class QgsCoordinateReferenceSystem
145
145
*/
146
146
static void setupESRIWktFix();
147
147
148
- /** Find out whether this CRS is correctly initialised and usable */
148
+ /** Returns whether this CRS is correctly initialised and usable */
149
149
bool isValid() const;
150
150
151
151
/** Perform some validation on this CRS. If the sts doesn't validate the
@@ -155,7 +155,7 @@ class QgsCoordinateReferenceSystem
155
155
* if that involves resorting to a hard coded default of geocs:wgs84.
156
156
*
157
157
* @note It is not usually necessary to use this function, unless you
158
- * are trying to force this srs to be valid.
158
+ * are trying to force this CRS to be valid.
159
159
*/
160
160
void validate();
161
161
@@ -219,65 +219,75 @@ class QgsCoordinateReferenceSystem
219
219
220
220
// Accessors -----------------------------------
221
221
222
- /** Get the SrsId - if possible
223
- * @return long theSrsId The internal sqlite3 srs.db primary key for this srs
224
- */
222
+ /** Returns the SrsId, if available.
223
+ * @return the internal sqlite3 srs.db primary key for this srs
224
+ * @see postgisSrid()
225
+ */
225
226
long srsid() const;
226
227
227
- /** Get the postgis srid for this srs
228
- * @return long theSRID the Postgis spatial_ref_sys identifier for this srs (defaults to 0)
228
+ /** Returns PostGIS SRID for the CRS.
229
+ * @return the PostGIS spatial_ref_sys identifier for this CRS (defaults to 0)
229
230
*/
230
231
long postgisSrid() const;
231
232
232
- /** Get the authority identifier for this srs
233
- * @return QString the Authority identifier for this srs
233
+ /** Returns the authority identifier for the CRS, which includes both the authority (eg EPSG)
234
+ * and the CRS number (eg 4326). This is the best method to use when showing a very short CRS
235
+ * identifier to a user, eg "EPSG:4326".
236
+ * @returns the authority identifier for this CRS
237
+ * @see description()
234
238
*/
235
239
QString authid() const;
236
240
237
- /** Get the Description
238
- * @return QString the Description A textual description of the srs.
239
- * @note A zero length string will be returned if the description is uninitialised
241
+ /** Returns the descriptive name of the CRS, eg "WGS 84" or "GDA 94 / Vicgrid94". In most
242
+ * cases this is the best method to use when showing a friendly identifier for the CRS to a
243
+ * user.
244
+ * @returns descriptive name of the CRS
245
+ * @note an empty string will be returned if the description is not available for the CRS
246
+ * @see authid()
240
247
*/
241
248
QString description() const;
242
249
243
- /** Get the Projection Acronym
244
- * @return QString theProjectionAcronym The official proj4 acronym for the projection family
245
- * @note A zero length string will be returned if the projectionAcronym is uninitialised
250
+ /** Returns the projection acronym for the projection used by the CRS.
251
+ * @returns the official proj4 acronym for the projection family
252
+ * @note an empty string will be returned if the projectionAcronym is not available for the CRS
253
+ * @see ellipsoidAcronym()
246
254
*/
247
255
QString projectionAcronym() const;
248
256
249
- /** Get the Ellipsoid Acronym
250
- * @return QString theEllipsoidAcronym The official proj4 acronym for the ellipoid
251
- * @note A zero length string will be returned if the ellipsoidAcronym is uninitialised
257
+ /** Returns the ellipsoid acronym for the ellipsoid used by the CRS.
258
+ * @returns the official proj4 acronym for the ellipoid
259
+ * @note an empty string will be returned if the ellipsoidAcronym is not available for the CRS
260
+ * @see projectionAcronym()
252
261
*/
253
262
QString ellipsoidAcronym() const;
254
263
255
- /** A helper to get an wkt representation of this srs
256
- * @return string containing Wkt of the srs
264
+ /** Returns a WKT representation of this CRS.
265
+ * @return string containing WKT of the CRS
266
+ * @see toProj4()
257
267
*/
258
268
QString toWkt() const;
259
269
260
- /** Get the Proj Proj4 string representation of this srs .
270
+ /** Returns a Proj4 string representation of this CRS .
261
271
* If proj and ellps keys are found in the parameters,
262
- * they will be stripped out and the Projection and ellipsoid acronyms will be
272
+ * they will be stripped out and the projection and ellipsoid acronyms will be
263
273
* overridden with these.
264
- * @return QString theProj4String Proj4 format specifies that define this srs.
265
- * @note A zero length string will be returned if the toProj4 is uninitialised
274
+ * @return Proj4 format string that defines this CRS.
275
+ * @note an empty string will be returned if the CRS could not be represented by a Proj4 string
276
+ * @see toWkt()
266
277
*/
267
278
QString toProj4() const;
268
279
269
- /** Get this Geographic? flag
270
- * @return bool theGeoFlag Whether this is a geographic or projected coordinate system
280
+ /** Returns whether the CRS is a geographic CRS.
281
+ * @returns true if CRS is geographic, or false if it is a projected CRS
271
282
*/
272
283
bool geographicFlag() const;
273
284
274
- /** Return if axis is inverted (eg. for WMS 1.3)
275
- * @return bool Whether this is crs axis is inverted
285
+ /** Returns whether axis is inverted (eg. for WMS 1.3) for the CRS.
286
+ * @returns true if CRS axis is inverted
276
287
*/
277
288
bool axisInverted() const;
278
289
279
- /** Get the units that the projection is in
280
- * @return QGis::UnitType that gives the units for the coordinate system
290
+ /** Returns the units for the projection used by the CRS.
281
291
*/
282
292
QGis::UnitType mapUnits() const;
283
293
0 commit comments