fix some references to PROJ.4

This commit is contained in:
Juergen E. Fischer 2018-02-19 20:34:16 +01:00
parent 23dc1c8f69
commit f14b729e3b
8 changed files with 32 additions and 25 deletions

View File

@ -21,7 +21,7 @@ This class represents a coordinate reference system (CRS).
Coordinate reference system object defines a specific map projection, as well as transformations
between different coordinate reference systems. There are various ways how a CRS can be defined:
using well-known text (WKT), PROJ.4 string or combination of authority and code (e.g. EPSG:4326).
using well-known text (WKT), PROJ string or combination of authority and code (e.g. EPSG:4326).
QGIS comes with its internal database of coordinate reference systems (stored in SQLite) that
allows lookups of CRS and seamless conversions between the various definitions.
@ -34,7 +34,7 @@ typically using meters or feet as units. Common projected coordinate systems are
Transverse Mercator or Albers Equal Area.
Internally QGIS uses proj4 library for all the math behind coordinate transformations, so in case
of any troubles with projections it is best to examine the PROJ.4 representation within the object,
of any troubles with projections it is best to examine the PROJ representation within the object,
as that is the representation that will be ultimately used.
Methods that allow inspection of CRS instances include isValid(), authid(), description(),
@ -49,7 +49,7 @@ For example, the following code will create and inspect "British national grid"
crs = QgsCoordinateReferenceSystem("EPSG:27700")
if crs.isValid():
print("CRS Description: {}".format(crs.description()))
print("CRS PROJ.4 text: {}".format(crs.toProj4()))
print("CRS PROJ text: {}".format(crs.toProj4()))
else:
print("Invalid CRS!")
@ -58,7 +58,7 @@ This will produce the following output:
.. code-block::
CRS Description: OSGB 1936 / British National Grid
CRS PROJ.4 text: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 [output trimmed]
CRS PROJ text: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 [output trimmed]
CRS Definition Formats
======================
@ -80,7 +80,7 @@ on different machines or user profiles.
See authid() and createFromOgcWmsCrs() methods.
2. **PROJ.4 string.** This is a string consisting of a series of key/value pairs in the following
2. **PROJ string.** This is a string consisting of a series of key/value pairs in the following
format: `+param1=value1 +param2=value2 [...]`. This is the format natively used by the
underlying proj4 library. For example, the definition of WGS84 looks like this:
@ -376,7 +376,7 @@ user's local CRS database from home directory is used.
bool createFromProj4( const QString &projString );
%Docstring
Sets this CRS by passing it a PROJ.4 style formatted string.
Sets this CRS by passing it a PROJ style formatted string.
The string will be parsed and the projection and ellipsoid
members set and the remainder of the proj4 string will be stored
@ -430,7 +430,7 @@ If no prefix is specified, WKT definition is assumed.
Set up this CRS from various text formats.
Valid formats: WKT string, "EPSG:n", "EPSGA:n", "AUTO:proj_id,unit_id,lon0,lat0",
"urn:ogc:def:crs:EPSG.n", PROJ.4 string, filename (with WKT, XML or PROJ.4 string),
"urn:ogc:def:crs:EPSG.n", PROJ string, filename (with WKT, XML or PROJ string),
well known name (such as NAD27, NAD83, WGS84 or WGS72),
ESRI.[WKT string] (directly or in a file), "IGNF:xxx"
@ -489,7 +489,7 @@ if that involves resorting to a hard coded default of geocs:wgs84.
long findMatchingProj();
%Docstring
Walks the CRS databases (both system and user database) trying to match
stored PROJ.4 string to a database entry in order to fill in further
stored PROJ string to a database entry in order to fill in further
pieces of information about CRS.
.. note::

View File

@ -18,7 +18,7 @@
# AUTHOR: Maciej Sieczka, msieczka@sieczka.org, http://www.sieczka.org
#
# PURPOSE: Create a QGIS srs.db-compliant SQL script with SRS, ellipsoid
# and projections defs based on the output of installed PROJ.4 and
# and projections defs based on the output of installed PROJ and
# GDAL.
#
# VERSION: 1.1.0, 2009.03.19

View File

@ -4112,13 +4112,20 @@ void QgisApp::about()
versionString += QLatin1String( "</tr><tr>" );
versionString += "<td>" + tr( "QWT Version" ) + "</td><td>" + QWT_VERSION_STR + "</td>";
versionString += "<td>" + tr( "PROJ.4 Version" ) + "</td><td>" + QString::number( PJ_VERSION ) + "</td>";
#if PJ_VERSION >= 500
versionString += "<td>" + tr( "Compiled against PROJ" ) + "</td><td>" + QString::number( PJ_VERSION ) + "</td>";
versionString += "<td>" + tr( "Running against PROJ" ) + "</td><td>" + proj_info() + "</td>";
#else
versionString += "<td colspan=2>" + tr( "PROJ.4 Version" ) + "</td><td>" + QString::number( PJ_VERSION ) + "</td>";
#endif
versionString += QLatin1String( "</tr><tr>" );
versionString += "<td>" + tr( "QWT Version" ) + "</td><td>" + QWT_VERSION_STR + "</td>";
versionString += "<td>" + tr( "QScintilla2 Version" ) + "</td><td>" + QSCINTILLA_VERSION_STR + "</td>";
versionString += QLatin1String( "</tr><tr>" );
#ifdef QGISDEBUG
versionString += "<td colspan=2>" + tr( "This copy of QGIS writes debugging output." ) + "</td>";
#endif

View File

@ -56,7 +56,7 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
*
* Coordinate reference system object defines a specific map projection, as well as transformations
* between different coordinate reference systems. There are various ways how a CRS can be defined:
* using well-known text (WKT), PROJ.4 string or combination of authority and code (e.g. EPSG:4326).
* using well-known text (WKT), PROJ string or combination of authority and code (e.g. EPSG:4326).
* QGIS comes with its internal database of coordinate reference systems (stored in SQLite) that
* allows lookups of CRS and seamless conversions between the various definitions.
*
@ -69,7 +69,7 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
* Transverse Mercator or Albers Equal Area.
*
* Internally QGIS uses proj4 library for all the math behind coordinate transformations, so in case
* of any troubles with projections it is best to examine the PROJ.4 representation within the object,
* of any troubles with projections it is best to examine the PROJ representation within the object,
* as that is the representation that will be ultimately used.
*
* Methods that allow inspection of CRS instances include isValid(), authid(), description(),
@ -83,7 +83,7 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
* crs = QgsCoordinateReferenceSystem("EPSG:27700")
* if crs.isValid():
* print("CRS Description: {}".format(crs.description()))
* print("CRS PROJ.4 text: {}".format(crs.toProj4()))
* print("CRS PROJ text: {}".format(crs.toProj4()))
* else:
* print("Invalid CRS!")
* \endcode
@ -92,7 +92,7 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
*
* \code
* CRS Description: OSGB 1936 / British National Grid
* CRS PROJ.4 text: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 [output trimmed]
* CRS PROJ text: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 [output trimmed]
* \endcode
*
* CRS Definition Formats
@ -115,7 +115,7 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
*
* See authid() and createFromOgcWmsCrs() methods.
*
* 2. **PROJ.4 string.** This is a string consisting of a series of key/value pairs in the following
* 2. **PROJ string.** This is a string consisting of a series of key/value pairs in the following
* format: `+param1=value1 +param2=value2 [...]`. This is the format natively used by the
* underlying proj4 library. For example, the definition of WGS84 looks like this:
*
@ -357,7 +357,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
bool createFromSrsId( const long srsId );
/**
* Sets this CRS by passing it a PROJ.4 style formatted string.
* Sets this CRS by passing it a PROJ style formatted string.
*
* The string will be parsed and the projection and ellipsoid
* members set and the remainder of the proj4 string will be stored
@ -401,7 +401,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
* Set up this CRS from various text formats.
*
* Valid formats: WKT string, "EPSG:n", "EPSGA:n", "AUTO:proj_id,unit_id,lon0,lat0",
* "urn:ogc:def:crs:EPSG::n", PROJ.4 string, filename (with WKT, XML or PROJ.4 string),
* "urn:ogc:def:crs:EPSG::n", PROJ string, filename (with WKT, XML or PROJ string),
* well known name (such as NAD27, NAD83, WGS84 or WGS72),
* ESRI::[WKT string] (directly or in a file), "IGNF:xxx"
*
@ -443,7 +443,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
/**
* Walks the CRS databases (both system and user database) trying to match
* stored PROJ.4 string to a database entry in order to fill in further
* stored PROJ string to a database entry in order to fill in further
* pieces of information about CRS.
* \note The ellipsoid and projection acronyms must be set as well as the proj4string!
* \returns long the SrsId of the matched CRS, zero if no match was found

View File

@ -644,7 +644,7 @@ void QgsCoordinateTransform::transformCoords( int numPoints, double *x, double *
QString msg = QObject::tr( "%1 of\n"
"%2"
"PROJ.4: %3 +to %4\n"
"PROJ: %3 +to %4\n"
"Error: %5" )
.arg( dir,
points,

View File

@ -76,7 +76,7 @@ QgsEllipsoidUtils::EllipsoidParameters QgsEllipsoidUtils::ellipsoidParameters( c
//
sqlite3_database_unique_ptr database;
sqlite3_statement_unique_ptr statement;
// Continue with PROJ.4 list of ellipsoids.
// Continue with PROJ list of ellipsoids.
//check the db is available
int result = database.open_v2( QgsApplication::srsDatabaseFilePath(), SQLITE_OPEN_READONLY, nullptr );

View File

@ -435,7 +435,7 @@ void QgsGrassNewMapset::setGrassProjection()
if ( errcode != OGRERR_NONE )
{
QgsDebugMsg( QString( "OGR can't parse PROJ.4-style parameter string:\n%1\nOGR Error code was %2" ).arg( proj4 ).arg( errcode ) );
QgsDebugMsg( QString( "OGR can't parse PROJ-style parameter string:\n%1\nOGR Error code was %2" ).arg( proj4 ).arg( errcode ) );
mCellHead.proj = PROJECTION_XY;
mCellHead.zone = 0;

View File

@ -118,7 +118,7 @@ void TestQgsCoordinateReferenceSystem::initTestCase()
qDebug() << "GEOPROJ4 constant: " << GEOPROJ4;
qDebug() << "GDAL version (build): " << GDAL_RELEASE_NAME;
qDebug() << "GDAL version (runtime): " << GDALVersionInfo( "RELEASE_NAME" );
qDebug() << "PROJ.4 version: " << PJ_VERSION;
qDebug() << "PROJ version: " << PJ_VERSION;
// if user set GDAL_FIX_ESRI_WKT print a warning
if ( strcmp( CPLGetConfigOption( "GDAL_FIX_ESRI_WKT", "" ), "" ) != 0 )
@ -338,11 +338,11 @@ QString TestQgsCoordinateReferenceSystem::testESRIWkt( int i, QgsCoordinateRefer
return QStringLiteral( "test %1 crs is invalid" );
#if 0
if ( myCrs.toProj4() != myProj4Strings[i] )
return QString( "test %1 PROJ.4 = [ %2 ] expecting [ %3 ]"
return QString( "test %1 PROJ = [ %2 ] expecting [ %3 ]"
).arg( i ).arg( myCrs.toProj4() ).arg( myProj4Strings[i] );
#endif
if ( myCrs.toProj4().indexOf( myTOWGS84Strings[i] ) == -1 )
return QStringLiteral( "test %1 [%2] not found, PROJ.4 = [%3] expecting [%4]"
return QStringLiteral( "test %1 [%2] not found, PROJ = [%3] expecting [%4]"
).arg( i ).arg( myTOWGS84Strings[i], myCrs.toProj4(), myProj4Strings[i] );
if ( myCrs.authid() != myAuthIdStrings[i] )
return QStringLiteral( "test %1 AUTHID = [%2] expecting [%3]"