Skip to content

Commit

Permalink
geometry fixes:
Browse files Browse the repository at this point in the history
* 3d geometries from oracle
* windows build
  • Loading branch information
jef-n committed May 25, 2015
1 parent 2e86d54 commit 5b3a96d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsabstractgeometryv2.cpp
Expand Up @@ -55,7 +55,7 @@ QgsRectangle QgsAbstractGeometryV2::boundingBox() const

bool QgsAbstractGeometryV2::is3D() const
{
return(( mWkbType >= 1001 && mWkbType <= 1012 ) || ( mWkbType > 3000 ) );
return(( mWkbType >= 1001 && mWkbType <= 1012 ) || ( mWkbType > 3000 || mWkbType & 0x80000000 ) );
}

bool QgsAbstractGeometryV2::isMeasure() const
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgscircularstringv2.cpp
Expand Up @@ -753,7 +753,7 @@ double QgsCircularStringV2::closestSegment( const QgsPointV2& pt, QgsPointV2& se
double minDist = std::numeric_limits<double>::max();
QgsPointV2 minDistSegmentPoint;
QgsVertexId minDistVertexAfter;
bool minDistLeftOf;
bool minDistLeftOf = false;

double currentDist = 0.0;

Expand Down
3 changes: 2 additions & 1 deletion src/core/geometry/qgsgeometryengine.h
Expand Up @@ -17,10 +17,11 @@ email : marco.hugentobler at sourcepole dot com
#define QGSVECTORTOPOLOGY_H

#include "qgspointv2.h"
#include "qgslinestringv2.h"

#include <QList>

class QgsAbstractGeometryV2;
class QgsLineStringV2;

class CORE_EXPORT QgsGeometryEngine
{
Expand Down
6 changes: 4 additions & 2 deletions src/core/geometry/qgsgeometryimport.cpp
Expand Up @@ -43,7 +43,8 @@ QgsAbstractGeometryV2* QgsGeometryImport::geomFromWkb( const unsigned char* wkb

geom = geomFromWkbType( QgsWKBTypes::Type( type ) );

/*type = QgsWKBTypes::flatType( QgsWKBTypes::Type( type ) );
#if 0
type = QgsWKBTypes::flatType( QgsWKBTypes::Type( type ) );
switch ( type )
{
case QgsWKBTypes::Point:
Expand Down Expand Up @@ -75,7 +76,8 @@ QgsAbstractGeometryV2* QgsGeometryImport::geomFromWkb( const unsigned char* wkb
break;
default:
geom = 0;
}*/
}
#endif

if ( geom )
{
Expand Down
7 changes: 2 additions & 5 deletions src/core/geometry/qgsgeometryutils.h
Expand Up @@ -22,9 +22,6 @@ email : marco.hugentobler at sourcepole dot com
class CORE_EXPORT QgsGeometryUtils
{
public:



static QgsPointV2 closestVertex( const QgsAbstractGeometryV2& geom, const QgsPointV2& pt, QgsVertexId& id );
static void adjacentVertices( const QgsAbstractGeometryV2& geom, const QgsVertexId& atVertex, QgsVertexId& beforeVertex, QgsVertexId& afterVertex );

Expand Down Expand Up @@ -88,9 +85,9 @@ class CORE_EXPORT QgsGeometryUtils
template<class T> static double closestSegmentFromComponents( T& container, componentType ctype, const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon )
{
double minDist = std::numeric_limits<double>::max();
double minDistSegmentX, minDistSegmentY;
double minDistSegmentX = 0.0, minDistSegmentY = 0.0;
QgsVertexId minDistVertexAfter;
bool minDistLeftOf;
bool minDistLeftOf = false;
double sqrDist = 0.0;
int vertexOffset = 0;
int ringOffset = 0;
Expand Down
6 changes: 3 additions & 3 deletions src/gui/attributetable/qgsdualview.cpp
Expand Up @@ -120,7 +120,7 @@ void QgsDualView::columnBoxInit()
// ... If there are primary key(s) defined
QStringList pkFields;

Q_FOREACH ( int attr, pkAttrs )
Q_FOREACH( int attr, pkAttrs )
{
pkFields.append( "COALESCE(\"" + fields[attr].name() + "\", '<NULL>')" );
}
Expand Down Expand Up @@ -151,7 +151,7 @@ void QgsDualView::columnBoxInit()
mFeatureListPreviewButton->addAction( mActionExpressionPreview );
mFeatureListPreviewButton->addAction( mActionPreviewColumnsMenu );

Q_FOREACH ( const QgsField& field, fields )
Q_FOREACH( const QgsField& field, fields )
{
int fieldIndex = mLayerCache->layer()->fieldNameIndex( field.name() );
if ( fieldIndex == -1 )
Expand Down Expand Up @@ -415,7 +415,7 @@ void QgsDualView::progress( int i, bool& cancel )

QCoreApplication::processEvents();

cancel = mProgressDlg->wasCanceled();
cancel = mProgressDlg && mProgressDlg->wasCanceled();
}

void QgsDualView::finished()
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresfeatureiterator.cpp
Expand Up @@ -301,7 +301,7 @@ QString QgsPostgresFeatureIterator::whereClauseRect()
.arg( mConn->majorVersion() < 2 ? "intersects" : "st_intersects" )
.arg( mConn->majorVersion() < 2 ? "curvetoline" : "st_curvetoline" )
.arg( QgsPostgresConn::quotedIdentifier( mSource->mGeometryColumn ) )
.arg( mSource->mSpatialColType == sctGeography ? "::geometry" : "" )
.arg( castToPatch ? "::geometry" : "" )
.arg( qBox );
}

Expand Down

1 comment on commit 5b3a96d

@blazek
Copy link
Member

@blazek blazek commented on 5b3a96d May 25, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have got: qgspostgresfeatureiterator.cpp:304:26: error: ‘castToPatch’ was not declared in this scope

Please sign in to comment.