Fix travis errors
@ -12,7 +12,8 @@ class QgsMapToPixelSimplifier : QgsAbstractGeometrySimplifier
|
|||||||
Visvalingam = 2, //!< The simplification gives each point in a line an importance weighting, so that least important points are removed first
|
Visvalingam = 2, //!< The simplification gives each point in a line an importance weighting, so that least important points are removed first
|
||||||
};
|
};
|
||||||
|
|
||||||
QgsMapToPixelSimplifier( int simplifyFlags, double tolerance );
|
//! Constructor
|
||||||
|
QgsMapToPixelSimplifier( int simplifyFlags, double tolerance, SimplifyAlgorithm simplifyAlgorithm = Distance );
|
||||||
virtual ~QgsMapToPixelSimplifier();
|
virtual ~QgsMapToPixelSimplifier();
|
||||||
|
|
||||||
//! Applicable simplification flags
|
//! Applicable simplification flags
|
||||||
@ -32,10 +33,14 @@ class QgsMapToPixelSimplifier : QgsAbstractGeometrySimplifier
|
|||||||
static bool equalSnapToGrid( double x1, double y1, double x2, double y2, double gridOriginX, double gridOriginY, float gridInverseSizeXY );
|
static bool equalSnapToGrid( double x1, double y1, double x2, double y2, double gridOriginX, double gridOriginY, float gridInverseSizeXY );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
//! Gets the simplification hints of the vector layer managed
|
||||||
int simplifyFlags() const;
|
int simplifyFlags() const;
|
||||||
|
//! Sets the simplification hints of the vector layer managed
|
||||||
void setSimplifyFlags( int simplifyFlags );
|
void setSimplifyFlags( int simplifyFlags );
|
||||||
|
|
||||||
|
//! Gets the local simplification algorithm of the vector layer managed
|
||||||
SimplifyAlgorithm simplifyAlgorithm() const;
|
SimplifyAlgorithm simplifyAlgorithm() const;
|
||||||
|
//! Sets the local simplification algorithm of the vector layer managed
|
||||||
void setSimplifyAlgorithm( SimplifyAlgorithm simplifyAlgorithm );
|
void setSimplifyAlgorithm( SimplifyAlgorithm simplifyAlgorithm );
|
||||||
|
|
||||||
//! Returns a simplified version the specified geometry
|
//! Returns a simplified version the specified geometry
|
||||||
|
@ -403,8 +403,22 @@ class QgsFeatureRendererV2
|
|||||||
//! render editing vertex marker for a polygon
|
//! render editing vertex marker for a polygon
|
||||||
void renderVertexMarkerPolygon( QPolygonF& pts, QList<QPolygonF>* rings, QgsRenderContext& context );
|
void renderVertexMarkerPolygon( QPolygonF& pts, QList<QPolygonF>* rings, QgsRenderContext& context );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a point in screen coordinates from a wkb string in map
|
||||||
|
* coordinates
|
||||||
|
*/
|
||||||
static QgsConstWkbPtr _getPoint( QPointF& pt, QgsRenderContext& context, QgsConstWkbPtr& wkb );
|
static QgsConstWkbPtr _getPoint( QPointF& pt, QgsRenderContext& context, QgsConstWkbPtr& wkb );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a line string in screen coordinates from a wkb string in map
|
||||||
|
* coordinates
|
||||||
|
*/
|
||||||
static QgsConstWkbPtr _getLineString( QPolygonF& pts, QgsRenderContext& context, QgsConstWkbPtr& wkb, bool clipToExtent = true );
|
static QgsConstWkbPtr _getLineString( QPolygonF& pts, QgsRenderContext& context, QgsConstWkbPtr& wkb, bool clipToExtent = true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a polygon in screen coordinates from a wkb string in map
|
||||||
|
* coordinates
|
||||||
|
*/
|
||||||
static QgsConstWkbPtr _getPolygon( QPolygonF& pts, QList<QPolygonF>& holes, QgsRenderContext& context, QgsConstWkbPtr& wkb, bool clipToExtent = true );
|
static QgsConstWkbPtr _getPolygon( QPolygonF& pts, QList<QPolygonF>& holes, QgsRenderContext& context, QgsConstWkbPtr& wkb, bool clipToExtent = true );
|
||||||
|
|
||||||
void setScaleMethodToSymbol( QgsSymbolV2* symbol, int scaleMethod );
|
void setScaleMethodToSymbol( QgsSymbolV2* symbol, int scaleMethod );
|
||||||
|
@ -96,8 +96,10 @@ class CORE_EXPORT QgsConstWkbPtr
|
|||||||
mutable bool mEndianSwap;
|
mutable bool mEndianSwap;
|
||||||
mutable QgsWKBTypes::Type mWkbType;
|
mutable QgsWKBTypes::Type mWkbType;
|
||||||
|
|
||||||
|
//! Verify bounds
|
||||||
void verifyBound( int size ) const;
|
void verifyBound( int size ) const;
|
||||||
|
|
||||||
|
//! Read a value
|
||||||
template<typename T> void read( T& v ) const
|
template<typename T> void read( T& v ) const
|
||||||
{
|
{
|
||||||
verifyBound( sizeof v );
|
verifyBound( sizeof v );
|
||||||
@ -117,7 +119,9 @@ class CORE_EXPORT QgsConstWkbPtr
|
|||||||
inline const QgsConstWkbPtr &operator>>( unsigned int &v ) const { read( v ); return *this; }
|
inline const QgsConstWkbPtr &operator>>( unsigned int &v ) const { read( v ); return *this; }
|
||||||
inline const QgsConstWkbPtr &operator>>( char &v ) const { read( v ); return *this; }
|
inline const QgsConstWkbPtr &operator>>( char &v ) const { read( v ); return *this; }
|
||||||
|
|
||||||
|
//! Read a point
|
||||||
virtual const QgsConstWkbPtr &operator>>( QPointF &point ) const;
|
virtual const QgsConstWkbPtr &operator>>( QPointF &point ) const;
|
||||||
|
//! Read a point array
|
||||||
virtual const QgsConstWkbPtr &operator>>( QPolygonF &points ) const;
|
virtual const QgsConstWkbPtr &operator>>( QPolygonF &points ) const;
|
||||||
|
|
||||||
inline void operator+=( int n ) { verifyBound( n ); mP += n; }
|
inline void operator+=( int n ) { verifyBound( n ); mP += n; }
|
||||||
|
@ -30,20 +30,31 @@ class CORE_EXPORT QgsConstWkbSimplifierPtr : public QgsConstWkbPtr
|
|||||||
const QgsVectorSimplifyMethod& mSimplifyMethod;
|
const QgsVectorSimplifyMethod& mSimplifyMethod;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
//! Constructor
|
||||||
QgsConstWkbSimplifierPtr( const unsigned char *p, int size, const QgsVectorSimplifyMethod &simplifyMethod );
|
QgsConstWkbSimplifierPtr( const unsigned char *p, int size, const QgsVectorSimplifyMethod &simplifyMethod );
|
||||||
|
|
||||||
|
//! Read a double
|
||||||
inline const QgsConstWkbPtr &operator>>( double &v ) const { return QgsConstWkbPtr::operator>>( v ); }
|
inline const QgsConstWkbPtr &operator>>( double &v ) const { return QgsConstWkbPtr::operator>>( v ); }
|
||||||
|
//! Read a float
|
||||||
inline const QgsConstWkbPtr &operator>>( float &r ) const { return QgsConstWkbPtr::operator>>( r ); }
|
inline const QgsConstWkbPtr &operator>>( float &r ) const { return QgsConstWkbPtr::operator>>( r ); }
|
||||||
|
//! Read a int
|
||||||
inline const QgsConstWkbPtr &operator>>( int &v ) const { return QgsConstWkbPtr::operator>>( v ); }
|
inline const QgsConstWkbPtr &operator>>( int &v ) const { return QgsConstWkbPtr::operator>>( v ); }
|
||||||
|
//! Read a uint
|
||||||
inline const QgsConstWkbPtr &operator>>( unsigned int &v ) const { return QgsConstWkbPtr::operator>>( v ); }
|
inline const QgsConstWkbPtr &operator>>( unsigned int &v ) const { return QgsConstWkbPtr::operator>>( v ); }
|
||||||
|
//! Read a char
|
||||||
inline const QgsConstWkbPtr &operator>>( char &v ) const { return QgsConstWkbPtr::operator>>( v ); }
|
inline const QgsConstWkbPtr &operator>>( char &v ) const { return QgsConstWkbPtr::operator>>( v ); }
|
||||||
|
|
||||||
|
//! Read a point
|
||||||
virtual const QgsConstWkbPtr &operator>>( QPointF &point ) const override;
|
virtual const QgsConstWkbPtr &operator>>( QPointF &point ) const override;
|
||||||
|
//! Read a point array
|
||||||
virtual const QgsConstWkbPtr &operator>>( QPolygonF &points ) const override;
|
virtual const QgsConstWkbPtr &operator>>( QPolygonF &points ) const override;
|
||||||
|
|
||||||
|
//! Move position forward
|
||||||
inline void operator+=( int n ) { QgsConstWkbPtr::operator+=( n ); }
|
inline void operator+=( int n ) { QgsConstWkbPtr::operator+=( n ); }
|
||||||
|
//! Move position backward
|
||||||
inline void operator-=( int n ) { QgsConstWkbPtr::operator-=( n ); }
|
inline void operator-=( int n ) { QgsConstWkbPtr::operator-=( n ); }
|
||||||
|
|
||||||
|
//! unsigned char * operator
|
||||||
inline operator const unsigned char *() const { return mP; }
|
inline operator const unsigned char *() const { return mP; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
QgsMapToPixelSimplifier::QgsMapToPixelSimplifier( int simplifyFlags, double tolerance, SimplifyAlgorithm simplifyAlgorithm )
|
QgsMapToPixelSimplifier::QgsMapToPixelSimplifier( int simplifyFlags, double tolerance, SimplifyAlgorithm simplifyAlgorithm )
|
||||||
: mSimplifyFlags( simplifyFlags )
|
: mSimplifyFlags( simplifyFlags )
|
||||||
, mTolerance( tolerance )
|
|
||||||
, mSimplifyAlgorithm( simplifyAlgorithm )
|
, mSimplifyAlgorithm( simplifyAlgorithm )
|
||||||
|
, mTolerance( tolerance )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ class CORE_EXPORT QgsMapToPixelSimplifier : public QgsAbstractGeometrySimplifier
|
|||||||
Visvalingam = 2, //!< The simplification gives each point in a line an importance weighting, so that least important points are removed first
|
Visvalingam = 2, //!< The simplification gives each point in a line an importance weighting, so that least important points are removed first
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
QgsMapToPixelSimplifier( int simplifyFlags, double tolerance, SimplifyAlgorithm simplifyAlgorithm = Distance );
|
QgsMapToPixelSimplifier( int simplifyFlags, double tolerance, SimplifyAlgorithm simplifyAlgorithm = Distance );
|
||||||
virtual ~QgsMapToPixelSimplifier();
|
virtual ~QgsMapToPixelSimplifier();
|
||||||
|
|
||||||
@ -72,10 +73,14 @@ class CORE_EXPORT QgsMapToPixelSimplifier : public QgsAbstractGeometrySimplifier
|
|||||||
static bool equalSnapToGrid( double x1, double y1, double x2, double y2, double gridOriginX, double gridOriginY, float gridInverseSizeXY );
|
static bool equalSnapToGrid( double x1, double y1, double x2, double y2, double gridOriginX, double gridOriginY, float gridInverseSizeXY );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
//! Gets the simplification hints of the vector layer managed
|
||||||
int simplifyFlags() const { return mSimplifyFlags; }
|
int simplifyFlags() const { return mSimplifyFlags; }
|
||||||
|
//! Sets the simplification hints of the vector layer managed
|
||||||
void setSimplifyFlags( int simplifyFlags ) { mSimplifyFlags = simplifyFlags; }
|
void setSimplifyFlags( int simplifyFlags ) { mSimplifyFlags = simplifyFlags; }
|
||||||
|
|
||||||
|
//! Gets the local simplification algorithm of the vector layer managed
|
||||||
SimplifyAlgorithm simplifyAlgorithm() const { return mSimplifyAlgorithm; }
|
SimplifyAlgorithm simplifyAlgorithm() const { return mSimplifyAlgorithm; }
|
||||||
|
//! Sets the local simplification algorithm of the vector layer managed
|
||||||
void setSimplifyAlgorithm( SimplifyAlgorithm simplifyAlgorithm ) { mSimplifyAlgorithm = simplifyAlgorithm; }
|
void setSimplifyAlgorithm( SimplifyAlgorithm simplifyAlgorithm ) { mSimplifyAlgorithm = simplifyAlgorithm; }
|
||||||
|
|
||||||
//! Returns a simplified version the specified geometry
|
//! Returns a simplified version the specified geometry
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
QgsVectorSimplifyMethod::QgsVectorSimplifyMethod()
|
QgsVectorSimplifyMethod::QgsVectorSimplifyMethod()
|
||||||
: mSimplifyHints( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD > 1 ? QgsVectorSimplifyMethod::FullSimplification : QgsVectorSimplifyMethod::GeometrySimplification )
|
: mSimplifyHints( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD > 1 ? QgsVectorSimplifyMethod::FullSimplification : QgsVectorSimplifyMethod::GeometrySimplification )
|
||||||
, mSimplifyAlgorithm( QgsVectorSimplifyMethod::Distance )
|
, mSimplifyAlgorithm( QgsVectorSimplifyMethod::Distance )
|
||||||
, mThreshold( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD )
|
|
||||||
, mTolerance( 1 )
|
, mTolerance( 1 )
|
||||||
|
, mThreshold( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD )
|
||||||
, mLocalOptimization( true )
|
, mLocalOptimization( true )
|
||||||
, mMaximumScale( 1 )
|
, mMaximumScale( 1 )
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
EFFECTIVE_AREAS* initiate_effectivearea( const POINTARRAY *inpts )
|
EFFECTIVE_AREAS* initiate_effectivearea( const POINTARRAY *inpts )
|
||||||
{
|
{
|
||||||
LWDEBUG( 2, "Entered initiate_effectivearea" );
|
//LWDEBUG( 2, "Entered initiate_effectivearea" );
|
||||||
EFFECTIVE_AREAS *ea;
|
EFFECTIVE_AREAS *ea;
|
||||||
ea = ( EFFECTIVE_AREAS* )lwalloc( sizeof( EFFECTIVE_AREAS ) );
|
ea = ( EFFECTIVE_AREAS* )lwalloc( sizeof( EFFECTIVE_AREAS ) );
|
||||||
ea->initial_arealist = ( areanode* )lwalloc( inpts->npoints * sizeof( areanode ) );
|
ea->initial_arealist = ( areanode* )lwalloc( inpts->npoints * sizeof( areanode ) );
|
||||||
@ -69,7 +69,7 @@ static double triarea2d( const double *P1, const double *P2, const double *P3 )
|
|||||||
*/
|
*/
|
||||||
static double triarea3d( const double *P1, const double *P2, const double *P3 )
|
static double triarea3d( const double *P1, const double *P2, const double *P3 )
|
||||||
{
|
{
|
||||||
LWDEBUG( 2, "Entered triarea3d" );
|
//LWDEBUG( 2, "Entered triarea3d" );
|
||||||
double ax, bx, ay, by, az, bz, cx, cy, cz, area;
|
double ax, bx, ay, by, az, bz, cx, cy, cz, area;
|
||||||
|
|
||||||
ax = P1[0] - P2[0];
|
ax = P1[0] - P2[0];
|
||||||
@ -110,7 +110,7 @@ static int cmpfunc( const void * a, const void * b )
|
|||||||
*/
|
*/
|
||||||
static void down( MINHEAP *tree, areanode *arealist, int parent )
|
static void down( MINHEAP *tree, areanode *arealist, int parent )
|
||||||
{
|
{
|
||||||
LWDEBUG( 2, "Entered down" );
|
//LWDEBUG( 2, "Entered down" );
|
||||||
areanode **treearray = tree->key_array;
|
areanode **treearray = tree->key_array;
|
||||||
int left = parent * 2 + 1;
|
int left = parent * 2 + 1;
|
||||||
int right = left + 1;
|
int right = left + 1;
|
||||||
@ -149,9 +149,11 @@ static void down( MINHEAP *tree, areanode *arealist, int parent )
|
|||||||
*/
|
*/
|
||||||
static void up( MINHEAP *tree, areanode *arealist, int c )
|
static void up( MINHEAP *tree, areanode *arealist, int c )
|
||||||
{
|
{
|
||||||
LWDEBUG( 2, "Entered up" );
|
//LWDEBUG( 2, "Entered up" );
|
||||||
areanode *tmp;
|
areanode *tmp;
|
||||||
|
|
||||||
|
Q_UNUSED( arealist );
|
||||||
|
|
||||||
areanode **treearray = tree->key_array;
|
areanode **treearray = tree->key_array;
|
||||||
int parent = ( c - 1 ) / 2;
|
int parent = ( c - 1 ) / 2;
|
||||||
|
|
||||||
@ -175,7 +177,7 @@ static void up( MINHEAP *tree, areanode *arealist, int c )
|
|||||||
*/
|
*/
|
||||||
static areanode* minheap_pop( MINHEAP *tree, areanode *arealist )
|
static areanode* minheap_pop( MINHEAP *tree, areanode *arealist )
|
||||||
{
|
{
|
||||||
LWDEBUG( 2, "Entered minheap_pop" );
|
//LWDEBUG( 2, "Entered minheap_pop" );
|
||||||
areanode *res = tree->key_array[0];
|
areanode *res = tree->key_array[0];
|
||||||
|
|
||||||
// put last value first
|
// put last value first
|
||||||
@ -206,7 +208,7 @@ static void minheap_update( MINHEAP *tree, areanode *arealist, int idx )
|
|||||||
*/
|
*/
|
||||||
static void tune_areas( EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld )
|
static void tune_areas( EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld )
|
||||||
{
|
{
|
||||||
LWDEBUG( 2, "Entered tune_areas" );
|
//LWDEBUG( 2, "Entered tune_areas" );
|
||||||
const double *P1;
|
const double *P1;
|
||||||
const double *P2;
|
const double *P2;
|
||||||
const double *P3;
|
const double *P3;
|
||||||
@ -226,7 +228,7 @@ static void tune_areas( EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, do
|
|||||||
for ( i = 0; i < npoints; i++ )
|
for ( i = 0; i < npoints; i++ )
|
||||||
{
|
{
|
||||||
tree.key_array[i] = ea->initial_arealist + i;
|
tree.key_array[i] = ea->initial_arealist + i;
|
||||||
LWDEBUGF( 2, "add nr %d, with area %lf, and %lf", i, ea->initial_arealist[i].area, tree.key_array[i]->area );
|
//LWDEBUGF( 2, "add nr %d, with area %lf, and %lf", i, ea->initial_arealist[i].area, tree.key_array[i]->area );
|
||||||
}
|
}
|
||||||
tree.usedSize = npoints;
|
tree.usedSize = npoints;
|
||||||
|
|
||||||
@ -237,7 +239,7 @@ static void tune_areas( EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, do
|
|||||||
for ( i = 0; i < npoints; i++ )
|
for ( i = 0; i < npoints; i++ )
|
||||||
{
|
{
|
||||||
(( areanode* )tree.key_array[i] )->treeindex = i;
|
(( areanode* )tree.key_array[i] )->treeindex = i;
|
||||||
LWDEBUGF( 4, "Check ordering qsort gives, area=%lf and belong to point %d", (( areanode* )tree.key_array[i] )->area, tree.key_array[i] - ea->initial_arealist );
|
//LWDEBUGF( 4, "Check ordering qsort gives, area=%lf and belong to point %d", (( areanode* )tree.key_array[i] )->area, tree.key_array[i] - ea->initial_arealist );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ok, now we have a minHeap, just need to keep it
|
// Ok, now we have a minHeap, just need to keep it
|
||||||
@ -313,7 +315,7 @@ static void tune_areas( EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, do
|
|||||||
*/
|
*/
|
||||||
void ptarray_calc_areas( EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld )
|
void ptarray_calc_areas( EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld )
|
||||||
{
|
{
|
||||||
LWDEBUG( 2, "Entered ptarray_calc_areas" );
|
//LWDEBUG( 2, "Entered ptarray_calc_areas" );
|
||||||
int i;
|
int i;
|
||||||
int npoints = ea->inpts->npoints;
|
int npoints = ea->inpts->npoints;
|
||||||
int is3d = FLAGS_GET_Z( ea->inpts->flags );
|
int is3d = FLAGS_GET_Z( ea->inpts->flags );
|
||||||
@ -343,7 +345,7 @@ void ptarray_calc_areas( EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, d
|
|||||||
else
|
else
|
||||||
area = triarea2d( P1, P2, P3 );
|
area = triarea2d( P1, P2, P3 );
|
||||||
|
|
||||||
LWDEBUGF( 4, "Write area %lf to point %d on address %p", area, i, &( ea->initial_arealist[i].area ) );
|
//LWDEBUGF( 4, "Write area %lf to point %d on address %p", area, i, &( ea->initial_arealist[i].area ) );
|
||||||
ea->initial_arealist[i].area = area;
|
ea->initial_arealist[i].area = area;
|
||||||
P1 = P2;
|
P1 = P2;
|
||||||
P2 = P3;
|
P2 = P3;
|
||||||
|
@ -425,8 +425,22 @@ class CORE_EXPORT QgsFeatureRendererV2
|
|||||||
//! render editing vertex marker for a polygon
|
//! render editing vertex marker for a polygon
|
||||||
void renderVertexMarkerPolygon( QPolygonF& pts, QList<QPolygonF>* rings, QgsRenderContext& context );
|
void renderVertexMarkerPolygon( QPolygonF& pts, QList<QPolygonF>* rings, QgsRenderContext& context );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a point in screen coordinates from a wkb string in map
|
||||||
|
* coordinates
|
||||||
|
*/
|
||||||
static QgsConstWkbPtr _getPoint( QPointF& pt, QgsRenderContext& context, QgsConstWkbPtr& wkb );
|
static QgsConstWkbPtr _getPoint( QPointF& pt, QgsRenderContext& context, QgsConstWkbPtr& wkb );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a line string in screen coordinates from a wkb string in map
|
||||||
|
* coordinates
|
||||||
|
*/
|
||||||
static QgsConstWkbPtr _getLineString( QPolygonF& pts, QgsRenderContext& context, QgsConstWkbPtr& wkb, bool clipToExtent = true );
|
static QgsConstWkbPtr _getLineString( QPolygonF& pts, QgsRenderContext& context, QgsConstWkbPtr& wkb, bool clipToExtent = true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a polygon in screen coordinates from a wkb string in map
|
||||||
|
* coordinates
|
||||||
|
*/
|
||||||
static QgsConstWkbPtr _getPolygon( QPolygonF& pts, QList<QPolygonF>& holes, QgsRenderContext& context, QgsConstWkbPtr& wkb, bool clipToExtent = true );
|
static QgsConstWkbPtr _getPolygon( QPolygonF& pts, QList<QPolygonF>& holes, QgsRenderContext& context, QgsConstWkbPtr& wkb, bool clipToExtent = true );
|
||||||
|
|
||||||
void setScaleMethodToSymbol( QgsSymbolV2* symbol, int scaleMethod );
|
void setScaleMethodToSymbol( QgsSymbolV2* symbol, int scaleMethod );
|
||||||
|
@ -156,8 +156,6 @@ class TestPyQgsShapefileProvider(unittest.TestCase, ProviderTestCase):
|
|||||||
self.assertTrue(caps & QgsVectorDataProvider.CreateSpatialIndex)
|
self.assertTrue(caps & QgsVectorDataProvider.CreateSpatialIndex)
|
||||||
self.assertTrue(caps & QgsVectorDataProvider.SelectAtId)
|
self.assertTrue(caps & QgsVectorDataProvider.SelectAtId)
|
||||||
self.assertTrue(caps & QgsVectorDataProvider.ChangeGeometries)
|
self.assertTrue(caps & QgsVectorDataProvider.ChangeGeometries)
|
||||||
self.assertTrue(caps & QgsVectorDataProvider.SimplifyGeometries)
|
|
||||||
self.assertTrue(caps & QgsVectorDataProvider.SimplifyGeometriesWithTopologicalValidation)
|
|
||||||
#self.assertTrue(caps & QgsVectorDataProvider.ChangeFeatures)
|
#self.assertTrue(caps & QgsVectorDataProvider.ChangeFeatures)
|
||||||
|
|
||||||
# We should be really opened in read-only mode even if write capabilities are declared
|
# We should be really opened in read-only mode even if write capabilities are declared
|
||||||
|
@ -162,7 +162,7 @@ class TestQgsGeometry(unittest.TestCase):
|
|||||||
# test geometry centroid
|
# test geometry centroid
|
||||||
exp = row['centroid']
|
exp = row['centroid']
|
||||||
result = geom.centroid().exportToWkt()
|
result = geom.centroid().exportToWkt()
|
||||||
assert compareWkt(result, exp), "Centroid {}: mismatch Expected:\n{}\nGot:\n{}\n".format(i + 1, exp, result)
|
assert compareWkt(result, exp, 0.00001), "Centroid {}: mismatch Expected:\n{}\nGot:\n{}\n".format(i + 1, exp, result)
|
||||||
|
|
||||||
# test bounding box limits
|
# test bounding box limits
|
||||||
bbox = geom.geometry().boundingBox()
|
bbox = geom.geometry().boundingBox()
|
||||||
|
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 626 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |