Skip to content

Commit b9726d7

Browse files
committedFeb 9, 2016
Merge pull request #2748 from jef-n/wkb-bounds-check
port more WKB parsing to Qgs(Const)WkbPtr including bounds checking
2 parents ded1ebb + d05c31e commit b9726d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+715
-903
lines changed
 

‎python/core/core.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,4 @@
324324
%Include geometry/qgspolygonv2.sip
325325
%Include geometry/qgssurfacev2.sip
326326
%Include geometry/qgswkbtypes.sip
327+
%Include geometry/qgswkbptr.sip

‎python/core/geometry/qgsabstractgeometryv2.sip

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class QgsAbstractGeometryV2
127127
/** Sets the geometry from a WKB string.
128128
* @see fromWkt
129129
*/
130-
virtual bool fromWkb( const unsigned char * wkb ) = 0;
130+
virtual bool fromWkb( QgsConstWkbPtr wkb ) = 0;
131131

132132
/** Sets the geometry from a WKT string.
133133
* @see fromWkb
@@ -368,15 +368,4 @@ class QgsAbstractGeometryV2
368368
/** Updates the geometry type based on whether sub geometries contain z or m values.
369369
*/
370370
void setZMTypeFromSubGeometry( const QgsAbstractGeometryV2* subggeom, QgsWKBTypes::Type baseGeomType );
371-
372-
/** Reads a WKB header and tests its validity.
373-
* @param wkbPtr
374-
* @param wkbType destination for WKB type from header
375-
* @param endianSwap will be set to true if endian from WKB must be swapped to match QGIS platform endianness
376-
* @param expectedType expected WKB type
377-
* @returns true if header is valid and matches expected type
378-
* @note not available in Python bindings
379-
*/
380-
//static bool readWkbHeader( QgsConstWkbPtr& wkbPtr, QgsWKBTypes::Type& wkbType, bool& endianSwap, QgsWKBTypes::Type expectedType );
381-
382371
};

0 commit comments

Comments
 (0)
Please sign in to comment.