Skip to content
Permalink
Browse files
Merge branch 'master' of git://github.com/qgis/Quantum-GIS
  • Loading branch information
Jean-Roc committed May 17, 2012
2 parents 07e4fb1 + bfd846a commit 45510c053f8f096422da21e803948108858d76af
@@ -10,7 +10,7 @@ Build-Depends:
grass-dev,
libexpat1-dev,
libfcgi-dev,
libgdal1-dev,
libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
libgeos-dev (>= 3.0.0),
libgsl0-dev,
libpq-dev,
@@ -80,7 +80,7 @@ Section: libdevel
Depends:
grass-dev,
libexpat1-dev,
libgdal1-dev,
libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
libgeos-dev (>= 3.0.0),
libgsl0-dev,
libpq-dev,
@@ -10,7 +10,7 @@ Build-Depends:
grass-dev,
libexpat1-dev,
libfcgi-dev,
libgdal1-dev,
libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
libgeos-dev (>= 3.0.0),
libgsl0-dev,
libpq-dev,
@@ -81,7 +81,7 @@ Section: libdevel
Depends:
grass-dev,
libexpat1-dev,
libgdal1-dev,
libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
libgeos-dev (>= 3.0.0),
libgsl0-dev,
libpq-dev,
@@ -10,7 +10,7 @@ Build-Depends:
grass-dev,
libexpat1-dev,
libfcgi-dev,
libgdal1-dev,
libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
libgeos-dev (>= 3.0.0),
libgsl0-dev,
libpq-dev,
@@ -84,7 +84,7 @@ Section: libdevel
Depends:
grass-dev,
libexpat1-dev,
libgdal1-dev,
libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
libgeos-dev (>= 3.0.0),
libgsl0-dev,
libpq-dev,
@@ -232,6 +232,14 @@ def geometry( self, myLayer, myParam, myField ):
self.shapefileName = None
self.encoding = None

res = QMessageBox.warning( self, self.tr( "Geometry"),
self.tr( "Currently QGIS doesn't allow simultaneous access from \
different threads to the same datasource. Make sure your layer's \
attribute tables are closed. Continue?"),
QMessageBox.Yes | QMessageBox.No )
if res == QMessageBox.No:
return

self.buttonOk.setEnabled( False )
self.testThread = geometryThread( self.iface.mainWindow(), self, self.myFunction,
vlayer, myParam, myField, self.shapefileName, self.encoding,
@@ -104,6 +104,14 @@ def accept( self ):
self.workThread = GeomThread( self.myFunction, vLayer, self.chkUseSelection.isChecked(),
self.spnTolerance.value(), True, outFileName, self.encoding )
else:
res = QMessageBox.warning( self, self.tr( "Warning"),
self.tr( "Currently QGIS doesn't allow simultaneous access from \
different threads to the same datasource. Make sure your layer's \
attribute tables are closed. Continue?"),
QMessageBox.Yes | QMessageBox.No )
if res == QMessageBox.No:
return

self.workThread = GeomThread( self.myFunction, vLayer, self.chkUseSelection.isChecked(),
self.spnTolerance.value(), False, None, None )

@@ -2936,51 +2936,57 @@ QStringList QgsWmsProvider::identifyAs( const QgsPoint& point, QString format )
++layers, ++styles )
{
// Is sublayer visible?
if ( activeSubLayerVisibility.find( *layers ).value() )
{
// Is sublayer queryable?
if ( mQueryableForLayer.find( *layers ).value() )
{
QgsDebugMsg( "Layer '" + *layers + "' is queryable." );

QUrl requestUrl( mGetFeatureInfoUrlBase );
setQueryItem( requestUrl, "SERVICE", "WMS" );
setQueryItem( requestUrl, "VERSION", mCapabilities.version );
setQueryItem( requestUrl, "REQUEST", "GetFeatureInfo" );
setQueryItem( requestUrl, "BBOX", bbox );
setQueryItem( requestUrl, crsKey, imageCrs );
setQueryItem( requestUrl, "WIDTH", QString::number( cachedViewWidth ) );
setQueryItem( requestUrl, "HEIGHT", QString::number( cachedViewHeight ) );
setQueryItem( requestUrl, "LAYERS", *layers );
setQueryItem( requestUrl, "STYLES", *styles );
setQueryItem( requestUrl, "FORMAT", imageMimeType );
setQueryItem( requestUrl, "QUERY_LAYERS", *layers );
setQueryItem( requestUrl, "INFO_FORMAT", format );
setQueryItem( requestUrl, "X", QString::number( point.x() ) );
setQueryItem( requestUrl, "Y", QString::number( point.y() ) );

if ( mFeatureCount > 0 )
{
setQueryItem( requestUrl, "FEATURE_COUNT", QString::number( mFeatureCount ) );
}
if ( !activeSubLayerVisibility.find( *layers ).value() )
continue;

// X,Y in WMS 1.1.1; I,J in WMS 1.3.0
// requestUrl += QString( "&I=%1&J=%2" ).arg( point.x() ).arg( point.y() );
// Is sublayer queryable?
if ( !mQueryableForLayer.find( *layers ).value() )
continue;

QgsDebugMsg( QString( "getfeatureinfo: %1" ).arg( requestUrl.toString() ) );
QNetworkRequest request( requestUrl );
setAuthorization( request );
mIdentifyReply = QgsNetworkAccessManager::instance()->get( request );
connect( mIdentifyReply, SIGNAL( finished() ), this, SLOT( identifyReplyFinished() ) );
QgsDebugMsg( "Layer '" + *layers + "' is queryable." );

while ( mIdentifyReply )
{
QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents );
}
QUrl requestUrl( mGetFeatureInfoUrlBase );
setQueryItem( requestUrl, "SERVICE", "WMS" );
setQueryItem( requestUrl, "VERSION", mCapabilities.version );
setQueryItem( requestUrl, "REQUEST", "GetFeatureInfo" );
setQueryItem( requestUrl, "BBOX", bbox );
setQueryItem( requestUrl, crsKey, imageCrs );
setQueryItem( requestUrl, "WIDTH", QString::number( cachedViewWidth ) );
setQueryItem( requestUrl, "HEIGHT", QString::number( cachedViewHeight ) );
setQueryItem( requestUrl, "LAYERS", *layers );
setQueryItem( requestUrl, "STYLES", *styles );
setQueryItem( requestUrl, "FORMAT", imageMimeType );
setQueryItem( requestUrl, "QUERY_LAYERS", *layers );
setQueryItem( requestUrl, "INFO_FORMAT", format );

results << mIdentifyResult;
}
if ( mCapabilities.version == "1.3.0" || mCapabilities.version == "1.3" )
{
setQueryItem( requestUrl, "I", QString::number( point.x() ) );
setQueryItem( requestUrl, "J", QString::number( point.y() ) );
}
else
{
setQueryItem( requestUrl, "X", QString::number( point.x() ) );
setQueryItem( requestUrl, "Y", QString::number( point.y() ) );
}

if ( mFeatureCount > 0 )
{
setQueryItem( requestUrl, "FEATURE_COUNT", QString::number( mFeatureCount ) );
}

QgsDebugMsg( QString( "getfeatureinfo: %1" ).arg( requestUrl.toString() ) );
QNetworkRequest request( requestUrl );
setAuthorization( request );
mIdentifyReply = QgsNetworkAccessManager::instance()->get( request );
connect( mIdentifyReply, SIGNAL( finished() ), this, SLOT( identifyReplyFinished() ) );

while ( mIdentifyReply )
{
QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents );
}

results << mIdentifyResult;
}

QgsDebugMsg( "Exiting with: " + results.join( "\n------\n" ) );

0 comments on commit 45510c0

Please sign in to comment.