Skip to content
Permalink
Browse files

Merge branch 'master' of github.com:qgis/Quantum-GIS

  • Loading branch information
blazek committed May 21, 2012
2 parents 5a4412a + 1780344 commit 5ff3354f6e9db7d393fdeb751c14170b7a586e92
Showing with 16 additions and 11 deletions.
  1. +15 −10 python/plugins/fTools/tools/doGeoprocessing.py
  2. +1 −1 src/providers/mssql/qgsmssqlprovider.cpp
@@ -944,7 +944,7 @@ def intersect( self ):
if geom.intersects( tmpGeom ):
atMapB = inFeatB.attributeMap()
int_geom = QgsGeometry( geom.intersection( tmpGeom ) )
if int_geom.wkbType() == 7:
if int_geom.wkbType() == 0:
int_com = geom.combine( tmpGeom )
int_sym = geom.symDifference( tmpGeom )
int_geom = QgsGeometry( int_com.difference( int_sym ) )
@@ -973,7 +973,7 @@ def intersect( self ):
if geom.intersects( tmpGeom ):
atMapB = inFeatB.attributeMap()
int_geom = QgsGeometry( geom.intersection( tmpGeom ) )
if int_geom.wkbType() == 7:
if int_geom.wkbType() == 0:
int_com = geom.combine( tmpGeom )
int_sym = geom.symDifference( tmpGeom )
int_geom = QgsGeometry( int_com.difference( int_sym ) )
@@ -1010,7 +1010,7 @@ def intersect( self ):
if geom.intersects( tmpGeom ):
atMapB = inFeatB.attributeMap()
int_geom = QgsGeometry( geom.intersection( tmpGeom ) )
if int_geom.wkbType() == 7:
if int_geom.wkbType() == 0:
int_com = geom.combine( tmpGeom )
int_sym = geom.symDifference( tmpGeom )
int_geom = QgsGeometry( int_com.difference( int_sym ) )
@@ -1039,7 +1039,7 @@ def intersect( self ):
if geom.intersects( tmpGeom ):
atMapB = inFeatB.attributeMap()
int_geom = QgsGeometry( geom.intersection( tmpGeom ) )
if int_geom.wkbType() == 7:
if int_geom.wkbType() == 0:
int_com = geom.combine( tmpGeom )
int_sym = geom.symDifference( tmpGeom )
int_geom = QgsGeometry( int_com.difference( int_sym ) )
@@ -1143,11 +1143,16 @@ def union( self ):
diff_geom = QgsGeometry(diff_geom)

if int_geom.wkbType() == 0:
# intersection produced different geomety types
# intersection produced different geometry types
temp_list = int_geom.asGeometryCollection()
for i in temp_list:
if i.type() == geom.type():
int_geom = QgsGeometry( i )
try:
outFeat.setGeometry( j )
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
writer.addFeature( outFeat )
except Exception, err:
FEATURE_EXCEPT = False
try:
outFeat.setGeometry( int_geom )
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
@@ -1390,7 +1395,7 @@ def clip( self ):
try:
cur_geom = QgsGeometry( outFeat.geometry() )
new_geom = QgsGeometry( geom.intersection( cur_geom ) )
if new_geom.wkbType() == 7:
if new_geom.wkbType() == 0:
int_com = QgsGeometry( geom.combine( cur_geom ) )
int_sym = QgsGeometry( geom.symDifference( cur_geom ) )
new_geom = QgsGeometry( int_com.difference( int_sym ) )
@@ -1434,7 +1439,7 @@ def clip( self ):
try:
cur_geom = QgsGeometry( outFeat.geometry() )
new_geom = QgsGeometry( geom.intersection( cur_geom ) )
if new_geom.wkbType() == 7:
if new_geom.wkbType() == 0:
int_com = QgsGeometry( geom.combine( cur_geom ) )
int_sym = QgsGeometry( geom.symDifference( cur_geom ) )
new_geom = QgsGeometry( int_com.difference( int_sym ) )
@@ -1485,7 +1490,7 @@ def clip( self ):
try:
cur_geom = QgsGeometry( outFeat.geometry() )
new_geom = QgsGeometry( geom.intersection( cur_geom ) )
if new_geom.wkbType() == 7:
if new_geom.wkbType() == 0:
int_com = QgsGeometry( geom.combine( cur_geom ) )
int_sym = QgsGeometry( geom.symDifference( cur_geom ) )
new_geom = QgsGeometry( int_com.difference( int_sym ) )
@@ -1530,7 +1535,7 @@ def clip( self ):
try:
cur_geom = QgsGeometry( outFeat.geometry() )
new_geom = QgsGeometry( geom.intersection( cur_geom ) )
if new_geom.wkbType() == 7:
if new_geom.wkbType() == 0:
int_com = QgsGeometry( geom.combine( cur_geom ) )
int_sym = QgsGeometry( geom.symDifference( cur_geom ) )
new_geom = QgsGeometry( int_com.difference( int_sym ) )
@@ -1315,7 +1315,7 @@ QString QgsMssqlProvider::name() const
return TEXT_PROVIDER_KEY;
} // ::name()

bool QgsMssqlProvider::setSubsetString( QString theSQL, bool updateFeatureCount )
bool QgsMssqlProvider::setSubsetString( QString theSQL, bool )
{
QString prevWhere = mSqlWhereClause;

0 comments on commit 5ff3354

Please sign in to comment.
You can’t perform that action at this time.