[QGIS Commit] r15008 - in branches/raster-providers: debian python/core src/providers/gdal

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Jan 9 07:55:14 EST 2011


Author: jef
Date: 2011-01-09 04:55:14 -0800 (Sun, 09 Jan 2011)
New Revision: 15008

Modified:
   branches/raster-providers/debian/control
   branches/raster-providers/python/core/qgscoordinatetransform.sip
   branches/raster-providers/python/core/qgsrasterviewport.sip
   branches/raster-providers/src/providers/gdal/qgsgdalprovider.cpp
Log:
update python bindings

Modified: branches/raster-providers/debian/control
===================================================================
--- branches/raster-providers/debian/control	2011-01-09 10:34:19 UTC (rev 15007)
+++ branches/raster-providers/debian/control	2011-01-09 12:55:14 UTC (rev 15008)
@@ -5,7 +5,7 @@
 Build-Depends:
  bison,
  cmake (>= 2.6),
- debhelper (>= 5.0.51~),
+ debhelper (>= 7),
  flex,
  grass-dev,
  libexpat1-dev,
@@ -14,16 +14,20 @@
  libgeos-dev (>= 3.0.0),
  libgsl0-dev,
  libpq-dev,
+ libproj-dev,
  libqt4-dev (>=4.4.0),
  libqwt5-qt4-dev,
+ libspatialite-dev,
  libsqlite3-dev,
- proj (<< 4.7.0) | libproj-dev (>= 4.7.0),
+ pkg-config,
  pyqt4-dev-tools,
  python,
  python-central (>=0.5),
  python-dev,
+ python-qt4 (>=4.1.0),
  python-qt4-dev (>=4.1.0),
- python-sip4-dev (>= 4.5.0) | sip4 (>= 4.5),
+ python-sip (>= 4.5.0),
+ python-sip-dev (>= 4.5.0),
  subversion
 Build-Conflicts: libqgis-dev, qgis-dev
 Standards-Version: 3.8.4
@@ -54,7 +58,7 @@
  This package contains architecture-independent supporting data files for use 
  with Quantum GIS.
 
-Package: libqgis1.6.0
+Package: libqgis1.7.0
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Replaces: qgis (<=0.9.2rc1), libqgis-core1, libqgis-gui1, libqgis0, libqgis1
@@ -76,7 +80,7 @@
  libgsl0-dev,
  libpq-dev,
  libproj-dev,
- libqgis1.6.0 (= ${binary:Version}),
+ libqgis1.7.0 (= ${binary:Version}),
  libqt4-dev (>=4.4.0),
  libsqlite3-dev,
  python-qt4 (>=4.1.0),
@@ -93,7 +97,7 @@
 
 Package: qgis-plugin-grass
 Architecture: any
-Depends: qgis (= ${binary:Version}), qgis-plugin-grass-common (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, grass
+Depends: qgis (= ${binary:Version}), qgis-plugin-grass-common (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, grass640+42329
 Description: GRASS plugin for Quantum GIS
  Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
  and display databases of geographic information.
@@ -116,7 +120,7 @@
 Package: python-qgis
 Section: python
 Architecture: any
-Depends: python-qt4 (>=4.1.0), python-sip4 (>= 4.5.0), python-qgis-common (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: python-qt4 (>=4.1.0), python-sip (>= 4.5.0), python-qgis-common (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}
 Provides: ${python:Provides}
 XB-Python-Version: ${python:Versions}
 Description: Python bindings to Quantum GIS

Modified: branches/raster-providers/python/core/qgscoordinatetransform.sip
===================================================================
--- branches/raster-providers/python/core/qgscoordinatetransform.sip	2011-01-09 10:34:19 UTC (rev 15007)
+++ branches/raster-providers/python/core/qgscoordinatetransform.sip	2011-01-09 12:55:14 UTC (rev 15008)
@@ -64,7 +64,7 @@
      * Set the source (layer) QgsCoordinateReferenceSystem
      * @param theCRS QgsCoordinateReferenceSystem representation of the layer's coordinate system
      */
-    void setSourceCrs(const QgsCoordinateReferenceSystem& theCRS);
+    void setSourceCrs( const QgsCoordinateReferenceSystem& theCRS );
 
     /*! 
      * Mutator for dest QgsCoordinateReferenceSystem 
@@ -76,13 +76,13 @@
      * Get the QgsCoordinateReferenceSystem representation of the layer's coordinate system
      * @return QgsCoordinateReferenceSystem of the layer's coordinate system
      */
-    QgsCoordinateReferenceSystem& sourceCrs();
+    const QgsCoordinateReferenceSystem& sourceCrs();
 
     /*! 
      * Get the QgsCoordinateReferenceSystem representation of the map canvas coordinate system
      * @return QgsCoordinateReferenceSystem of the map canvas coordinate system
      */
-    QgsCoordinateReferenceSystem& destCRS();
+    const QgsCoordinateReferenceSystem& destCRS();
 
     /*! Transform the point from Source Coordinate System to Destination Coordinate System
     * If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS,

Modified: branches/raster-providers/python/core/qgsrasterviewport.sip
===================================================================
--- branches/raster-providers/python/core/qgsrasterviewport.sip	2011-01-09 10:34:19 UTC (rev 15007)
+++ branches/raster-providers/python/core/qgsrasterviewport.sip	2011-01-09 12:55:14 UTC (rev 15008)
@@ -7,36 +7,36 @@
 
   /** \brief  The offset from the left hand edge of the raster for the rectangle that will be drawn to screen.
    * TODO Check this explanation is correc!*/
-  int   rectXOffset;
-  float rectXOffsetFloat;
+  //int   rectXOffset;
+  //float rectXOffsetFloat;
   /** \brief  The offset from the bottom edge of the raster for the rectangle that will be drawn to screen.
    * TODO Check this explanation is correc!*/
-  int   rectYOffset;
-  float rectYOffsetFloat;
+  //int   rectYOffset;
+  //float rectYOffsetFloat;
   /** \brief Lower left X dimension of clipped raster image in raster pixel space.
    *  RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only 
    *  be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to 
    *  whatever the screen coordinates are (e.g. a 600x800 display window) */
-  double clippedXMin;
+  //double clippedXMin;
   /** \brief Top Right X dimension of clipped raster image in raster pixel space.
    *  RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only 
    *  be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to 
    *  whatever the screen coordinates are (e.g. a 600x800 display window) */
-  double clippedXMax;
+  //double clippedXMax;
   /** \brief Lower left Y dimension of clipped raster image in raster pixel space.
    *  RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only 
    *  be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to 
    *  whatever the screen coordinates are (e.g. a 600x800 display window) */
-  double clippedYMin;
+  //double clippedYMin;
   /** \brief Top Right X dimension of clipped raster image in raster pixel space.
    *  RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only 
    *  be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to 
    *  whatever the screen coordinates are (e.g. a 600x800 display window) */
-  double clippedYMax;
+  //double clippedYMax;
   /** \brief  Distance in pixels from clippedXMin to clippedXMax. */
-  int clippedWidth;
+  //int clippedWidth;
   /** \brief Distance in pixels from clippedYMin to clippedYMax  */
-  int clippedHeight;
+  //int clippedHeight;
   /** \brief Coordinate (in geographic coordinate system) of top left corner of the part of the raster that 
    * is to be rendered.*/
   QgsPoint topLeftPoint;
@@ -49,5 +49,14 @@
   /** \brief Distance in map units from bottom edge to top edge for the part of the raster that 
    * is to be rendered.*/
   int drawableAreaYDim;
+
+  // intersection of current map extent and layer extent
+  QgsRectangle mDrawnExtent;
+
+  // Source coordinate system
+  QgsCoordinateReferenceSystem mSrcCRS;
+
+  // Target coordinate system
+  QgsCoordinateReferenceSystem mDestCRS;
 };
 

Modified: branches/raster-providers/src/providers/gdal/qgsgdalprovider.cpp
===================================================================
--- branches/raster-providers/src/providers/gdal/qgsgdalprovider.cpp	2011-01-09 10:34:19 UTC (rev 15007)
+++ branches/raster-providers/src/providers/gdal/qgsgdalprovider.cpp	2011-01-09 12:55:14 UTC (rev 15008)
@@ -489,7 +489,7 @@
 
  
   // TODO: more bands support
-  myMemDsn.sprintf ( "MEM:::DATAPOINTER=%u,PIXELS=%d,LINES=%d,BANDS=1,DATATYPE=%s,PIXELOFFSET=0,LINEOFFSET=0,BANDOFFSET=0", (int)theBlock, thePixelWidth, thePixelHeight,  GDALGetDataTypeName( myGdalDataType ) );
+  myMemDsn.sprintf ( "MEM:::DATAPOINTER=%lu,PIXELS=%d,LINES=%d,BANDS=1,DATATYPE=%s,PIXELOFFSET=0,LINEOFFSET=0,BANDOFFSET=0", (long)theBlock, thePixelWidth, thePixelHeight,  GDALGetDataTypeName( myGdalDataType ) );
 
   QgsDebugMsg( "Open GDAL MEM : " + myMemDsn );
 
@@ -884,6 +884,9 @@
     case GDT_CFloat64:
       return QgsRasterDataProvider::CFloat64;
       break;
+    case GDT_TypeCount:
+      // make gcc happy
+      break;
   }
   return QgsRasterDataProvider::UnknownDataType;
 }
@@ -1092,7 +1095,6 @@
   //
   CPLErr myError; //in case anything fails
   int myCount = 1;
-  int myTotal = theRasterPyramidList.count();
   QList<QgsRasterPyramid>::const_iterator myRasterPyramidIterator;
   for ( myRasterPyramidIterator = theRasterPyramidList.begin();
         myRasterPyramidIterator != theRasterPyramidList.end();



More information about the QGIS-commit mailing list