mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
spatial query plugin: port to new QgsGeometry operators, gui cleanup
git-svn-id: http://svn.osgeo.org/qgis/trunk@13367 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
e946ed199e
commit
bf0c30bcbf
@ -41,13 +41,11 @@ INCLUDE_DIRECTORIES(
|
||||
../../core/symbology
|
||||
../../gui
|
||||
..
|
||||
${GEOS_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(spatialqueryplugin
|
||||
qgis_core
|
||||
qgis_gui
|
||||
${GEOS_LIBRARY}
|
||||
)
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@ void QgsSpatialQuery::runQuery( QSet<int> & qsetIndexResult, int relation, QgsVe
|
||||
setQuery( lyrTarget, lyrReference );
|
||||
|
||||
// Create Spatial index for Reference - Set mIndexReference
|
||||
mPb->setFormat( "Processing 1/2 - %p%" );
|
||||
mPb->setFormat( QObject::tr( "Processing 1/2 - %p%" ) );
|
||||
int totalStep = mUseReferenceSelection
|
||||
? mLayerReference->selectedFeatureCount()
|
||||
: ( int )( mLayerReference->featureCount() );
|
||||
@ -63,7 +63,7 @@ void QgsSpatialQuery::runQuery( QSet<int> & qsetIndexResult, int relation, QgsVe
|
||||
setSpatialIndexReference(); // Need set mLayerReference before
|
||||
|
||||
// Make Query
|
||||
mPb->setFormat( "Processing 2/2 - %p%" );
|
||||
mPb->setFormat( QObject::tr( "Processing 2/2 - %p%" ) );
|
||||
totalStep = mUseTargetSelection
|
||||
? mLayerTarget->selectedFeatureCount()
|
||||
: ( int )( mLayerTarget->featureCount() );
|
||||
@ -181,9 +181,7 @@ bool QgsSpatialQuery::hasValidGeometry( QgsFeature &feature )
|
||||
return false;
|
||||
}
|
||||
|
||||
GEOSGeometry *geomGeos = geom->asGeos();
|
||||
|
||||
if ( GEOSisEmpty( geomGeos ) || 1 != GEOSisValid( geomGeos ) )
|
||||
if ( geom->isGeosEmpty() || !geom->isGeosValid() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -218,33 +216,32 @@ void QgsSpatialQuery::setSpatialIndexReference()
|
||||
|
||||
void QgsSpatialQuery::execQuery( QSet<int> & qsetIndexResult, int relation )
|
||||
{
|
||||
// Set GEOS function
|
||||
char( *operation )( const GEOSGeometry *, const GEOSGeometry* );
|
||||
bool ( QgsGeometry::* operation )( QgsGeometry * );
|
||||
switch ( relation )
|
||||
{
|
||||
case Disjoint:
|
||||
operation = &GEOSDisjoint;
|
||||
operation = &QgsGeometry::disjoint;
|
||||
break;
|
||||
case Equals:
|
||||
operation = &GEOSEquals;
|
||||
operation = &QgsGeometry::equals;
|
||||
break;
|
||||
case Touches:
|
||||
operation = &GEOSTouches;
|
||||
operation = &QgsGeometry::touches;
|
||||
break;
|
||||
case Overlaps:
|
||||
operation = &GEOSOverlaps;
|
||||
operation = &QgsGeometry::overlaps;
|
||||
break;
|
||||
case Within:
|
||||
operation = &GEOSWithin;
|
||||
operation = &QgsGeometry::within;
|
||||
break;
|
||||
case Contains:
|
||||
operation = &GEOSContains;
|
||||
operation = &QgsGeometry::contains;
|
||||
break;
|
||||
case Crosses:
|
||||
operation = &GEOSCrosses;
|
||||
operation = &QgsGeometry::crosses;
|
||||
break;
|
||||
case Intersects:
|
||||
operation = &GEOSIntersects;
|
||||
operation = &QgsGeometry::intersects;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -253,9 +250,7 @@ void QgsSpatialQuery::execQuery( QSet<int> & qsetIndexResult, int relation )
|
||||
coordinateTransform->setCoordinateTransform( mLayerTarget, mLayerReference );
|
||||
|
||||
// Set function for populate result
|
||||
void ( QgsSpatialQuery::* funcPopulateIndexResult )
|
||||
( QSet<int> &, int, QgsGeometry *,
|
||||
char( * )( const GEOSGeometry *, const GEOSGeometry * ) );
|
||||
void ( QgsSpatialQuery::* funcPopulateIndexResult )( QSet<int> &, int, QgsGeometry *, bool ( QgsGeometry::* )( QgsGeometry * ) );
|
||||
funcPopulateIndexResult = ( relation == Disjoint )
|
||||
? &QgsSpatialQuery::populateIndexResultDisjoint
|
||||
: &QgsSpatialQuery::populateIndexResult;
|
||||
@ -263,10 +258,8 @@ void QgsSpatialQuery::execQuery( QSet<int> & qsetIndexResult, int relation )
|
||||
QgsFeature featureTarget;
|
||||
QgsGeometry * geomTarget;
|
||||
int step = 1;
|
||||
while ( true )
|
||||
while ( mReaderFeaturesTarget->nextFeature( featureTarget ) )
|
||||
{
|
||||
if ( ! mReaderFeaturesTarget->nextFeature( featureTarget ) ) break;
|
||||
|
||||
mPb->step( step++ );
|
||||
|
||||
if ( ! hasValidGeometry( featureTarget ) )
|
||||
@ -285,7 +278,7 @@ void QgsSpatialQuery::execQuery( QSet<int> & qsetIndexResult, int relation )
|
||||
|
||||
void QgsSpatialQuery::populateIndexResult(
|
||||
QSet<int> &qsetIndexResult, int idTarget, QgsGeometry * geomTarget,
|
||||
char( *operation )( const GEOSGeometry *, const GEOSGeometry * ) )
|
||||
bool ( QgsGeometry::* op )( QgsGeometry * ) )
|
||||
{
|
||||
QList<int> listIdReference;
|
||||
listIdReference = mIndexReference.intersects( geomTarget->boundingBox() );
|
||||
@ -293,7 +286,6 @@ void QgsSpatialQuery::populateIndexResult(
|
||||
{
|
||||
return;
|
||||
}
|
||||
GEOSGeometry * geosTarget = geomTarget->asGeos();
|
||||
QgsFeature featureReference;
|
||||
QgsGeometry * geomReference;
|
||||
QList<int>::iterator iterIdReference = listIdReference.begin();
|
||||
@ -301,7 +293,7 @@ void QgsSpatialQuery::populateIndexResult(
|
||||
{
|
||||
mLayerReference->featureAtId( *iterIdReference, featureReference );
|
||||
geomReference = featureReference.geometry();
|
||||
if (( *operation )( geosTarget, geomReference->asGeos() ) == 1 )
|
||||
if (( geomTarget->*op )( geomReference ) == 1 )
|
||||
{
|
||||
qsetIndexResult.insert( idTarget );
|
||||
break;
|
||||
@ -312,7 +304,7 @@ void QgsSpatialQuery::populateIndexResult(
|
||||
|
||||
void QgsSpatialQuery::populateIndexResultDisjoint(
|
||||
QSet<int> &qsetIndexResult, int idTarget, QgsGeometry * geomTarget,
|
||||
char( *operation )( const GEOSGeometry *, const GEOSGeometry * ) )
|
||||
bool ( QgsGeometry::* op )( QgsGeometry * ) )
|
||||
{
|
||||
QList<int> listIdReference;
|
||||
listIdReference = mIndexReference.intersects( geomTarget->boundingBox() );
|
||||
@ -321,7 +313,6 @@ void QgsSpatialQuery::populateIndexResultDisjoint(
|
||||
qsetIndexResult.insert( idTarget );
|
||||
return;
|
||||
}
|
||||
GEOSGeometry * geosTarget = geomTarget->asGeos();
|
||||
QgsFeature featureReference;
|
||||
QgsGeometry * geomReference;
|
||||
QList<int>::iterator iterIdReference = listIdReference.begin();
|
||||
@ -330,7 +321,7 @@ void QgsSpatialQuery::populateIndexResultDisjoint(
|
||||
{
|
||||
mLayerReference->featureAtId( *iterIdReference, featureReference );
|
||||
geomReference = featureReference.geometry();
|
||||
if (( *operation )( geosTarget, geomReference->asGeos() ) == 0 )
|
||||
if (( geomTarget->*op )( geomTarget ) == 0 )
|
||||
{
|
||||
addIndex = false;
|
||||
break;
|
||||
|
@ -19,8 +19,6 @@
|
||||
#ifndef SPATIALQUERY_H
|
||||
#define SPATIALQUERY_H
|
||||
|
||||
#include <geos_c.h>
|
||||
|
||||
#include <qgsvectorlayer.h>
|
||||
#include <qgsspatialindex.h>
|
||||
|
||||
@ -137,7 +135,7 @@ class QgsSpatialQuery
|
||||
*/
|
||||
void populateIndexResult(
|
||||
QSet<int> & qsetIndexResult, int idTarget, QgsGeometry * geomTarget,
|
||||
char( *operation )( const GEOSGeometry *, const GEOSGeometry * ) );
|
||||
bool ( QgsGeometry::* operation )( QgsGeometry * ) );
|
||||
/**
|
||||
* \brief Populate index Result Disjoint
|
||||
* \param qsetIndexResult Reference to QSet contains the result query
|
||||
@ -147,7 +145,7 @@ class QgsSpatialQuery
|
||||
*/
|
||||
void populateIndexResultDisjoint(
|
||||
QSet<int> & qsetIndexResult, int idTarget, QgsGeometry * geomTarget,
|
||||
char( *operation )( const GEOSGeometry *, const GEOSGeometry * ) );
|
||||
bool ( QgsGeometry::* operation )( QgsGeometry * ) );
|
||||
|
||||
MngProgressBar *mPb;
|
||||
bool mUseReferenceSelection;
|
||||
|
@ -152,7 +152,7 @@ void QgsSpatialQueryDialog::evaluateCheckBox( bool isTarget )
|
||||
checkbox->setChecked( isCheckBoxValid );
|
||||
checkbox->setEnabled( isCheckBoxValid );
|
||||
QString textCheckBox = isCheckBoxValid
|
||||
? QString::number( selectedCount ) + " " + tr( "Selected geometries" )
|
||||
? tr( "%n selected geometries", "selected geometries", selectedCount )
|
||||
: tr( "Selected geometries" );
|
||||
checkbox->setText( textCheckBox );
|
||||
|
||||
@ -185,30 +185,37 @@ void QgsSpatialQueryDialog::runQuery()
|
||||
buttonBox->setEnabled( true );
|
||||
|
||||
grpResults->show();
|
||||
grpInputs->hide();
|
||||
setInputsVisible( false );
|
||||
progressBarStatus->hide();
|
||||
buttonBox->button( QDialogButtonBox::Close )->show();
|
||||
buttonBox->button( QDialogButtonBox::Cancel )->hide();
|
||||
buttonBox->button( QDialogButtonBox::Ok )->hide();
|
||||
} // void QgsSpatialQueryDialog::runQuery()
|
||||
|
||||
void QgsSpatialQueryDialog::setInputsVisible( bool show )
|
||||
{
|
||||
grpTargetGroupBox->setVisible( show );
|
||||
grpReferenceGroupBox->setVisible( show );
|
||||
grpOperationGroupBox->setVisible( show );
|
||||
}
|
||||
|
||||
void QgsSpatialQueryDialog::showLogProcessing( bool hasShow )
|
||||
{
|
||||
static int heightDialogNoStatus = 0;
|
||||
|
||||
hasShow ? textEditStatus->show() : textEditStatus->hide();
|
||||
this->adjustSize();
|
||||
adjustSize();
|
||||
|
||||
if ( ! hasShow )
|
||||
{
|
||||
if ( heightDialogNoStatus == 0 )
|
||||
{
|
||||
heightDialogNoStatus = this->geometry().height();
|
||||
heightDialogNoStatus = geometry().height();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setGeometry( this->geometry().x(), this->geometry().y(),
|
||||
this->geometry().width(), heightDialogNoStatus );
|
||||
setGeometry( geometry().x(), geometry().y(),
|
||||
geometry().width(), heightDialogNoStatus );
|
||||
}
|
||||
}
|
||||
|
||||
@ -613,18 +620,18 @@ void QgsSpatialQueryDialog::on_selectedFeatureListWidget_currentTextChanged( con
|
||||
mRubberSelectId->reset();
|
||||
selectedFeatureListWidget->setEnabled( false );
|
||||
|
||||
QCursor cursor;
|
||||
cursor.setShape( Qt::WaitCursor );
|
||||
Qt::CursorShape shapeCurrent = this->cursor().shape();
|
||||
this->setCursor( cursor );
|
||||
cursor.setShape( shapeCurrent );
|
||||
QCursor c;
|
||||
c.setShape( Qt::WaitCursor );
|
||||
Qt::CursorShape shapeCurrent = cursor().shape();
|
||||
setCursor( c );
|
||||
c.setShape( shapeCurrent );
|
||||
|
||||
bool ok;
|
||||
int Id = currentText.toInt( &ok );
|
||||
mRubberSelectId->addFeature( mLayerTarget, Id );
|
||||
|
||||
selectedFeatureListWidget->setEnabled( true );
|
||||
this->setCursor( cursor );
|
||||
setCursor( c );
|
||||
selectedFeatureListWidget->setFocus();
|
||||
mRubberSelectId->show();
|
||||
|
||||
|
@ -122,10 +122,13 @@ class QgsSpatialQueryDialog : public QDialog, private Ui::QgsSpatialQueryDialogB
|
||||
//! Rubber band for features result
|
||||
QgsRubberSelectId* mRubberSelectId;
|
||||
|
||||
// Menssage
|
||||
// Message
|
||||
QString mMsgLayersLessTwo;
|
||||
|
||||
void MsgDEBUG( QString sMSg );
|
||||
|
||||
//! show/hide target, reference and operation group box
|
||||
void setInputsVisible( bool show );
|
||||
};
|
||||
|
||||
#endif // SPATIALQUERYDIALOG_H
|
||||
|
@ -9,8 +9,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>543</width>
|
||||
<height>459</height>
|
||||
<width>532</width>
|
||||
<height>680</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@ -35,215 +35,39 @@
|
||||
<locale language="English" country="UnitedKingdom"/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="grpInputs">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>230</width>
|
||||
<height>285</height>
|
||||
</size>
|
||||
</property>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Layers</string>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::DefaultContextMenu</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Run query or close the window</string>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="targetGroupBox">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Layer where yours </span><span style=" font-size:8pt;">geometrys</span><span style=" font-size:8pt;"> will be selected by topological operation</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Target layer</string>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="usingSelectedTargetCheckBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1</x>
|
||||
<y>50</y>
|
||||
<width>201</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">When mark the operation will be only selected geometry of target</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Selected feature(s) only</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="targetLayerComboBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1</x>
|
||||
<y>18</y>
|
||||
<width>211</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>206</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select the target layer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="OperationGroupBox">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Topological operations between layers of target and reference</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Topological operation</string>
|
||||
</property>
|
||||
<widget class="QComboBox" name="operantionComboBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1</x>
|
||||
<y>18</y>
|
||||
<width>206</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>10</horstretch>
|
||||
<verstretch>116</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>206</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select the topological operation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="ReferenceGroupBox">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Layer where yours geometrys will be used how reference by topological operation</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Reference layer</string>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="usingSelectedReferenceCheckBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1</x>
|
||||
<y>50</y>
|
||||
<width>201</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">When mark the operation will be only selected geometry of reference</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Selected feature(s) only</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="referenceLayerComboBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1</x>
|
||||
<y>18</y>
|
||||
<width>206</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>206</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select the reference layer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QProgressBar" name="progressBarStatus">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QGroupBox" name="grpResults">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
@ -254,8 +78,8 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="title">
|
||||
<string>Results (click to highlight on map)</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QListWidget" name="selectedFeatureListWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
@ -280,7 +104,17 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showLogProcessingCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Check to show log processing of query</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show log messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEditStatus">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
@ -290,7 +124,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item>
|
||||
<widget class="QLabel" name="countSelectedFeats">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -312,49 +146,154 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="showLogProcessingCheckBox">
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="grpTargetGroupBox">
|
||||
<property name="toolTip">
|
||||
<string>Layer on which the topological operation will select geometries</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Target layer</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QComboBox" name="targetLayerComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>206</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark to show log processing of query</string>
|
||||
<string>Select the target layer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="usingSelectedTargetCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">When checked the operation will only consider selected geometries of the target layer</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show log messages</string>
|
||||
<string>Selected feature(s) only</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>usingSelectedTargetCheckBox</zorder>
|
||||
<zorder>targetLayerComboBox</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="grpReferenceGroupBox">
|
||||
<property name="toolTip">
|
||||
<string>Layer whose geometries will be used as reference by the topological operation</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Reference layer</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QComboBox" name="referenceLayerComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>206</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select the reference layer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="usingSelectedReferenceCheckBox">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">When checked the operation will be only consider selected geometries of the reference layer</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Selected feature(s) only</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QProgressBar" name="progressBarStatus">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::DefaultContextMenu</enum>
|
||||
</property>
|
||||
<item row="5" column="0">
|
||||
<widget class="QGroupBox" name="grpOperationGroupBox">
|
||||
<property name="toolTip">
|
||||
<string>Run query or close the window</string>
|
||||
<string>Topological operations between layers of target and reference</string>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
|
||||
<property name="title">
|
||||
<string>Topological operation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QComboBox" name="operantionComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>10</horstretch>
|
||||
<verstretch>116</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>206</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select the topological operation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
Binary file not shown.
@ -1,227 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="pt_BR" sourcelanguage="en">
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="151"/>
|
||||
<source>Disjoint</source>
|
||||
<translation type="unfinished">Disjunto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="156"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="176"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="204"/>
|
||||
<source>Equals</source>
|
||||
<translation type="unfinished">Igual</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="160"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="164"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="172"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="177"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="182"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="192"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="197"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="205"/>
|
||||
<source>Touches</source>
|
||||
<translation type="unfinished">Toca</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="165"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="183"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="207"/>
|
||||
<source>Contains</source>
|
||||
<translation type="unfinished">Contém</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="178"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="184"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="199"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="209"/>
|
||||
<source>Crosses</source>
|
||||
<translation type="unfinished">Cruza</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="185"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="200"/>
|
||||
<source>Intersects</source>
|
||||
<translation type="unfinished">Intercepta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="193"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="198"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="208"/>
|
||||
<source>Within</source>
|
||||
<translation type="unfinished">Está contido</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquery.cpp" line="206"/>
|
||||
<source>Overlaps</source>
|
||||
<translation type="unfinished">Sobrepõe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialqueryplugin.cpp" line="49"/>
|
||||
<source>Spatial Query Plugin</source>
|
||||
<translation type="unfinished">Plugin de pesquisa espacial</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialqueryplugin.cpp" line="50"/>
|
||||
<source>A plugin that makes spatial queries on vector layers</source>
|
||||
<translation type="unfinished">O plugin permite fazer pesquisas espaciais em camadas vetoriais
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialqueryplugin.cpp" line="51"/>
|
||||
<source>Version 0.1</source>
|
||||
<translation type="unfinished">Versão 0.1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QgsSpatialQueryDialog</name>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="48"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="63"/>
|
||||
<source>The spatial query requires at least two layers</source>
|
||||
<translation type="unfinished">A pesquisa espacial requer no mínimo duas camadas
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="64"/>
|
||||
<source>Insufficient number of layers</source>
|
||||
<translation type="unfinished">Número de camadas insuficiente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="149"/>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="150"/>
|
||||
<source>Selected geometries</source>
|
||||
<translation type="unfinished">Geometria selecionadas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="186"/>
|
||||
<source>Total: %1</source>
|
||||
<translation type="unfinished">Total: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="188"/>
|
||||
<source><<-- Begin at [%L1] --</source>
|
||||
<translation type="unfinished"><<-- Início as [%L1] --</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="190"/>
|
||||
<source>Query:</source>
|
||||
<translation type="unfinished">Pesquisa:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="194"/>
|
||||
<source>< %1 ></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="198"/>
|
||||
<source>Result: %1 features</source>
|
||||
<translation type="unfinished">Resultado: %1 feições</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="201"/>
|
||||
<source>-- Finish at [%L1] (processing time %L2 minutes) -->></source>
|
||||
<translation type="unfinished">-- Final as [%L1] (tempo de processamento %L2 minutos) -->>
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="233"/>
|
||||
<source>%1 of %2</source>
|
||||
<translation type="unfinished">%1 de %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="234"/>
|
||||
<source>all</source>
|
||||
<translation type="unfinished">todas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="364"/>
|
||||
<source>Total</source>
|
||||
<translation type="unfinished">Total</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="502"/>
|
||||
<source>Missing reference layer</source>
|
||||
<translation type="unfinished">Falha na camada de referência</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="502"/>
|
||||
<source>Select reference layer!</source>
|
||||
<translation type="unfinished">Selecione a camada de referência!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="507"/>
|
||||
<source>Missing target layer</source>
|
||||
<translation type="unfinished">Falha na camada alvo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="507"/>
|
||||
<source>Select target layer!</source>
|
||||
<translation type="unfinished">Selecione a camada alvo!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialquerydialog.cpp" line="630"/>
|
||||
<source>DEBUG</source>
|
||||
<translation type="unfinished">Debulhando</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QgsSpatialQueryDialogBase</name>
|
||||
<message>
|
||||
<location filename="../spatialquery/ui/qgsspatialquerydialogbase.ui" line="32"/>
|
||||
<source>Spatial Query</source>
|
||||
<translation type="unfinished">Pesquisa Espacial</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/ui/qgsspatialquerydialogbase.ui" line="70"/>
|
||||
<source>Target Layer</source>
|
||||
<translation type="unfinished">Camada alvo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/ui/qgsspatialquerydialogbase.ui" line="93"/>
|
||||
<location filename="../spatialquery/ui/qgsspatialquerydialogbase.ui" line="178"/>
|
||||
<source>Selected geometries</source>
|
||||
<translation type="unfinished">Geometrias selecionadas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/ui/qgsspatialquerydialogbase.ui" line="107"/>
|
||||
<source>Operation</source>
|
||||
<translation type="unfinished">Operação</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/ui/qgsspatialquerydialogbase.ui" line="149"/>
|
||||
<source>Reference Layer</source>
|
||||
<translation type="unfinished">Camada de referência</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/ui/qgsspatialquerydialogbase.ui" line="215"/>
|
||||
<source>Result Query</source>
|
||||
<translation type="unfinished">Resultado da pesquisa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/ui/qgsspatialquerydialogbase.ui" line="250"/>
|
||||
<source>Total</source>
|
||||
<translation type="unfinished">Total</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QgsSpatialQueryPlugin</name>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialqueryplugin.cpp" line="79"/>
|
||||
<location filename="../spatialquery/source/qgsspatialqueryplugin.cpp" line="90"/>
|
||||
<location filename="../spatialquery/source/qgsspatialqueryplugin.cpp" line="99"/>
|
||||
<source>&Spatial Query</source>
|
||||
<translation type="unfinished">&Pesquisa Espacial
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../spatialquery/source/qgsspatialqueryplugin.cpp" line="157"/>
|
||||
<source>DEBUG</source>
|
||||
<translation type="unfinished">Debulhando</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
Loading…
x
Reference in New Issue
Block a user