Skip to content
Permalink
Browse files
remove get prefix for crs accessor
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9501 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 20, 2008
1 parent 08fb635 commit b352b85ef7c5a3123ada290a4ef2e704c9999770
@@ -20,7 +20,7 @@ class QgsDataProvider : QObject
* If the provider isn't capable of returning
* its projection an empty srs will be return, ti will return 0
*/
virtual QgsCoordinateReferenceSystem getCRS() = 0;
virtual QgsCoordinateReferenceSystem crs() = 0;


/**
@@ -60,7 +60,7 @@ class CORE_EXPORT QgsDataProvider : public QObject
* If the provider isn't capable of returning
* its projection an empty srs will be return, ti will return 0
*/
virtual QgsCoordinateReferenceSystem getCRS() = 0;
virtual QgsCoordinateReferenceSystem crs() = 0;


/**
@@ -3435,7 +3435,7 @@ void QgsVectorLayer::setCoordinateSystem()
//

// get CRS directly from provider
*mCRS = mDataProvider->getCRS();
*mCRS = mDataProvider->crs();

//QgsCoordinateReferenceSystem provides a mechanism for FORCE a srs to be valid
//which is inolves falling back to system, project or user selected
@@ -510,7 +510,7 @@ int QgsDelimitedTextProvider::capabilities() const
}


QgsCoordinateReferenceSystem QgsDelimitedTextProvider::getCRS()
QgsCoordinateReferenceSystem QgsDelimitedTextProvider::crs()
{
// TODO: make provider projection-aware
return QgsCoordinateReferenceSystem(); // return default CRS
@@ -152,7 +152,7 @@ class QgsDelimitedTextProvider : public QgsVectorDataProvider
*/
bool isValid();

virtual QgsCoordinateReferenceSystem getCRS();
virtual QgsCoordinateReferenceSystem crs();

/* new functions */

@@ -843,7 +843,7 @@ QString QgsGPXProvider::description() const
return GPX_DESCRIPTION;
} // QgsGPXProvider::description()

QgsCoordinateReferenceSystem QgsGPXProvider::getCRS()
QgsCoordinateReferenceSystem QgsGPXProvider::crs()
{
return QgsCoordinateReferenceSystem(); // use default CRS - it's WGS84
}
@@ -139,7 +139,7 @@ class QgsGPXProvider : public QgsVectorDataProvider
/** return description */
virtual QString description() const;

virtual QgsCoordinateReferenceSystem getCRS();
virtual QgsCoordinateReferenceSystem crs();


/* new functions */
@@ -1267,7 +1267,7 @@ struct Map_info *QgsGrassProvider::layerMap( int layerId )
}


QgsCoordinateReferenceSystem QgsGrassProvider::getCRS()
QgsCoordinateReferenceSystem QgsGrassProvider::crs()
{
QString Wkt;

@@ -195,7 +195,7 @@ class GRASS_EXPORT QgsGrassProvider : public QgsVectorDataProvider
*/
bool isValid();

QgsCoordinateReferenceSystem getCRS();
QgsCoordinateReferenceSystem crs();

// ----------------------------------- Edit ----------------------------------

@@ -218,7 +218,7 @@ bool QgsMemoryProvider::isValid()
return ( mWkbType != QGis::WKBUnknown );
}

QgsCoordinateReferenceSystem QgsMemoryProvider::getCRS()
QgsCoordinateReferenceSystem QgsMemoryProvider::crs()
{
// TODO: make provider projection-aware
return QgsCoordinateReferenceSystem(); // return default CRS
@@ -175,7 +175,7 @@ class QgsMemoryProvider : public QgsVectorDataProvider
*/
bool isValid();

virtual QgsCoordinateReferenceSystem getCRS();
virtual QgsCoordinateReferenceSystem crs();

protected:

@@ -1230,7 +1230,7 @@ QGISEXTERN bool createEmptyDataSource( const QString& uri,
return true;
}

QgsCoordinateReferenceSystem QgsOgrProvider::getCRS()
QgsCoordinateReferenceSystem QgsOgrProvider::crs()
{
QgsDebugMsg( "entering." );

@@ -45,7 +45,7 @@ class QgsOgrProvider : public QgsVectorDataProvider



virtual QgsCoordinateReferenceSystem getCRS();
virtual QgsCoordinateReferenceSystem crs();


/**
@@ -2711,7 +2711,7 @@ void QgsPostgresProvider::showMessageBox( const QString& title,
}


QgsCoordinateReferenceSystem QgsPostgresProvider::getCRS()
QgsCoordinateReferenceSystem QgsPostgresProvider::crs()
{
QgsCoordinateReferenceSystem srs;
srs.createFromSrid( srid.toInt() );
@@ -73,7 +73,7 @@ class QgsPostgresProvider : public QgsVectorDataProvider
* If the provider isn't capable of returning
* its projection an empty srs will be return, ti will return 0
*/
virtual QgsCoordinateReferenceSystem getCRS();
virtual QgsCoordinateReferenceSystem crs();

/** Select features based on a bounding rectangle. Features can be retrieved with calls to nextFeature.
* @param fetchAttributes list of attributes which should be fetched
@@ -135,7 +135,7 @@ void QgsWFSProvider::begin()
mFeatureIterator = mSelectedFeatures.begin();
}

QgsCoordinateReferenceSystem QgsWFSProvider::getCRS()
QgsCoordinateReferenceSystem QgsWFSProvider::crs()
{
return mSourceCRS;
}
@@ -71,7 +71,7 @@ class QgsWFSProvider: public QgsVectorDataProvider
const QgsFieldMap & fields() const;
void begin();

virtual QgsCoordinateReferenceSystem getCRS();
virtual QgsCoordinateReferenceSystem crs();

/* Inherited from QgsDataProvider */

@@ -2194,7 +2194,7 @@ QString QgsWmsProvider::identifyAsText( const QgsPoint& point )
}


QgsCoordinateReferenceSystem QgsWmsProvider::getCRS()
QgsCoordinateReferenceSystem QgsWmsProvider::crs()
{
// TODO: implement
return QgsCoordinateReferenceSystem();
@@ -374,7 +374,7 @@ class QgsWmsProvider : public QgsRasterDataProvider
* If the provider isn't capable of returning
* its projection an empty srs will be return, ti will return 0
*/
virtual QgsCoordinateReferenceSystem getCRS();
virtual QgsCoordinateReferenceSystem crs();

/**
* Add the list of WMS layer names to be rendered by this server
@@ -266,12 +266,12 @@ class ProjectionCsHandlingTest : public CppUnit::TestCase
CPPUNIT_ASSERT( myInputSpatialRefSys.importFromWkt( &pWkt ) == OGRERR_NONE );
std::cout << "\tGetting proj4 paramters with morph to ESRI form" << std::endl;
CPPUNIT_ASSERT( myInputSpatialRefSys.morphFromESRI() == OGRERR_NONE );
OGRSpatialReference oTargetCRS;
OGRSpatialReference oTarcrs;
char *pWgs84 = ( char * )wkt.ascii();
oTargetCRS.importFromWkt( &pWgs84 );
oTarcrs.importFromWkt( &pWgs84 );
OGRCoordinateTransformation *poCT;
poCT = OGRCreateCoordinateTransformation( &myInputSpatialRefSys,
&oTargetCRS );
&oTarcrs );
double x = 0.0;
double y = 0.0;
poCT->Transform( 1, &x, &y );
@@ -283,7 +283,7 @@ class ProjectionCsHandlingTest : public CppUnit::TestCase
std::cout << "\tPROJ4: " << proj4src << std::endl;

std::cout << "Testing inverse transform" << std::endl;
poCT = OGRCreateCoordinateTransformation( &oTargetCRS, &myInputSpatialRefSys );
poCT = OGRCreateCoordinateTransformation( &oTarcrs, &myInputSpatialRefSys );
x = -154.0;
y = 50.0;
poCT->Transform( 1, &x, &y );

0 comments on commit b352b85

Please sign in to comment.