[QGIS Commit] r9501 - in trunk/qgis: python/core src/core src/providers/delimitedtext src/providers/gpx src/providers/grass src/providers/memory src/providers/ogr src/providers/postgres src/providers/wfs src/providers/wms tests/algorithms/projections

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Oct 20 16:08:44 EDT 2008


Author: timlinux
Date: 2008-10-20 16:08:43 -0400 (Mon, 20 Oct 2008)
New Revision: 9501

Modified:
   trunk/qgis/python/core/qgsdataprovider.sip
   trunk/qgis/src/core/qgsdataprovider.h
   trunk/qgis/src/core/qgsvectorlayer.cpp
   trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
   trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.h
   trunk/qgis/src/providers/gpx/qgsgpxprovider.cpp
   trunk/qgis/src/providers/gpx/qgsgpxprovider.h
   trunk/qgis/src/providers/grass/qgsgrassprovider.cpp
   trunk/qgis/src/providers/grass/qgsgrassprovider.h
   trunk/qgis/src/providers/memory/memoryprovider.cpp
   trunk/qgis/src/providers/memory/memoryprovider.h
   trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
   trunk/qgis/src/providers/ogr/qgsogrprovider.h
   trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
   trunk/qgis/src/providers/postgres/qgspostgresprovider.h
   trunk/qgis/src/providers/wfs/qgswfsprovider.cpp
   trunk/qgis/src/providers/wfs/qgswfsprovider.h
   trunk/qgis/src/providers/wms/qgswmsprovider.cpp
   trunk/qgis/src/providers/wms/qgswmsprovider.h
   trunk/qgis/tests/algorithms/projections/projectioncshandlingtest.h
Log:
remove get prefix for crs accessor

Modified: trunk/qgis/python/core/qgsdataprovider.sip
===================================================================
--- trunk/qgis/python/core/qgsdataprovider.sip	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/python/core/qgsdataprovider.sip	2008-10-20 20:08:43 UTC (rev 9501)
@@ -20,7 +20,7 @@
        * 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;
 
       
       /** 

Modified: trunk/qgis/src/core/qgsdataprovider.h
===================================================================
--- trunk/qgis/src/core/qgsdataprovider.h	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/core/qgsdataprovider.h	2008-10-20 20:08:43 UTC (rev 9501)
@@ -60,7 +60,7 @@
      * 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;
 
 
     /**

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2008-10-20 20:08:43 UTC (rev 9501)
@@ -3435,7 +3435,7 @@
   //
 
   // 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

Modified: trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
===================================================================
--- trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp	2008-10-20 20:08:43 UTC (rev 9501)
@@ -510,7 +510,7 @@
 }
 
 
-QgsCoordinateReferenceSystem QgsDelimitedTextProvider::getCRS()
+QgsCoordinateReferenceSystem QgsDelimitedTextProvider::crs()
 {
   // TODO: make provider projection-aware
   return QgsCoordinateReferenceSystem(); // return default CRS

Modified: trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.h
===================================================================
--- trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.h	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.h	2008-10-20 20:08:43 UTC (rev 9501)
@@ -152,7 +152,7 @@
      */
     bool isValid();
 
-    virtual QgsCoordinateReferenceSystem getCRS();
+    virtual QgsCoordinateReferenceSystem crs();
 
     /* new functions */
 

Modified: trunk/qgis/src/providers/gpx/qgsgpxprovider.cpp
===================================================================
--- trunk/qgis/src/providers/gpx/qgsgpxprovider.cpp	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/gpx/qgsgpxprovider.cpp	2008-10-20 20:08:43 UTC (rev 9501)
@@ -843,7 +843,7 @@
   return GPX_DESCRIPTION;
 } // QgsGPXProvider::description()
 
-QgsCoordinateReferenceSystem QgsGPXProvider::getCRS()
+QgsCoordinateReferenceSystem QgsGPXProvider::crs()
 {
   return QgsCoordinateReferenceSystem(); // use default CRS - it's WGS84
 }

Modified: trunk/qgis/src/providers/gpx/qgsgpxprovider.h
===================================================================
--- trunk/qgis/src/providers/gpx/qgsgpxprovider.h	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/gpx/qgsgpxprovider.h	2008-10-20 20:08:43 UTC (rev 9501)
@@ -139,7 +139,7 @@
     /** return description */
     virtual QString description() const;
 
-    virtual QgsCoordinateReferenceSystem getCRS();
+    virtual QgsCoordinateReferenceSystem crs();
 
 
     /* new functions */

Modified: trunk/qgis/src/providers/grass/qgsgrassprovider.cpp
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrassprovider.cpp	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/grass/qgsgrassprovider.cpp	2008-10-20 20:08:43 UTC (rev 9501)
@@ -1267,7 +1267,7 @@
 }
 
 
-QgsCoordinateReferenceSystem QgsGrassProvider::getCRS()
+QgsCoordinateReferenceSystem QgsGrassProvider::crs()
 {
   QString Wkt;
 

Modified: trunk/qgis/src/providers/grass/qgsgrassprovider.h
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrassprovider.h	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/grass/qgsgrassprovider.h	2008-10-20 20:08:43 UTC (rev 9501)
@@ -195,7 +195,7 @@
      */
     bool isValid();
 
-    QgsCoordinateReferenceSystem getCRS();
+    QgsCoordinateReferenceSystem crs();
 
     // ----------------------------------- Edit ----------------------------------
 

Modified: trunk/qgis/src/providers/memory/memoryprovider.cpp
===================================================================
--- trunk/qgis/src/providers/memory/memoryprovider.cpp	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/memory/memoryprovider.cpp	2008-10-20 20:08:43 UTC (rev 9501)
@@ -218,7 +218,7 @@
   return ( mWkbType != QGis::WKBUnknown );
 }
 
-QgsCoordinateReferenceSystem QgsMemoryProvider::getCRS()
+QgsCoordinateReferenceSystem QgsMemoryProvider::crs()
 {
   // TODO: make provider projection-aware
   return QgsCoordinateReferenceSystem(); // return default CRS

Modified: trunk/qgis/src/providers/memory/memoryprovider.h
===================================================================
--- trunk/qgis/src/providers/memory/memoryprovider.h	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/memory/memoryprovider.h	2008-10-20 20:08:43 UTC (rev 9501)
@@ -175,7 +175,7 @@
      */
     bool isValid();
 
-    virtual QgsCoordinateReferenceSystem getCRS();
+    virtual QgsCoordinateReferenceSystem crs();
 
   protected:
 

Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.cpp	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.cpp	2008-10-20 20:08:43 UTC (rev 9501)
@@ -1230,7 +1230,7 @@
   return true;
 }
 
-QgsCoordinateReferenceSystem QgsOgrProvider::getCRS()
+QgsCoordinateReferenceSystem QgsOgrProvider::crs()
 {
   QgsDebugMsg( "entering." );
 

Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.h
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.h	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.h	2008-10-20 20:08:43 UTC (rev 9501)
@@ -45,7 +45,7 @@
 
 
 
-    virtual QgsCoordinateReferenceSystem getCRS();
+    virtual QgsCoordinateReferenceSystem crs();
 
 
     /**

Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2008-10-20 20:08:43 UTC (rev 9501)
@@ -2711,7 +2711,7 @@
 }
 
 
-QgsCoordinateReferenceSystem QgsPostgresProvider::getCRS()
+QgsCoordinateReferenceSystem QgsPostgresProvider::crs()
 {
   QgsCoordinateReferenceSystem srs;
   srs.createFromSrid( srid.toInt() );

Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.h
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.h	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.h	2008-10-20 20:08:43 UTC (rev 9501)
@@ -73,7 +73,7 @@
      * 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

Modified: trunk/qgis/src/providers/wfs/qgswfsprovider.cpp
===================================================================
--- trunk/qgis/src/providers/wfs/qgswfsprovider.cpp	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/wfs/qgswfsprovider.cpp	2008-10-20 20:08:43 UTC (rev 9501)
@@ -135,7 +135,7 @@
   mFeatureIterator = mSelectedFeatures.begin();
 }
 
-QgsCoordinateReferenceSystem QgsWFSProvider::getCRS()
+QgsCoordinateReferenceSystem QgsWFSProvider::crs()
 {
   return mSourceCRS;
 }

Modified: trunk/qgis/src/providers/wfs/qgswfsprovider.h
===================================================================
--- trunk/qgis/src/providers/wfs/qgswfsprovider.h	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/wfs/qgswfsprovider.h	2008-10-20 20:08:43 UTC (rev 9501)
@@ -71,7 +71,7 @@
     const QgsFieldMap & fields() const;
     void begin();
 
-    virtual QgsCoordinateReferenceSystem getCRS();
+    virtual QgsCoordinateReferenceSystem crs();
 
     /* Inherited from QgsDataProvider */
 

Modified: trunk/qgis/src/providers/wms/qgswmsprovider.cpp
===================================================================
--- trunk/qgis/src/providers/wms/qgswmsprovider.cpp	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/wms/qgswmsprovider.cpp	2008-10-20 20:08:43 UTC (rev 9501)
@@ -2194,7 +2194,7 @@
 }
 
 
-QgsCoordinateReferenceSystem QgsWmsProvider::getCRS()
+QgsCoordinateReferenceSystem QgsWmsProvider::crs()
 {
   // TODO: implement
   return QgsCoordinateReferenceSystem();

Modified: trunk/qgis/src/providers/wms/qgswmsprovider.h
===================================================================
--- trunk/qgis/src/providers/wms/qgswmsprovider.h	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/src/providers/wms/qgswmsprovider.h	2008-10-20 20:08:43 UTC (rev 9501)
@@ -374,7 +374,7 @@
      * 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

Modified: trunk/qgis/tests/algorithms/projections/projectioncshandlingtest.h
===================================================================
--- trunk/qgis/tests/algorithms/projections/projectioncshandlingtest.h	2008-10-20 18:02:52 UTC (rev 9500)
+++ trunk/qgis/tests/algorithms/projections/projectioncshandlingtest.h	2008-10-20 20:08:43 UTC (rev 9501)
@@ -266,12 +266,12 @@
       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 @@
       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 );



More information about the QGIS-commit mailing list