[QGIS Commit] r9495 - in trunk/qgis: doc python/core src/app
src/core src/core/raster src/gui src/plugins/grass
src/plugins/grass/modules src/plugins/grid_maker
src/plugins/spit src/providers/grass src/providers/ogr src/ui
tests/algorithms/projections tests/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Oct 19 15:20:42 EDT 2008
Author: timlinux
Date: 2008-10-19 15:20:42 -0400 (Sun, 19 Oct 2008)
New Revision: 9495
Modified:
trunk/qgis/doc/userguide.pdf
trunk/qgis/python/core/qgis.sip
trunk/qgis/python/core/qgscoordinatereferencesystem.sip
trunk/qgis/python/core/qgscoordinatetransform.sip
trunk/qgis/python/core/qgsgeometry.sip
trunk/qgis/python/core/qgsrasterlayer.sip
trunk/qgis/python/core/qgsrect.sip
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgsoptions.cpp
trunk/qgis/src/app/qgsprojectproperties.h
trunk/qgis/src/app/qgsrasterlayerproperties.cpp
trunk/qgis/src/app/qgsvectorlayerproperties.cpp
trunk/qgis/src/core/qgis.h
trunk/qgis/src/core/qgsclipper.cpp
trunk/qgis/src/core/qgsclipper.h
trunk/qgis/src/core/qgscoordinatereferencesystem.cpp
trunk/qgis/src/core/qgscoordinatereferencesystem.h
trunk/qgis/src/core/qgscoordinatetransform.cpp
trunk/qgis/src/core/qgscoordinatetransform.h
trunk/qgis/src/core/qgsgeometry.cpp
trunk/qgis/src/core/qgsgeometry.h
trunk/qgis/src/core/qgsmaprenderer.cpp
trunk/qgis/src/core/qgsrect.h
trunk/qgis/src/core/raster/qgsrasterlayer.cpp
trunk/qgis/src/core/raster/qgsrasterlayer.h
trunk/qgis/src/gui/qgsgenericprojectionselector.cpp
trunk/qgis/src/plugins/grass/modules/g.proj.ascii.new.qgm
trunk/qgis/src/plugins/grass/modules/g.proj.ascii.qgm
trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
trunk/qgis/src/plugins/grid_maker/graticulecreator.cpp
trunk/qgis/src/plugins/spit/qgsshapefile.cpp
trunk/qgis/src/providers/grass/qgsgrassprovider.cpp
trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
trunk/qgis/src/ui/qgsoptionsbase.ui
trunk/qgis/tests/algorithms/projections/projectioncshandlingtest.h
trunk/qgis/tests/src/core/regression1141.cpp
trunk/qgis/tests/src/core/testqgsmaprenderer.cpp
trunk/qgis/tests/src/core/testqgsvectorfilewriter.cpp
Log:
More api cleanups
Modified: trunk/qgis/doc/userguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/qgis/python/core/qgis.sip
===================================================================
--- trunk/qgis/python/core/qgis.sip 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/python/core/qgis.sip 2008-10-19 19:20:42 UTC (rev 9495)
@@ -89,8 +89,8 @@
};
- /** WKT string that represents a geographic coord sys */
- const QString GEOWKT;
+ /** Wkt string that represents a geographic coord sys */
+ const QString GEOWkt;
/** PROJ4 string that represents a geographic coord sys */
const QString GEOPROJ4;
Modified: trunk/qgis/python/core/qgscoordinatereferencesystem.sip
===================================================================
--- trunk/qgis/python/core/qgscoordinatereferencesystem.sip 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/python/core/qgscoordinatereferencesystem.sip 2008-10-19 19:20:42 UTC (rev 9495)
@@ -24,7 +24,7 @@
~QgsCoordinateReferenceSystem();
/*!
- * Constructs a CRS object from a WKT string
+ * Constructs a CRS object from a Wkt string
* @param theWkt A String containing a valid Wkt def
*/
explicit QgsCoordinateReferenceSystem(QString theWkt);
@@ -59,14 +59,14 @@
*/
bool createFromSrid(const long theSrid);
- /*! Set up this srs using a WKT spatial ref sys definition.
+ /*! Set up this srs using a Wkt spatial ref sys definition.
* The wkt will be converted to a proj4 string using OGR helper
* functions. After this the srs databasses will be searched for matches.
* First the system level read only srs.db will be checked
* and then the users ~/.qgis/qgis.db database will be checked for a match.
* @note Any members will be overwritten during this process.
* @note SRID and EpsgCrsId may be blank if no match can be found on srs db.
- * @param theWkt The WKT for the desired spatial reference system.
+ * @param theWkt The Wkt for the desired spatial reference system.
* @return bool TRUE if sucess else false
*/
bool createFromWkt(const QString theWkt);
@@ -161,10 +161,6 @@
* is inconclusive.
*/
bool equals(QString theProj4String);
- /*! A helper to get an wkt representation of this srs
- * @return string containing Wkt of the srs
- */
- QString toWkt() const;
/*! Restores state from the given Dom node.
* @param theNode The node from which state will be restored
@@ -188,12 +184,6 @@
*/
bool writeXML( QDomNode & theNode, QDomDocument & theDoc );
- /** A static helper function to find out the proj4 string for a srsid
- * @param int theSrsId The srsid used for the lookup
- * @return QString The proj4 string
- */
- static QString getProj4FromSrsId(const int theSrsId);
-
/** Sets custom function to force valid CRS
* QGIS uses implementation in QgisGui::customSrsValidation
*/
@@ -229,13 +219,17 @@
* @note A zero length string will be returned if the ellipsoidAcronym is uninitialised
*/
QString ellipsoidAcronym () const;
+ /*! A helper to get an wkt representation of this srs
+ * @return string containing Wkt of the srs
+ */
+ QString toWkt() const;
/** Get the Proj Proj4String. If proj and ellps keys are found in the parameters,
* they will be stripped out and the Projection and ellipsoid acronyms will be
* overridden with these.
* @return QString theProj4String Proj4 format specifies that define this srs.
- * @note A zero length string will be returned if the proj4String is uninitialised
+ * @note A zero length string will be returned if the toProj4 is uninitialised
*/
- QString proj4String() const;
+ QString toProj4() const;
/*! Get this Geographic? flag
* @return bool theGeoFlag Whether this is a geographic or projected coordinate system
*/
Modified: trunk/qgis/python/core/qgscoordinatetransform.sip
===================================================================
--- trunk/qgis/python/core/qgscoordinatetransform.sip 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/python/core/qgscoordinatetransform.sip 2008-10-19 19:20:42 UTC (rev 9495)
@@ -35,20 +35,20 @@
/*!
* Constructs a QgsCoordinateTransform using the Well Known Text representation
* of the layer and map canvas coordinate systems
- * @param theSourceWKT WKT, typically of the layer's coordinate system
- * @param theDestWKT WKT, typically of the map canvas coordinate system
+ * @param theSourceWkt Wkt, typically of the layer's coordinate system
+ * @param theDestWkt Wkt, typically of the map canvas coordinate system
*/
- QgsCoordinateTransform(QString theSourceWKT, QString theDestWKT );
+ QgsCoordinateTransform(QString theSourceWkt, QString theDestWkt );
/*!
* Constructs a QgsCoordinateTransform using a Spatial Reference Id
* of the layer and map canvas coordinate system as Wkt
* @param theSourceSrid Spatial Ref Id of the layer's coordinate system
- * @param theSourceWKT WKT of the map canvas coordinate system
+ * @param theSourceWkt Wkt of the map canvas coordinate system
* @param theSourceCRSType On of the enum members defined in QgsCoordinateReferenceSystem::CrsType
*/
QgsCoordinateTransform(long theSourceSrid,
- QString theDestWKT,
+ QString theDestWkt,
QgsCoordinateReferenceSystem::CrsType theSourceCRSType = QgsCoordinateReferenceSystem::PostgisCrsId );
//! destructor
Modified: trunk/qgis/python/core/qgsgeometry.sip
===================================================================
--- trunk/qgis/python/core/qgsgeometry.sip 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/python/core/qgsgeometry.sip 2008-10-19 19:20:42 UTC (rev 9495)
@@ -34,7 +34,7 @@
~QgsGeometry();
- /** static method that creates geometry from WKT */
+ /** static method that creates geometry from Wkt */
static QgsGeometry* fromWkt(QString wkt) /Factory/;
/** construct geometry from a point */
Modified: trunk/qgis/python/core/qgsrasterlayer.sip
===================================================================
--- trunk/qgis/python/core/qgsrasterlayer.sip 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/python/core/qgsrasterlayer.sip 2008-10-19 19:20:42 UTC (rev 9495)
@@ -90,8 +90,8 @@
*/
QString identifyAsText(const QgsPoint & point);
- /** \brief Query gdal to find out the WKT projection string for this layer. This implements the virtual method of the same name defined in QgsMapLayer*/
- QString getProjectionWKT();
+ /** \brief Query gdal to find out the Wkt projection string for this layer. This implements the virtual method of the same name defined in QgsMapLayer*/
+ QString getProjectionWkt();
/** \brief Returns the number of raster units per each raster pixel. For rasters with world file, this is normally the first row (without the sign) in that file */
double rasterUnitsPerPixel();
Modified: trunk/qgis/python/core/qgsrect.sip
===================================================================
--- trunk/qgis/python/core/qgsrect.sip 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/python/core/qgsrect.sip 2008-10-19 19:20:42 UTC (rev 9495)
@@ -67,7 +67,7 @@
void combineExtentWith(double x, double y);
//! test if rectangle is empty
bool isEmpty() const;
- //! returns string representation in WKT form
+ //! returns string representation in Wkt form
QString asWktCoordinates() const;
//! returns string representation of form xmin,ymin xmax,ymax
QString toString(bool automaticPrecision = false) const;
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/app/qgisapp.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -260,7 +260,7 @@
*/
static void customSrsValidation_( QgsCoordinateReferenceSystem* srs )
{
- QString proj4String;
+ QString toProj4;
QSettings mySettings;
QString myDefaultProjectionOption =
mySettings.value( "/Projections/defaultBehaviour" ).toString();
@@ -271,9 +271,9 @@
QgsGenericProjectionSelector * mySelector = new QgsGenericProjectionSelector();
mySelector->setMessage( srs->validationHint() ); //shows a generic message, if not speficied
- proj4String = QgsProject::instance()->readEntry( "SpatialRefSys", "//ProjectCRSProj4String", GEOPROJ4 );
+ toProj4 = QgsProject::instance()->readEntry( "SpatialRefSys", "//ProjectCRSProj4String", GEOPROJ4 );
QgsCoordinateReferenceSystem defaultCRS;
- if ( defaultCRS.createFromProj4( proj4String ) )
+ if ( defaultCRS.createFromProj4( toProj4 ) )
{
mySelector->setSelectedCrsId( defaultCRS.srsid() );
}
@@ -291,10 +291,10 @@
}
else if ( myDefaultProjectionOption == "useProject" )
{
- // XXX TODO: Change project to store selected CS as 'projectCRS' not 'selectedWKT'
- proj4String = QgsProject::instance()->readEntry( "SpatialRefSys", "//ProjectCRSProj4String", GEOPROJ4 );
- QgsDebugMsg( "Layer srs set from project: " + proj4String );
- srs->createFromProj4( proj4String );
+ // XXX TODO: Change project to store selected CS as 'projectCRS' not 'selectedWkt'
+ toProj4 = QgsProject::instance()->readEntry( "SpatialRefSys", "//ProjectCRSProj4String", GEOPROJ4 );
+ QgsDebugMsg( "Layer srs set from project: " + toProj4 );
+ srs->createFromProj4( toProj4 );
}
else ///Projections/defaultBehaviour==useGlobal
{
@@ -2309,7 +2309,7 @@
QApplication::setOverrideCursor( Qt::WaitCursor );
QString connInfo = dbs->connInfo();
- // for each selected table, connect to the database, parse the WKT geometry,
+ // for each selected table, connect to the database, parse the Wkt geometry,
// and build a canvasitem for it
// readWKB(connInfo,tables);
QStringList::Iterator it = tables.begin();
Modified: trunk/qgis/src/app/qgsoptions.cpp
===================================================================
--- trunk/qgis/src/app/qgsoptions.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/app/qgsoptions.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -80,7 +80,7 @@
radUseGlobalProjection->setChecked( true );
}
- txtGlobalWKT->setText( settings.value( "/Projections/defaultProjectionString", GEOPROJ4 ).toString() );
+ txtGlobalWkt->setText( settings.value( "/Projections/defaultProjectionString", GEOPROJ4 ).toString() );
// populate combo box with ellipsoids
getEllipsoidList();
@@ -291,7 +291,7 @@
settings.setValue( "/Projections/defaultBehaviour", "useGlobal" );
}
- settings.setValue( "/Projections/defaultProjectionString", txtGlobalWKT->toPlainText() );
+ settings.setValue( "/Projections/defaultProjectionString", txtGlobalWkt->toPlainText() );
settings.setValue( "/qgis/measure/ellipsoid", getEllipsoidAcronym( cmbEllipsoid->currentText() ) );
@@ -356,7 +356,7 @@
//find out srs id of current proj4 string
QgsCoordinateReferenceSystem refSys;
- if ( refSys.createFromProj4( txtGlobalWKT->toPlainText() ) )
+ if ( refSys.createFromProj4( txtGlobalWkt->toPlainText() ) )
{
mySelector->setSelectedCrsId( refSys.srsid() );
}
@@ -364,8 +364,8 @@
if ( mySelector->exec() )
{
//! @todo changes this control name in gui to txtGlobalProjString
- txtGlobalWKT->setText( mySelector->selectedProj4String() );
- QgsDebugMsg( QString( "------ Global Default Projection Selection set to ----------\n%1" ).arg( txtGlobalWKT->toPlainText() ) );
+ txtGlobalWkt->setText( mySelector->selectedProj4String() );
+ QgsDebugMsg( QString( "------ Global Default Projection Selection set to ----------\n%1" ).arg( txtGlobalWkt->toPlainText() ) );
}
else
{
Modified: trunk/qgis/src/app/qgsprojectproperties.h
===================================================================
--- trunk/qgis/src/app/qgsprojectproperties.h 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/app/qgsprojectproperties.h 2008-10-19 19:20:42 UTC (rev 9495)
@@ -57,7 +57,7 @@
void title( QString const & title );
/*! Accessor for projection */
- QString projectionWKT();
+ QString projectionWkt();
/*! Indicates that the projection switch is on */
bool isProjected();
Modified: trunk/qgis/src/app/qgsrasterlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -299,7 +299,7 @@
tabBar->setTabEnabled( tabBar->indexOf( tabPageHistogram ), FALSE );
}
- leSpatialRefSys->setText( mRasterLayer->srs().proj4String() );
+ leSpatialRefSys->setText( mRasterLayer->srs().toProj4() );
// Set text for pyramid info box
QString pyramidFormat( "<h2>%1</h2><p>%2 %3 %4</p><b><font color='red'><p>%5</p><p>%6</p>" );
@@ -1696,7 +1696,7 @@
}
delete mySelector;
- leSpatialRefSys->setText( mRasterLayer->srs().proj4String() );
+ leSpatialRefSys->setText( mRasterLayer->srs().toProj4() );
}
void QgsRasterLayerProperties::on_cboxColorMap_currentIndexChanged( const QString& theText )
Modified: trunk/qgis/src/app/qgsvectorlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsvectorlayerproperties.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/app/qgsvectorlayerproperties.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -129,7 +129,7 @@
updateButtons();
- leSpatialRefSys->setText( layer->srs().proj4String() );
+ leSpatialRefSys->setText( layer->srs().toProj4() );
leSpatialRefSys->setCursorPosition( 0 );
connect( sliderTransparency, SIGNAL( valueChanged( int ) ), this, SLOT( sliderTransparency_valueChanged( int ) ) );
@@ -763,7 +763,7 @@
myMetadata += tr( "Layer Spatial Reference System:" );
myMetadata += "</td></tr>";
myMetadata += "<tr><td>";
- myMetadata += layer->srs().proj4String().replace( QRegExp( "\"" ), " \"" );
+ myMetadata += layer->srs().toProj4().replace( QRegExp( "\"" ), " \"" );
myMetadata += "</td></tr>";
//
@@ -775,7 +775,7 @@
myMetadata += tr("Project (Output) Spatial Reference System:");
myMetadata += "</td></tr>";
myMetadata += "<tr><td>";
- myMetadata += coordinateTransform->destCRS().proj4String().replace(QRegExp("\"")," \"");
+ myMetadata += coordinateTransform->destCRS().toProj4().replace(QRegExp("\"")," \"");
myMetadata += "</td></tr>";
*/
@@ -875,7 +875,7 @@
}
delete mySelector;
- leSpatialRefSys->setText( layer->srs().proj4String() );
+ leSpatialRefSys->setText( layer->srs().toProj4() );
leSpatialRefSys->setCursorPosition( 0 );
}
Modified: trunk/qgis/src/core/qgis.h
===================================================================
--- trunk/qgis/src/core/qgis.h 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgis.h 2008-10-19 19:20:42 UTC (rev 9495)
@@ -112,8 +112,8 @@
return u.f;
}
-/** WKT string that represents a geographic coord sys */
-const QString GEOWKT =
+/** Wkt string that represents a geographic coord sys */
+const QString GEOWkt =
"GEOGCS[\"WGS 84\", "
" DATUM[\"WGS_1984\", "
" SPHEROID[\"WGS 84\",6378137,298.257223563, "
Modified: trunk/qgis/src/core/qgsclipper.cpp
===================================================================
--- trunk/qgis/src/core/qgsclipper.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgsclipper.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -21,7 +21,7 @@
// Where has all the code gone?
-// It's been inlined, so is in the qgsclipper.h file.
+// It's been inlined, so its in the qgsclipper.h file.
// But the static members must be initialised outside the class! (or GCC 4 dies)
Modified: trunk/qgis/src/core/qgsclipper.h
===================================================================
--- trunk/qgis/src/core/qgsclipper.h 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgsclipper.h 2008-10-19 19:20:42 UTC (rev 9495)
@@ -67,7 +67,7 @@
// A handy way to refer to the four boundaries
- enum boundary {Xmax, Xmin, Ymax, Ymin};
+ enum Boundary {XMax, XMin, YMax, YMin};
// Trims the given feature to a rectangular box. Returns the trimmed
// feature in x and y. The shapeOpen parameter determines whether
@@ -88,17 +88,17 @@
const std::vector<double>& inY,
std::vector<double>& outX,
std::vector<double>& outY,
- boundary b,
+ Boundary b,
bool shapeOpen );
// Determines if a point is inside or outside the given boundary
- static bool inside( const double x, const double y, boundary b );
+ static bool inside( const double x, const double y, Boundary b );
// Calculates the intersection point between a line defined by a
// (x1, y1), and (x2, y2) and the given boundary
static QgsPoint intersect( const double x1, const double y1,
const double x2, const double y2,
- boundary b );
+ Boundary b );
};
// The inline functions
@@ -119,19 +119,19 @@
{
std::vector<double> tmpX;
std::vector<double> tmpY;
- trimFeatureToBoundary( x, y, tmpX, tmpY, Xmax, shapeOpen );
+ trimFeatureToBoundary( x, y, tmpX, tmpY, XMax, shapeOpen );
x.clear();
y.clear();
- trimFeatureToBoundary( tmpX, tmpY, x, y, Ymax, shapeOpen );
+ trimFeatureToBoundary( tmpX, tmpY, x, y, YMax, shapeOpen );
tmpX.clear();
tmpY.clear();
- trimFeatureToBoundary( x, y, tmpX, tmpY, Xmin, shapeOpen );
+ trimFeatureToBoundary( x, y, tmpX, tmpY, XMin, shapeOpen );
x.clear();
y.clear();
- trimFeatureToBoundary( tmpX, tmpY, x, y, Ymin, shapeOpen );
+ trimFeatureToBoundary( tmpX, tmpY, x, y, YMin, shapeOpen );
}
// An auxilary function that is part of the polygon trimming
@@ -144,7 +144,7 @@
const std::vector<double>& inY,
std::vector<double>& outX,
std::vector<double>& outY,
- boundary b, bool shapeOpen )
+ Boundary b, bool shapeOpen )
{
// The shapeOpen parameter selects whether this function treats the
// shape as open or closed. False is appropriate for polygons and
@@ -197,23 +197,23 @@
// An auxilary function to trimPolygonToBoundarY() that returns
// whether a point is inside or outside the given boundary.
-inline bool QgsClipper::inside( const double x, const double y, boundary b )
+inline bool QgsClipper::inside( const double x, const double y, Boundary b )
{
switch ( b )
{
- case Xmax: // x < MAX_X is inside
+ case XMax: // x < MAX_X is inside
if ( x < MAX_X )
return true;
break;
- case Xmin: // x > MIN_X is inside
+ case XMin: // x > MIN_X is inside
if ( x > MIN_X )
return true;
break;
- case Ymax: // y < MAX_Y is inside
+ case YMax: // y < MAX_Y is inside
if ( y < MAX_Y )
return true;
break;
- case Ymin: // y > MIN_Y is inside
+ case YMin: // y > MIN_Y is inside
if ( y > MIN_Y )
return true;
break;
@@ -228,7 +228,7 @@
inline QgsPoint QgsClipper::intersect( const double x1, const double y1,
const double x2, const double y2,
- boundary b )
+ Boundary b )
{
// This function assumes that the two given points (x1, y1), and
// (x2, y2) cross the given boundary. Making this assumption allows
@@ -238,19 +238,19 @@
switch ( b )
{
- case Xmax: // x = MAX_X boundary
+ case XMax: // x = MAX_X boundary
r_n = -( x1 - MAX_X ) * ( MAX_Y - MIN_Y );
r_d = ( x2 - x1 ) * ( MAX_Y - MIN_Y );
break;
- case Xmin: // x = MIN_X boundary
+ case XMin: // x = MIN_X boundary
r_n = -( x1 - MIN_X ) * ( MAX_Y - MIN_Y );
r_d = ( x2 - x1 ) * ( MAX_Y - MIN_Y );
break;
- case Ymax: // y = MAX_Y boundary
+ case YMax: // y = MAX_Y boundary
r_n = ( y1 - MAX_Y ) * ( MAX_X - MIN_X );
r_d = -( y2 - y1 ) * ( MAX_X - MIN_X );
break;
- case Ymin: // y = MIN_Y boundary
+ case YMin: // y = MIN_Y boundary
r_n = ( y1 - MIN_Y ) * ( MAX_X - MIN_X );
r_d = -( y2 - y1 ) * ( MAX_X - MIN_X );
break;
Modified: trunk/qgis/src/core/qgscoordinatereferencesystem.cpp
===================================================================
--- trunk/qgis/src/core/qgscoordinatereferencesystem.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgscoordinatereferencesystem.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -228,12 +228,12 @@
mDescription = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 1 ) );
mProjectionAcronym = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 2 ) );
mEllipsoidAcronym = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 3 ) );
- QString proj4String = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 4 ) );
+ QString toProj4 = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 4 ) );
mSRID = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 5 ) ).toLong();
mEpsg = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 6 ) ).toLong();
int geo = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 7 ) ).toInt();
mGeoFlag = ( geo == 0 ? false : true );
- setProj4String( proj4String );
+ setProj4String( toProj4 );
setMapUnits();
}
else
@@ -264,7 +264,7 @@
if ( myInputResult != OGRERR_NONE )
{
QgsDebugMsg( "\n---------------------------------------------------------------" );
- QgsDebugMsg( "This CRS could *** NOT *** be set from the supplied WKT " );
+ QgsDebugMsg( "This CRS could *** NOT *** be set from the supplied Wkt " );
QgsDebugMsg( "INPUT: " + theWkt );
QgsDebugMsg( "---------------------------------------------------------------\n" );
return mIsValidFlag;
@@ -593,18 +593,18 @@
}
}
-QString QgsCoordinateReferenceSystem::proj4String() const
+QString QgsCoordinateReferenceSystem::toProj4() const
{
if ( !mIsValidFlag )
return "";
- QString proj4String;
+ QString toProj4;
char *proj4src = NULL;
OSRExportToProj4( mCRS, &proj4src );
- proj4String = proj4src;
+ toProj4 = proj4src;
CPLFree( proj4src );
- return proj4String;
+ return toProj4;
}
bool QgsCoordinateReferenceSystem::geographicFlag() const
@@ -864,11 +864,11 @@
QString QgsCoordinateReferenceSystem::toWkt() const
{
QString myWkt;
- char* WKT;
- if ( OSRExportToWkt( mCRS, &WKT ) == OGRERR_NONE )
+ char* Wkt;
+ if ( OSRExportToWkt( mCRS, &Wkt ) == OGRERR_NONE )
{
- myWkt = WKT;
- OGRFree( WKT );
+ myWkt = Wkt;
+ OGRFree( Wkt );
}
return myWkt;
@@ -941,7 +941,7 @@
QDomElement mySrsElement = theDoc.createElement( "spatialrefsys" );
QDomElement myProj4Element = theDoc.createElement( "proj4" );
- myProj4Element.appendChild( theDoc.createTextNode( proj4String() ) );
+ myProj4Element.appendChild( theDoc.createTextNode( toProj4() ) );
mySrsElement.appendChild( myProj4Element );
QDomElement mySrsIdElement = theDoc.createElement( "srsid" );
@@ -991,8 +991,8 @@
// Returns the whole proj4 string for the selected srsid
-//this is a static method!
-QString QgsCoordinateReferenceSystem::getProj4FromSrsId( const int theSrsId )
+//this is a static method! NOTE I've made it private for now to reduce API clutter TS
+QString QgsCoordinateReferenceSystem::proj4FromSrsId( const int theSrsId )
{
QString myDatabaseFileName;
@@ -1091,7 +1091,7 @@
QgsDebugMsg( "***SpatialRefSystem***" );
QgsDebugMsg( "* Valid : " + ( mIsValidFlag ? QString( "true" ) : QString( "false" ) ) );
QgsDebugMsg( "* SrsId : " + QString::number( mSrsId ) );
- QgsDebugMsg( "* Proj4 : " + proj4String() );
+ QgsDebugMsg( "* Proj4 : " + toProj4() );
QgsDebugMsg( "* Desc. : " + mDescription );
if ( mapUnits() == QGis::Meters )
{
Modified: trunk/qgis/src/core/qgscoordinatereferencesystem.h
===================================================================
--- trunk/qgis/src/core/qgscoordinatereferencesystem.h 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgscoordinatereferencesystem.h 2008-10-19 19:20:42 UTC (rev 9495)
@@ -57,14 +57,14 @@
~QgsCoordinateReferenceSystem();
/*!
- * Constructs a CRS object from a WKT string
+ * Constructs a CRS object from a Wkt string
* @param theWkt A String containing a valid Wkt def
*/
explicit QgsCoordinateReferenceSystem( QString theWkt );
/*! Use this constructor when you want to create a CRS object using
* a postgis SRID, an EpsgCrsId id or a QGIS CRS_ID.
- * @note We encourage you to use EpsgCrsId, WKT or Proj4 to describe CRS's in your code
+ * @note We encourage you to use EpsgCrsId, Wkt or Proj4 to describe CRS's in your code
* wherever possible. QGSI CRS_IDs are not guaranteed to be permanent / involatile.
* @param theId The ID no valid for the chosen coordinate system id type
* @param theType One of the types described in QgsCoordinateReferenceSystem::CrsType
@@ -100,14 +100,14 @@
*/
bool createFromSrid( const long theSrid );
- /*! Set up this srs using a WKT spatial ref sys definition.
+ /*! Set up this srs using a Wkt spatial ref sys definition.
* The wkt will be converted to a proj4 string using OGR helper
* functions. After this the srs databasses will be searched for matches.
* First the system level read only srs.db will be checked
* and then the users ~/.qgis/qgis.db database will be checked for a match.
* @note Any members will be overwritten during this process.
* @note SRID and EpsgCrsId may be blank if no match can be found on srs db.
- * @param theWkt The WKT for the desired spatial reference system.
+ * @param theWkt The Wkt for the desired spatial reference system.
* @return bool TRUE if sucess else false
*/
bool createFromWkt( const QString theWkt );
@@ -203,10 +203,6 @@
* is inconclusive.
*/
bool equals( QString theProj4String );
- /*! A helper to get an wkt representation of this srs
- * @return string containing Wkt of the srs
- */
- QString toWkt() const;
/*! Restores state from the given Dom node.
* @param theNode The node from which state will be restored
@@ -230,11 +226,6 @@
*/
bool writeXML( QDomNode & theNode, QDomDocument & theDoc ) const;
- /** A static helper function to find out the proj4 string for a srsid
- * @param int theSrsId The srsid used for the lookup
- * @return QString The proj4 string
- */
- static QString getProj4FromSrsId( const int theSrsId );
/** Sets custom function to force valid CRS
* QGIS uses implementation in QgisGui::customSrsValidation
@@ -251,40 +242,54 @@
* @return long theSrsId The internal sqlite3 srs.db primary key for this srs
*/
long srsid() const;
+
/*! Get the postgis srid for this srs
* @return long theSRID the Postgis spatial_ref_sys identifier for this srs (defaults to 0)
*/
long postgisSrid() const;
+
/*! Get the EpsgCrsId identifier for this srs
* @return long theEpsg the ESPG identifier for this srs (defaults to 0)
*/
long epsg() const;
+
/*! Get the Description
* @return QString the Description A textual description of the srs.
* @note A zero length string will be returned if the description is uninitialised
*/
QString description() const;
+
/*! Get the Projection Acronym
* @return QString theProjectionAcronym The official proj4 acronym for the projection family
* @note A zero length string will be returned if the projectionAcronym is uninitialised
*/
QString projectionAcronym() const;
+
/*! Get the Ellipsoid Acronym
* @return QString theEllipsoidAcronym The official proj4 acronym for the ellipoid
* @note A zero length string will be returned if the ellipsoidAcronym is uninitialised
*/
QString ellipsoidAcronym() const;
- /** Get the Proj Proj4String. If proj and ellps keys are found in the parameters,
+
+ /*! A helper to get an wkt representation of this srs
+ * @return string containing Wkt of the srs
+ */
+ QString toWkt() const;
+
+ /** Get the Proj Proj4 string representation of this srs.
+ * If proj and ellps keys are found in the parameters,
* they will be stripped out and the Projection and ellipsoid acronyms will be
* overridden with these.
* @return QString theProj4String Proj4 format specifies that define this srs.
- * @note A zero length string will be returned if the proj4String is uninitialised
+ * @note A zero length string will be returned if the toProj4 is uninitialised
*/
- QString proj4String() const;
+ QString toProj4() const;
+
/*! Get this Geographic? flag
* @return bool theGeoFlag Whether this is a geographic or projected coordinate system
*/
bool geographicFlag() const;
+
/*! Get the units that the projection is in
* @return QGis::UnitType that gives the units for the coordinate system
*/
@@ -303,6 +308,11 @@
// We dont want to expose these to the public api since they wont create
// a fully valid crs. Programmers should use the createFrom* methods rather
private:
+ /** A static helper function to find out the proj4 string for a srsid
+ * @param int theSrsId The srsid used for the lookup
+ * @return QString The proj4 string
+ */
+ static QString proj4FromSrsId( const int theSrsId );
/*! Set the QGIS SrsId
* @param long theSrsId The internal sqlite3 srs.db primary key for this srs
@@ -421,9 +431,9 @@
}
mySummary += "\n\t\tProj4String : " ;
- if ( !r.proj4String().isNull() )
+ if ( !r.toProj4().isNull() )
{
- mySummary += r.proj4String();
+ mySummary += r.toProj4();
}
else
{
Modified: trunk/qgis/src/core/qgscoordinatetransform.cpp
===================================================================
--- trunk/qgis/src/core/qgscoordinatetransform.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgscoordinatetransform.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -72,13 +72,13 @@
}
QgsCoordinateTransform::QgsCoordinateTransform( long theSourceSrid,
- QString theDestWKT,
+ QString theDestWkt,
QgsCoordinateReferenceSystem::CrsType theSourceCRSType ): QObject()
{
setFinder();
mSourceCRS.createFromId( theSourceSrid, theSourceCRSType );
- mDestCRS.createFromWkt( theDestWKT );
+ mDestCRS.createFromWkt( theDestWkt );
// initialize the coordinate system data structures
//XXX Who spells initialize initialise?
//XXX A: Its the queen's english....
@@ -145,12 +145,12 @@
//No destination projection is set so we set the default output projection to
//be the same as input proj. This only happens on the first layer loaded
//whatever that may be...
- mDestCRS.createFromProj4( mSourceCRS.proj4String() );
+ mDestCRS.createFromProj4( mSourceCRS.toProj4() );
}
// init the projections (destination and source)
- mDestinationProjection = pj_init_plus( mDestCRS.proj4String().toUtf8() );
- mSourceProjection = pj_init_plus( mSourceCRS.proj4String().toUtf8() );
+ mDestinationProjection = pj_init_plus( mDestCRS.toProj4().toUtf8() );
+ mSourceProjection = pj_init_plus( mSourceCRS.toProj4().toUtf8() );
mInitialisedFlag = true;
if ( mDestinationProjection == NULL )
@@ -185,7 +185,7 @@
//XXX todo overload == operator for QgsCoordinateReferenceSystem
//at the moment srs.parameters contains the whole proj def...soon it wont...
- //if (mSourceCRS->proj4String() == mDestCRS->proj4String())
+ //if (mSourceCRS->toProj4() == mDestCRS->toProj4())
if ( mSourceCRS == mDestCRS )
{
// If the source and destination projection are the same, set the short
@@ -416,14 +416,14 @@
{
QgsLogger::critical( tr( "The source spatial reference system (CRS) is not valid. " ) +
tr( "The coordinates can not be reprojected. The CRS is: " ) +
- mSourceCRS.proj4String() );
+ mSourceCRS.toProj4() );
return;
}
if ( !mDestCRS.isValid() )
{
QgsLogger::critical( tr( "The destination spatial reference system (CRS) is not valid. " ) +
tr( "The coordinates can not be reprojected. The CRS is: " ) +
- mDestCRS.proj4String() );
+ mDestCRS.toProj4() );
return;
}
Modified: trunk/qgis/src/core/qgscoordinatetransform.h
===================================================================
--- trunk/qgis/src/core/qgscoordinatetransform.h 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgscoordinatetransform.h 2008-10-19 19:20:42 UTC (rev 9495)
@@ -69,20 +69,20 @@
/*!
* Constructs a QgsCoordinateTransform using the Well Known Text representation
* of the layer and map canvas coordinate systems
- * @param theSourceWKT WKT, typically of the layer's coordinate system
- * @param theDestWKT WKT, typically of the map canvas coordinate system
+ * @param theSourceWkt Wkt, typically of the layer's coordinate system
+ * @param theDestWkt Wkt, typically of the map canvas coordinate system
*/
- QgsCoordinateTransform( QString theSourceWKT, QString theDestWKT );
+ QgsCoordinateTransform( QString theSourceWkt, QString theDestWkt );
/*!
* Constructs a QgsCoordinateTransform using a Spatial Reference Id
* of the layer and map canvas coordinate system as Wkt
* @param theSourceSrid Spatial Ref Id of the layer's coordinate system
- * @param theSourceWKT WKT of the map canvas coordinate system
+ * @param theSourceWkt Wkt of the map canvas coordinate system
* @param theSourceCRSType On of the enum members defined in QgsCoordinateReferenceSystem::CrsType
*/
QgsCoordinateTransform( long theSourceSrid,
- QString theDestWKT,
+ QString theDestWkt,
QgsCoordinateReferenceSystem::CrsType theSourceCRSType = QgsCoordinateReferenceSystem::PostgisCrsId );
//! destructor
Modified: trunk/qgis/src/core/qgsgeometry.cpp
===================================================================
--- trunk/qgis/src/core/qgsgeometry.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgsgeometry.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -404,7 +404,7 @@
GEOSWKTReader_destroy( reader );
return g;
#else
- return fromGeosGeom( GEOSGeomFromWKT( wkt.toLocal8Bit().data() ) );
+ return fromGeosGeom( GEOSGeomFromWkt( wkt.toLocal8Bit().data() ) );
#endif
}
Modified: trunk/qgis/src/core/qgsgeometry.h
===================================================================
--- trunk/qgis/src/core/qgsgeometry.h 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgsgeometry.h 2008-10-19 19:20:42 UTC (rev 9495)
@@ -52,14 +52,14 @@
/** \ingroup core
* A geometry is the spatial representation of a feature.
* Represents a geometry with input and output in formats specified by
- * (at least) the Open Geospatial Consortium (WKB / WKT), and containing
+ * (at least) the Open Geospatial Consortium (WKB / Wkt), and containing
* various functions for geoprocessing of the geometry.
*
* The geometry is represented internally by the OGC WKB format or
* as GEOS geometry. Some functions use WKB for their work, others
* use GEOS.
*
- * TODO: migrate completely to GEOS and only support WKB/WKT import/export.
+ * TODO: migrate completely to GEOS and only support WKB/Wkt import/export.
*
* @author Brendan Morley
*/
@@ -79,7 +79,7 @@
//! Destructor
~QgsGeometry();
- /** static method that creates geometry from WKT */
+ /** static method that creates geometry from Wkt */
static QgsGeometry* fromWkt( QString wkt );
/** construct geometry from a point */
@@ -317,7 +317,7 @@
// Private variables
// All of these are mutable since there may be on-the-fly
- // conversions between WKB, GEOS and WKT;
+ // conversions between WKB, GEOS and Wkt;
// However the intent is the const functions do not
// semantically change the value that this object represents.
Modified: trunk/qgis/src/core/qgsmaprenderer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgsmaprenderer.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -472,7 +472,7 @@
void QgsMapRenderer::setDestinationSrs( const QgsCoordinateReferenceSystem& srs )
{
- QgsDebugMsg( "* Setting destCRS : = " + srs.proj4String() );
+ QgsDebugMsg( "* Setting destCRS : = " + srs.toProj4() );
QgsDebugMsg( "* DestCRS.srsid() = " + QString::number( srs.srsid() ) );
if ( *mDestCRS != srs )
{
@@ -488,7 +488,7 @@
{
QgsDebugMsg( "* Returning destCRS" );
QgsDebugMsg( "* DestCRS.srsid() = " + QString::number( mDestCRS->srsid() ) );
- QgsDebugMsg( "* DestCRS.proj4() = " + mDestCRS->proj4String() );
+ QgsDebugMsg( "* DestCRS.proj4() = " + mDestCRS->toProj4() );
return *mDestCRS;
}
Modified: trunk/qgis/src/core/qgsrect.h
===================================================================
--- trunk/qgis/src/core/qgsrect.h 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/qgsrect.h 2008-10-19 19:20:42 UTC (rev 9495)
@@ -90,7 +90,7 @@
void combineExtentWith( double x, double y );
//! test if rectangle is empty
bool isEmpty() const;
- //! returns string representation in WKT form
+ //! returns string representation in Wkt form
QString asWktCoordinates() const;
//! returns string representation of form xmin,ymin xmax,ymax
QString toString( bool automaticPrecision = false ) const;
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -443,13 +443,13 @@
// QgsCoordinateTransform for this layer
// NOTE: we must do this before getMetadata is called
- QString mySourceWKT = getProjectionWKT();
+ QString mySourceWkt = getProjectionWkt();
QgsDebugMsg( "--------------------------------------------------------------------------------------" );
- QgsDebugMsg( "using wkt:\n" + mySourceWKT );
+ QgsDebugMsg( "using wkt:\n" + mySourceWkt );
QgsDebugMsg( "--------------------------------------------------------------------------------------" );
- mCRS->createFromWkt( mySourceWKT );
+ mCRS->createFromWkt( mySourceWkt );
//get the project projection, defaulting to this layer's projection
//if none exists....
if ( !mCRS->isValid() )
@@ -598,20 +598,20 @@
} // QgsRasterLayer::readFile
-QString QgsRasterLayer::getProjectionWKT()
+QString QgsRasterLayer::getProjectionWkt()
{
- QString myWKTString;
+ QString myWktString;
QgsCoordinateReferenceSystem myCRS;
- myWKTString = QString( GDALGetProjectionRef( mGdalDataset ) );
- myCRS.createFromWkt( myWKTString );
+ myWktString = QString( GDALGetProjectionRef( mGdalDataset ) );
+ myCRS.createFromWkt( myWktString );
if ( !myCRS.isValid() )
{
//try to get the gcp srs from the raster layer if available
- myWKTString = QString( GDALGetGCPProjection( mGdalDataset ) );
+ myWktString = QString( GDALGetGCPProjection( mGdalDataset ) );
// What is the purpose of this piece of code?
// Sideeffects from validate()?
-// myCRS.createFromWkt(myWKTString);
+// myCRS.createFromWkt(myWktString);
// if (!myCRS.isValid())
// {
// // use force and make CRS valid!
@@ -620,7 +620,7 @@
}
- return myWKTString;
+ return myWktString;
}
void QgsRasterLayer::closeDataset()
@@ -3235,7 +3235,7 @@
myMetadata += tr( "Layer Spatial Reference System: " );
myMetadata += "</p>\n";
myMetadata += "<p>";
- myMetadata += mCRS->proj4String();
+ myMetadata += mCRS->toProj4();
myMetadata += "</p>\n";
// output coordinate system
@@ -3245,7 +3245,7 @@
myMetadata += tr("Project Spatial Reference System: ");
myMetadata += "</p>\n";
myMetadata += "<p>";
- myMetadata += mCoordinateTransform->destCRS().proj4String();
+ myMetadata += mCoordinateTransform->destCRS().toProj4();
myMetadata += "</p>\n";
*/
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.h
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.h 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.h 2008-10-19 19:20:42 UTC (rev 9495)
@@ -265,8 +265,8 @@
*/
QString identifyAsText( const QgsPoint & point );
- /** \brief Query gdal to find out the WKT projection string for this layer. This implements the virtual method of the same name defined in QgsMapLayer*/
- QString getProjectionWKT();
+ /** \brief Query gdal to find out the Wkt projection string for this layer. This implements the virtual method of the same name defined in QgsMapLayer*/
+ QString getProjectionWkt();
/** \brief Returns the number of raster units per each raster pixel. For rasters with world file, this is normally the first row (without the sign) in that file */
double rasterUnitsPerPixel();
Modified: trunk/qgis/src/gui/qgsgenericprojectionselector.cpp
===================================================================
--- trunk/qgis/src/gui/qgsgenericprojectionselector.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/gui/qgsgenericprojectionselector.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -75,13 +75,13 @@
QString QgsGenericProjectionSelector::selectedProj4String()
{
- //@NOTE dont use getSelectedWKT as that just returns the name part!
+ //@NOTE dont use getSelectedWkt as that just returns the name part!
return projectionSelector->selectedProj4String();
}
long QgsGenericProjectionSelector::selectedCrsId()
{
- //@NOTE dont use getSelectedWKT as that just returns the name part!
+ //@NOTE dont use getSelectedWkt as that just returns the name part!
return projectionSelector->selectedCrsId();
}
Modified: trunk/qgis/src/plugins/grass/modules/g.proj.ascii.new.qgm
===================================================================
--- trunk/qgis/src/plugins/grass/modules/g.proj.ascii.new.qgm 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/plugins/grass/modules/g.proj.ascii.new.qgm 2008-10-19 19:20:42 UTC (rev 9495)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">
-<qgisgrassmodule label="Print projection information from a georeferenced ASCII file containing a WKT projection description and create a new location based on it" module="g.proj">
+<qgisgrassmodule label="Print projection information from a georeferenced ASCII file containing a Wkt projection description and create a new location based on it" module="g.proj">
<file key="wkt" type="old" />
<option key="location" />
</qgisgrassmodule>
Modified: trunk/qgis/src/plugins/grass/modules/g.proj.ascii.qgm
===================================================================
--- trunk/qgis/src/plugins/grass/modules/g.proj.ascii.qgm 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/plugins/grass/modules/g.proj.ascii.qgm 2008-10-19 19:20:42 UTC (rev 9495)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">
-<qgisgrassmodule label="Print projection information from a georeferenced ASCII file containing a WKT projection description" module="g.proj">
+<qgisgrassmodule label="Print projection information from a georeferenced ASCII file containing a Wkt projection description" module="g.proj">
<file key="wkt" type="old" />
<flag key="p" />
<flag key="d" />
Modified: trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -460,7 +460,7 @@
char *wkt = NULL;
if (( errcode = OSRExportToWkt( hCRS, &wkt ) ) != OGRERR_NONE )
{
- QgsDebugMsg( QString( "OGR can't get WKT-style parameter string\nOGR Error code was %1" ).arg( errcode ) );
+ QgsDebugMsg( QString( "OGR can't get Wkt-style parameter string\nOGR Error code was %1" ).arg( errcode ) );
}
else
{
Modified: trunk/qgis/src/plugins/grid_maker/graticulecreator.cpp
===================================================================
--- trunk/qgis/src/plugins/grid_maker/graticulecreator.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/plugins/grid_maker/graticulecreator.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -16,7 +16,7 @@
#include <qgsfeature.h> //we will need to pass a bunch of these for each rec
#include <qgsgeometry.h> //each feature needs a geometry
#include <qgspoint.h> //we will use point geometry
-#include <qgis.h> //defines GEOWKT
+#include <qgis.h> //defines GEOWkt
#include <qgslogger.h>
#include <QFileInfo>
@@ -42,7 +42,7 @@
mFields.insert( 5, myField6 );
mFields.insert( 6, myField7 );
mFields.insert( 7, myField8 );
- mCRS = QgsCoordinateReferenceSystem( GEOWKT );
+ mCRS = QgsCoordinateReferenceSystem( GEOWkt );
mFileName = theOutputFileName;
}
Modified: trunk/qgis/src/plugins/spit/qgsshapefile.cpp
===================================================================
--- trunk/qgis/src/plugins/spit/qgsshapefile.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/plugins/spit/qgsshapefile.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -410,7 +410,7 @@
char *geo_temp;
// 'GeometryFromText' supports only 2D coordinates
- // TODO for proper 2.5D support we would need to use 'GeomFromEWKT'
+ // TODO for proper 2.5D support we would need to use 'GeomFromEWkt'
if ( hasMoreDimensions )
OGR_G_SetCoordinateDimension( geom, 2 );
OGR_G_ExportToWkt( geom, &geo_temp );
Modified: trunk/qgis/src/providers/grass/qgsgrassprovider.cpp
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrassprovider.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/providers/grass/qgsgrassprovider.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -1269,7 +1269,7 @@
QgsCoordinateReferenceSystem QgsGrassProvider::getCRS()
{
- QString WKT;
+ QString Wkt;
struct Cell_head cellhd;
@@ -1297,14 +1297,14 @@
struct Key_Value *projinfo = G_get_projinfo();
struct Key_Value *projunits = G_get_projunits();
char *wkt = GPJ_grass_to_wkt( projinfo, projunits, 0, 0 );
- WKT = QString( wkt );
+ Wkt = QString( wkt );
free( wkt );
}
setlocale( LC_NUMERIC, oldlocale );
QgsCoordinateReferenceSystem srs;
- srs.createFromWkt( WKT );
+ srs.createFromWkt( Wkt );
return srs;
}
Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -1138,11 +1138,11 @@
OGRSpatialReferenceH reference = NULL;
QgsCoordinateReferenceSystem mySpatialRefSys;
mySpatialRefSys.validate();
- QString myWKT = mySpatialRefSys.toWkt();
+ QString myWkt = mySpatialRefSys.toWkt();
- if ( !myWKT.isNull() && myWKT.length() != 0 )
+ if ( !myWkt.isNull() && myWkt.length() != 0 )
{
- reference = OSRNewSpatialReference( myWKT.toLocal8Bit().data() );
+ reference = OSRNewSpatialReference( myWkt.toLocal8Bit().data() );
}
// Map the qgis geometry type to the OGR geometry type
@@ -1247,13 +1247,13 @@
char * ppszProj4;
OSRExportToProj4( mySpatialRefSys, &ppszProj4 );
QgsDebugMsg( ppszProj4 );
- char *pszWKT = NULL;
- OSRExportToWkt( mySpatialRefSys, &pszWKT );
- QString myWKTString = QString( pszWKT );
- OGRFree( pszWKT );
+ char *pszWkt = NULL;
+ OSRExportToWkt( mySpatialRefSys, &pszWkt );
+ QString myWktString = QString( pszWkt );
+ OGRFree( pszWkt );
- // create CRS from WKT
- srs.createFromWkt( myWKTString );
+ // create CRS from Wkt
+ srs.createFromWkt( myWktString );
}
return srs;
Modified: trunk/qgis/src/ui/qgsoptionsbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsoptionsbase.ui 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/src/ui/qgsoptionsbase.ui 2008-10-19 19:20:42 UTC (rev 9495)
@@ -828,7 +828,7 @@
</widget>
</item>
<item row="1" column="0" >
- <widget class="QTextBrowser" name="txtGlobalWKT" />
+ <widget class="QTextBrowser" name="txtGlobalWkt" />
</item>
<item row="0" column="0" >
<widget class="QGroupBox" name="grpProjectionBehaviour" >
@@ -1092,7 +1092,7 @@
<tabstop>radPromptForProjection</tabstop>
<tabstop>radUseProjectProjection</tabstop>
<tabstop>radUseGlobalProjection</tabstop>
- <tabstop>txtGlobalWKT</tabstop>
+ <tabstop>txtGlobalWkt</tabstop>
<tabstop>pbnSelectProjection</tabstop>
<tabstop>grpLocale</tabstop>
<tabstop>cboLocale</tabstop>
Modified: trunk/qgis/tests/algorithms/projections/projectioncshandlingtest.h
===================================================================
--- trunk/qgis/tests/algorithms/projections/projectioncshandlingtest.h 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/tests/algorithms/projections/projectioncshandlingtest.h 2008-10-19 19:20:42 UTC (rev 9495)
@@ -95,7 +95,7 @@
void testProjImportWkt()
{
// create a spatial reference system object
- std::cout << "\n\nCreating and OGRSpatialReference object from WKT" << std::endl;
+ std::cout << "\n\nCreating and OGRSpatialReference object from Wkt" << std::endl;
OGRSpatialReferenceH myInputSpatialRefSys = OSRNewSpatialReference( NULL );
char *pWkt = ( char* )wkt.ascii();
CPPUNIT_ASSERT( OSRImportFromWkt( myInputSpatialRefSys, &pWkt ) == OGRERR_NONE );
@@ -164,7 +164,7 @@
//
void testProjEpsgExportToProj4()
{
- std::cout << "\n\nGetting NAD83 proj4 parameters from an EpsgCrsId format WKT" << std::endl;
+ std::cout << "\n\nGetting NAD83 proj4 parameters from an EpsgCrsId format Wkt" << std::endl;
// set up the spatial ref
OGRSpatialReference myInputSpatialRefSys;
char *pWkt = ( char* )wktEpsg.ascii();
@@ -219,7 +219,7 @@
//
void testFetchWktAttributes()
{
- std::cout << "\n\nFetching states.prj WKT attributes using OGRSpatialReference::GetAttrValue" << std::endl;
+ std::cout << "\n\nFetching states.prj Wkt attributes using OGRSpatialReference::GetAttrValue" << std::endl;
// set up the spatial ref - use the nad83 from states.prj
OGRSpatialReference myInputSpatialRefSys;
char *pWkt = ( char* )wktDestNad83.ascii();
@@ -230,7 +230,7 @@
std::cout << "\tDatum: " << datum << std::endl;
}
//
- // Test the WKT contained in wkt.txt in the current directory to see if
+ // Test the Wkt contained in wkt.txt in the current directory to see if
// the datum can be determined
//
void testWktFromFile()
@@ -293,15 +293,15 @@
}
private:
- // WKT for default projection hardcoded in QgsCoordinateTransform class
+ // Wkt for default projection hardcoded in QgsCoordinateTransform class
QString wkt;
- // WKT for an ESRI style GEOGCS in NAD27
+ // Wkt for an ESRI style GEOGCS in NAD27
QString wktDest;
- // WKT for an ESRI style GEOGCS in NAD83 (from states.shp shapefile)
+ // Wkt for an ESRI style GEOGCS in NAD83 (from states.shp shapefile)
QString wktDestNad83;
- // WKT for an EpsgCrsId style GEOGCS
+ // Wkt for an EpsgCrsId style GEOGCS
QString wktEpsg;
- // WKT for an ESRI style PROJCS as read from a shapefile
+ // Wkt for an ESRI style PROJCS as read from a shapefile
QString wktAkAlbers;
};
Modified: trunk/qgis/tests/src/core/regression1141.cpp
===================================================================
--- trunk/qgis/tests/src/core/regression1141.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/tests/src/core/regression1141.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -34,7 +34,7 @@
#include <qgscoordinatereferencesystem.h> //needed for creating a srs
#include <qgsapplication.h> //search path for srs.db
#include <qgsfield.h>
-#include <qgis.h> //defines GEOWKT
+#include <qgis.h> //defines GEOWkt
#include <qgsproviderregistry.h>
@@ -97,7 +97,7 @@
mEncoding = "UTF-8";
QgsField myField( "ąęćń", QVariant::Int, "int", 10, 0, "Value on lon" );
mFields.insert( 0, myField );
- mCRS = QgsCoordinateReferenceSystem( GEOWKT );
+ mCRS = QgsCoordinateReferenceSystem( GEOWkt );
qDebug( "Checking test dataset exists..." );
qDebug( mFileName.toLocal8Bit() );
Modified: trunk/qgis/tests/src/core/testqgsmaprenderer.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsmaprenderer.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/tests/src/core/testqgsmaprenderer.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -34,7 +34,7 @@
#include <qgscoordinatereferencesystem.h> //needed for creating a srs
#include <qgsapplication.h> //search path for srs.db
#include <qgsfield.h>
-#include <qgis.h> //defines GEOWKT
+#include <qgis.h> //defines GEOWkt
#include <qgsmaprenderer.h>
#include <qgsmaplayer.h>
#include <qgsvectorlayer.h>
@@ -89,7 +89,7 @@
mEncoding = "UTF-8";
QgsField myField1("Value",QVariant::Int,"int",10,0,"Value on lon");
mFields.insert(0, myField1);
- mCRS = QgsCoordinateReferenceSystem(GEOWKT);
+ mCRS = QgsCoordinateReferenceSystem(GEOWkt);
//
// Create the test dataset if it doesnt exist
//
Modified: trunk/qgis/tests/src/core/testqgsvectorfilewriter.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsvectorfilewriter.cpp 2008-10-19 17:05:48 UTC (rev 9494)
+++ trunk/qgis/tests/src/core/testqgsvectorfilewriter.cpp 2008-10-19 19:20:42 UTC (rev 9495)
@@ -29,7 +29,7 @@
#include <qgscoordinatereferencesystem.h> //needed for creating a srs
#include <qgsapplication.h> //search path for srs.db
#include <qgsfield.h>
-#include <qgis.h> //defines GEOWKT
+#include <qgis.h> //defines GEOWkt
/** \ingroup UnitTests
* This is a unit test for the QgsVectorFileWriter class.
@@ -100,7 +100,7 @@
mEncoding = "UTF-8";
QgsField myField1("Field1",QVariant::String,"String",10,0,"Field 1 comment");
mFields.insert(0, myField1);
- mCRS = QgsCoordinateReferenceSystem(GEOWKT);
+ mCRS = QgsCoordinateReferenceSystem(GEOWkt);
mPoint1 = QgsPoint(10.0,10.0);
mPoint2 = QgsPoint(15.0,10.0);
mPoint3 = QgsPoint(15.0,12.0);
More information about the QGIS-commit
mailing list