Skip to content
Permalink
Browse files
geometry fixes:
* 3d geometries from oracle
* windows build
  • Loading branch information
jef-n committed May 25, 2015
1 parent 2e86d54 commit 5b3a96d9d6d44c91408767d1e6e7168c879f110b
@@ -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
@@ -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;

@@ -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
{
@@ -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:
@@ -75,7 +76,8 @@ QgsAbstractGeometryV2* QgsGeometryImport::geomFromWkb( const unsigned char* wkb
break;
default:
geom = 0;
}*/
}
#endif

if ( geom )
{
@@ -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 );

@@ -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;
@@ -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>')" );
}
@@ -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 )
@@ -415,7 +415,7 @@ void QgsDualView::progress( int i, bool& cancel )

QCoreApplication::processEvents();

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

void QgsDualView::finished()
@@ -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 );
}

1 comment on commit 5b3a96d

@blazek

This comment has been minimized.

Copy link
Member

@blazek blazek commented on 5b3a96d May 25, 2015

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

Please sign in to comment.