Skip to content

Commit eb5f491

Browse files
author
jef
committedDec 2, 2010
delimited text provider: fix indentation, some warnings and use
intersection only when requested in select(). git-svn-id: http://svn.osgeo.org/qgis/trunk@14825 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2517e13 commit eb5f491

File tree

3 files changed

+221
-218
lines changed

3 files changed

+221
-218
lines changed
 

‎src/plugins/delimited_text/qgsdelimitedtextplugingui.cpp

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,23 @@ void QgsDelimitedTextPluginGui::on_buttonBox_accepted()
104104
.arg( txtDelimiter->text() )
105105
.arg( delimiterType );
106106

107-
if( geomTypeXY->isChecked())
108-
{
109-
if ( !cmbXField->currentText().isEmpty() && !cmbYField->currentText().isEmpty() )
110-
{
111-
uri += QString( "&xField=%1&yField=%2" )
112-
.arg( cmbXField->currentText() )
113-
.arg( cmbYField->currentText() );
114-
}
115-
}
116-
else
117-
{
118-
if( ! cmbWktField->currentText().isEmpty() )
119-
{
120-
uri += QString( "&wktField=%1" )
121-
.arg( cmbWktField->currentText() );
122-
}
123-
}
107+
if ( geomTypeXY->isChecked() )
108+
{
109+
if ( !cmbXField->currentText().isEmpty() && !cmbYField->currentText().isEmpty() )
110+
{
111+
uri += QString( "&xField=%1&yField=%2" )
112+
.arg( cmbXField->currentText() )
113+
.arg( cmbYField->currentText() );
114+
}
115+
}
116+
else
117+
{
118+
if ( ! cmbWktField->currentText().isEmpty() )
119+
{
120+
uri += QString( "&wktField=%1" )
121+
.arg( cmbWktField->currentText() );
122+
}
123+
}
124124

125125
int skipLines = rowCounter->value();
126126
if ( skipLines > 0 )
@@ -222,9 +222,9 @@ void QgsDelimitedTextPluginGui::updateFieldLists()
222222
disconnect( cmbXField, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableAccept() ) );
223223
disconnect( cmbYField, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableAccept() ) );
224224
disconnect( cmbWktField, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableAccept() ) );
225-
disconnect(geomTypeXY, SIGNAL(toggled(bool)), cmbXField, SLOT(setEnabled(bool)));
226-
disconnect(geomTypeXY, SIGNAL(toggled(bool)), cmbYField, SLOT(setEnabled(bool)));
227-
disconnect(geomTypeXY, SIGNAL(toggled(bool)), cmbWktField, SLOT(setDisabled(bool)));
225+
disconnect( geomTypeXY, SIGNAL( toggled( bool ) ), cmbXField, SLOT( setEnabled( bool ) ) );
226+
disconnect( geomTypeXY, SIGNAL( toggled( bool ) ), cmbYField, SLOT( setEnabled( bool ) ) );
227+
disconnect( geomTypeXY, SIGNAL( toggled( bool ) ), cmbWktField, SLOT( setDisabled( bool ) ) );
228228

229229
QString columnX = cmbXField->currentText();
230230
QString columnY = cmbYField->currentText();
@@ -241,7 +241,7 @@ void QgsDelimitedTextPluginGui::updateFieldLists()
241241
cmbYField->setEnabled( false );
242242
cmbWktField->setEnabled( false );
243243

244-
if( ! haveValidFileAndDelimiters()) return;
244+
if ( ! haveValidFileAndDelimiters() ) return;
245245

246246
QFile file( txtFilePath->text() );
247247
if ( !file.open( QIODevice::ReadOnly ) )
@@ -283,28 +283,28 @@ void QgsDelimitedTextPluginGui::updateFieldLists()
283283

284284
cmbXField->addItem( field );
285285
cmbYField->addItem( field );
286-
cmbWktField->addItem( field );
287-
haveFields = true;
286+
cmbWktField->addItem( field );
287+
haveFields = true;
288288
}
289289

290290
int indexWkt = -1;
291-
if( ! columnWkt.isEmpty() )
291+
if ( ! columnWkt.isEmpty() )
292292
{
293-
indexWkt = cmbWktField->findText( columnWkt );
293+
indexWkt = cmbWktField->findText( columnWkt );
294294
}
295-
if( indexWkt < 0 )
295+
if ( indexWkt < 0 )
296296
{
297-
indexWkt = cmbWktField->findText("wkt", Qt::MatchContains );
297+
indexWkt = cmbWktField->findText( "wkt", Qt::MatchContains );
298298
}
299-
if( indexWkt < 0 )
299+
if ( indexWkt < 0 )
300300
{
301-
indexWkt = cmbWktField->findText("geometry", Qt::MatchContains );
301+
indexWkt = cmbWktField->findText( "geometry", Qt::MatchContains );
302302
}
303-
if( indexWkt < 0 )
303+
if ( indexWkt < 0 )
304304
{
305-
indexWkt = cmbWktField->findText("shape", Qt::MatchContains );
305+
indexWkt = cmbWktField->findText( "shape", Qt::MatchContains );
306306
}
307-
cmbWktField->setCurrentIndex( indexWkt);
307+
cmbWktField->setCurrentIndex( indexWkt );
308308

309309
int indexX = -1;
310310
if ( !columnX.isEmpty() )
@@ -343,26 +343,26 @@ void QgsDelimitedTextPluginGui::updateFieldLists()
343343
cmbYField->setCurrentIndex( indexY );
344344

345345

346-
bool isXY = (geomTypeXY->isChecked() && indexX >= 0 && indexY >= 0) || indexWkt < 0;
346+
bool isXY = ( geomTypeXY->isChecked() && indexX >= 0 && indexY >= 0 ) || indexWkt < 0;
347347

348-
geomTypeXY->setChecked( isXY );
348+
geomTypeXY->setChecked( isXY );
349349
geomTypeWKT->setChecked( ! isXY );
350350

351-
if( haveFields )
351+
if ( haveFields )
352352
{
353-
geomTypeXY->setEnabled(true);
354-
geomTypeWKT->setEnabled(true);
355-
cmbXField->setEnabled( isXY );
356-
cmbYField->setEnabled( isXY );
357-
cmbWktField->setEnabled( ! isXY );
358-
359-
360-
connect( cmbXField, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableAccept() ) );
361-
connect( cmbYField, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableAccept() ) );
362-
connect( cmbWktField, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableAccept() ) );
363-
connect(geomTypeXY, SIGNAL(toggled(bool)), cmbXField, SLOT(setEnabled(bool)));
364-
connect(geomTypeXY, SIGNAL(toggled(bool)), cmbYField, SLOT(setEnabled(bool)));
365-
connect(geomTypeXY, SIGNAL(toggled(bool)), cmbWktField, SLOT(setDisabled(bool)));
353+
geomTypeXY->setEnabled( true );
354+
geomTypeWKT->setEnabled( true );
355+
cmbXField->setEnabled( isXY );
356+
cmbYField->setEnabled( isXY );
357+
cmbWktField->setEnabled( ! isXY );
358+
359+
360+
connect( cmbXField, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableAccept() ) );
361+
connect( cmbYField, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableAccept() ) );
362+
connect( cmbWktField, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableAccept() ) );
363+
connect( geomTypeXY, SIGNAL( toggled( bool ) ), cmbXField, SLOT( setEnabled( bool ) ) );
364+
connect( geomTypeXY, SIGNAL( toggled( bool ) ), cmbYField, SLOT( setEnabled( bool ) ) );
365+
connect( geomTypeXY, SIGNAL( toggled( bool ) ), cmbWktField, SLOT( setDisabled( bool ) ) );
366366
}
367367

368368
// clear the sample text box
@@ -414,28 +414,28 @@ void QgsDelimitedTextPluginGui::getOpenFileName()
414414

415415
void QgsDelimitedTextPluginGui::updateFieldsAndEnable()
416416
{
417-
updateFieldLists();
418-
enableAccept();
417+
updateFieldLists();
418+
enableAccept();
419419
}
420420

421421
void QgsDelimitedTextPluginGui::enableAccept()
422422
{
423423

424-
// If the geometry type field is enabled then there must be
425-
// a valid file, and it must be
424+
// If the geometry type field is enabled then there must be
425+
// a valid file, and it must be
426426
bool enabled = haveValidFileAndDelimiters();
427427

428428
if ( enabled )
429429
{
430430

431-
if( geomTypeXY->isChecked() )
432-
{
433-
enabled = !( cmbXField->currentText().isEmpty() || cmbYField->currentText().isEmpty() || cmbXField->currentText() == cmbYField->currentText() );
434-
}
435-
else
436-
{
437-
enabled = !cmbWktField->currentText().isEmpty();
438-
}
431+
if ( geomTypeXY->isChecked() )
432+
{
433+
enabled = !( cmbXField->currentText().isEmpty() || cmbYField->currentText().isEmpty() || cmbXField->currentText() == cmbYField->currentText() );
434+
}
435+
else
436+
{
437+
enabled = !cmbWktField->currentText().isEmpty();
438+
}
439439
}
440440

441441
pbnOK->setEnabled( enabled );

‎src/providers/delimitedtext/qgsdelimitedtextprovider.cpp

Lines changed: 150 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,16 @@ QStringList QgsDelimitedTextProvider::splitLine( QString line )
132132
}
133133

134134
QgsDelimitedTextProvider::QgsDelimitedTextProvider( QString uri )
135-
: QgsVectorDataProvider( uri ),
136-
mHasWktField( false ), mFieldCount(0),
137-
mXFieldIndex( -1 ), mYFieldIndex( -1 ),
138-
mWktFieldIndex( -1 ), mWktHasZM( false),
139-
mWktZMRegexp("\\s+(?:z|m|zm)(?=\\s*\\()",Qt::CaseInsensitive),
140-
mWktCrdRegexp("(\\-?\\d+(?:\\.\\d*)?\\s+\\-?\\d+(?:\\.\\d*)?)\\s[\\s\\d\\.\\-]+"),
141-
mShowInvalidLines( true ), mWkbType( QGis::WKBNoGeometry )
135+
: QgsVectorDataProvider( uri )
136+
, mHasWktField( false )
137+
, mFieldCount( 0 )
138+
, mXFieldIndex( -1 ), mYFieldIndex( -1 )
139+
, mWktFieldIndex( -1 )
140+
, mWktHasZM( false )
141+
, mWktZMRegexp( "\\s+(?:z|m|zm)(?=\\s*\\()", Qt::CaseInsensitive )
142+
, mWktCrdRegexp( "(\\-?\\d+(?:\\.\\d*)?\\s+\\-?\\d+(?:\\.\\d*)?)\\s[\\s\\d\\.\\-]+" )
143+
, mShowInvalidLines( true )
144+
, mWkbType( QGis::WKBNoGeometry )
142145
{
143146
// Get the file name and mDelimiter out of the uri
144147
mFileName = uri.left( uri.indexOf( "?" ) );
@@ -169,7 +172,7 @@ QgsDelimitedTextProvider::QgsDelimitedTextProvider( QString uri )
169172
yField = QUrl::fromPercentEncoding( yField.toUtf8() );
170173

171174
mHasWktField = wktField != "";
172-
175+
173176
skipLines = QUrl::fromPercentEncoding( skipLines.toUtf8() );
174177

175178
mSkipLines = skipLines.toInt();
@@ -247,13 +250,13 @@ QgsDelimitedTextProvider::QgsDelimitedTextProvider( QString uri )
247250
// fields vector
248251
QStringList fieldList = splitLine( line );
249252

250-
mFieldCount = fieldList.count();
253+
mFieldCount = fieldList.count();
251254

252255
// We don't know anything about a text based field other
253256
// than its name. All fields are assumed to be text
254257
int fieldPos = 0;
255-
for( int column = 0; column < mFieldCount; column++ )
256-
{
258+
for ( int column = 0; column < mFieldCount; column++ )
259+
{
257260
QString field = fieldList[column];
258261
if ( field.length() > 0 )
259262
{
@@ -275,20 +278,20 @@ QgsDelimitedTextProvider::QgsDelimitedTextProvider( QString uri )
275278
mYFieldIndex = column;
276279
}
277280

278-
// WKT geometry field won't be displayed in attribute tables
279-
if( column == mWktFieldIndex ) continue;
281+
// WKT geometry field won't be displayed in attribute tables
282+
if ( column == mWktFieldIndex ) continue;
280283

281284
QgsDebugMsg( "Adding field: " + ( field ) );
282285
// assume that the field could be integer or double
283286
// for now, let's set field type as text
284-
attributeColumns.append(column);
287+
attributeColumns.append( column );
285288
attributeFields[fieldPos] = QgsField( field, QVariant::String, "Text" );
286289
couldBeInt.insert( fieldPos, true );
287290
couldBeDouble.insert( fieldPos, true );
288291
fieldPos++;
289292
}
290293
}
291-
if( mWktFieldIndex >= 0 ) { mXFieldIndex = -1; mYFieldIndex=-1; }
294+
if ( mWktFieldIndex >= 0 ) { mXFieldIndex = -1; mYFieldIndex = -1; }
292295
QgsDebugMsg( "Field count for the delimited text file is " + QString::number( attributeFields.size() ) );
293296
hasFields = true;
294297
}
@@ -304,83 +307,83 @@ QgsDelimitedTextProvider::QgsDelimitedTextProvider( QString uri )
304307
continue;
305308
}
306309

307-
if( mHasWktField && mWktFieldIndex >= 0 )
308-
{
309-
// Get the wkt - confirm it is valid, get the type, and
310-
// if compatible with the rest of file, add to the extents
311-
312-
QString sWkt = parts[mWktFieldIndex];
313-
QgsGeometry *geom = 0;
314-
try
315-
{
316-
if( ! mWktHasZM && sWkt.indexOf(mWktZMRegexp) >= 0 ) mWktHasZM = true;
317-
if( mWktHasZM )
318-
{
319-
sWkt.remove(mWktZMRegexp).replace(mWktCrdRegexp,"\\1");
320-
}
321-
geom = QgsGeometry::fromWkt(sWkt);
322-
}
323-
catch(...)
324-
{
325-
geom = 0;
326-
}
327-
328-
if( geom )
329-
{
330-
QGis::WkbType type = geom->wkbType();
331-
if( type != QGis::WKBNoGeometry )
332-
{
333-
if( mNumberFeatures == 0 )
334-
{
335-
mNumberFeatures++;
336-
mWkbType = type;
337-
mExtent = geom->boundingBox();
338-
}
339-
else if( type == mWkbType )
340-
{
341-
mNumberFeatures++;
342-
QgsRectangle bbox( geom->boundingBox());
343-
mExtent.combineExtentWith( &bbox );
344-
}
345-
}
346-
delete geom;
347-
}
348-
}
349-
350-
else if( ! mHasWktField && mXFieldIndex >= 0 && mYFieldIndex >= 0 )
351-
{
352-
353-
// Get the x and y values, first checking to make sure they
354-
// aren't null.
355-
356-
QString sX = parts[mXFieldIndex];
357-
QString sY = parts[mYFieldIndex];
358-
359-
bool xOk = true;
360-
bool yOk = true;
361-
double x = sX.toDouble( &xOk );
362-
double y = sY.toDouble( &yOk );
363-
364-
if ( xOk && yOk )
365-
{
366-
if ( mNumberFeatures > 0 )
367-
{
368-
mExtent.combineExtentWith( x, y );
369-
}
370-
else
371-
{
372-
// Extent for the first point is just the first point
373-
mExtent.set( x, y, x, y );
374-
mWkbType = QGis::WKBPoint;
375-
}
376-
mNumberFeatures++;
377-
}
378-
}
379-
380-
for( int i = 0; i < attributeFields.size(); i++ )
381-
{
382-
QString &value = parts[attributeColumns[i]];
383-
if( value.isEmpty()) continue;
310+
if ( mHasWktField && mWktFieldIndex >= 0 )
311+
{
312+
// Get the wkt - confirm it is valid, get the type, and
313+
// if compatible with the rest of file, add to the extents
314+
315+
QString sWkt = parts[mWktFieldIndex];
316+
QgsGeometry *geom = 0;
317+
try
318+
{
319+
if ( ! mWktHasZM && sWkt.indexOf( mWktZMRegexp ) >= 0 ) mWktHasZM = true;
320+
if ( mWktHasZM )
321+
{
322+
sWkt.remove( mWktZMRegexp ).replace( mWktCrdRegexp, "\\1" );
323+
}
324+
geom = QgsGeometry::fromWkt( sWkt );
325+
}
326+
catch ( ... )
327+
{
328+
geom = 0;
329+
}
330+
331+
if ( geom )
332+
{
333+
QGis::WkbType type = geom->wkbType();
334+
if ( type != QGis::WKBNoGeometry )
335+
{
336+
if ( mNumberFeatures == 0 )
337+
{
338+
mNumberFeatures++;
339+
mWkbType = type;
340+
mExtent = geom->boundingBox();
341+
}
342+
else if ( type == mWkbType )
343+
{
344+
mNumberFeatures++;
345+
QgsRectangle bbox( geom->boundingBox() );
346+
mExtent.combineExtentWith( &bbox );
347+
}
348+
}
349+
delete geom;
350+
}
351+
}
352+
353+
else if ( ! mHasWktField && mXFieldIndex >= 0 && mYFieldIndex >= 0 )
354+
{
355+
356+
// Get the x and y values, first checking to make sure they
357+
// aren't null.
358+
359+
QString sX = parts[mXFieldIndex];
360+
QString sY = parts[mYFieldIndex];
361+
362+
bool xOk = true;
363+
bool yOk = true;
364+
double x = sX.toDouble( &xOk );
365+
double y = sY.toDouble( &yOk );
366+
367+
if ( xOk && yOk )
368+
{
369+
if ( mNumberFeatures > 0 )
370+
{
371+
mExtent.combineExtentWith( x, y );
372+
}
373+
else
374+
{
375+
// Extent for the first point is just the first point
376+
mExtent.set( x, y, x, y );
377+
mWkbType = QGis::WKBPoint;
378+
}
379+
mNumberFeatures++;
380+
}
381+
}
382+
383+
for ( int i = 0; i < attributeFields.size(); i++ )
384+
{
385+
QString &value = parts[attributeColumns[i]];
386+
if ( value.isEmpty() ) continue;
384387
// try to convert attribute values to integer and double
385388
if ( couldBeInt[i] )
386389
{
@@ -433,78 +436,76 @@ bool QgsDelimitedTextProvider::nextFeature( QgsFeature& feature )
433436
feature.setValid( false );
434437
while ( ! mStream->atEnd() )
435438
{
436-
double x = 0.0;
437-
double y = 0.0;
438439
QString line = readLine( mStream ); // Default local 8 bit encoding
439440
if ( line.isEmpty() )
440441
continue;
441442

442443
// lex the tokens from the current data line
443444
QStringList tokens = splitLine( line );
444445

445-
QgsGeometry *geom = 0;
446-
447-
if( mHasWktField && mWktFieldIndex >= 0 )
448-
{
449-
try
450-
{
451-
QString &sWkt = tokens[mWktFieldIndex];
452-
if( mWktHasZM )
453-
{
454-
sWkt.remove(mWktZMRegexp).replace(mWktCrdRegexp,"\\1");
455-
}
456-
457-
geom = QgsGeometry::fromWkt(sWkt);
458-
}
459-
catch(...)
460-
{
461-
geom = 0;
462-
}
463-
464-
if( geom && geom->wkbType() != mWkbType )
465-
{
466-
delete geom;
467-
geom = 0;
468-
}
469-
mFid++;
470-
if( ! boundsCheck(geom))
471-
{
472-
delete geom;
473-
geom = 0;
474-
}
475-
}
476-
else if( ! mHasWktField && mXFieldIndex >= 0 && mYFieldIndex >= 0 )
477-
{
478-
bool xOk, yOk;
479-
double x = tokens[mXFieldIndex].toDouble(&xOk);
480-
double y = tokens[mYFieldIndex].toDouble(&yOk);
481-
if( xOk && yOk )
482-
{
483-
mFid++;
484-
if( boundsCheck(x,y) )
485-
{
486-
geom = QgsGeometry::fromPoint(QgsPoint(x,y));
487-
}
488-
}
489-
}
490-
491-
// If no valid geometry skip to the next line
492-
493-
if( ! geom ) continue;
446+
QgsGeometry *geom = 0;
447+
448+
if ( mHasWktField && mWktFieldIndex >= 0 )
449+
{
450+
try
451+
{
452+
QString &sWkt = tokens[mWktFieldIndex];
453+
if ( mWktHasZM )
454+
{
455+
sWkt.remove( mWktZMRegexp ).replace( mWktCrdRegexp, "\\1" );
456+
}
457+
458+
geom = QgsGeometry::fromWkt( sWkt );
459+
}
460+
catch ( ... )
461+
{
462+
geom = 0;
463+
}
464+
465+
if ( geom && geom->wkbType() != mWkbType )
466+
{
467+
delete geom;
468+
geom = 0;
469+
}
470+
mFid++;
471+
if ( ! boundsCheck( geom ) )
472+
{
473+
delete geom;
474+
geom = 0;
475+
}
476+
}
477+
else if ( ! mHasWktField && mXFieldIndex >= 0 && mYFieldIndex >= 0 )
478+
{
479+
bool xOk, yOk;
480+
double x = tokens[mXFieldIndex].toDouble( &xOk );
481+
double y = tokens[mYFieldIndex].toDouble( &yOk );
482+
if ( xOk && yOk )
483+
{
484+
mFid++;
485+
if ( boundsCheck( x, y ) )
486+
{
487+
geom = QgsGeometry::fromPoint( QgsPoint( x, y ) );
488+
}
489+
}
490+
}
491+
492+
// If no valid geometry skip to the next line
493+
494+
if ( ! geom ) continue;
494495

495496
// At this point the current feature values are valid
496497

497498
feature.setValid( true );
498499

499500
feature.setFeatureId( mFid );
500501

501-
feature.setGeometry( geom );
502+
feature.setGeometry( geom );
502503

503504
for ( QgsAttributeList::const_iterator i = mAttributesToFetch.begin();
504505
i != mAttributesToFetch.end();
505506
++i )
506507
{
507-
QString &value = tokens[attributeColumns[*i]];
508+
QString &value = tokens[attributeColumns[*i]];
508509
QVariant val;
509510
switch ( attributeFields[*i].type() )
510511
{
@@ -568,6 +569,7 @@ void QgsDelimitedTextProvider::select( QgsAttributeList fetchAttributes,
568569
mSelectionRectangle = rect;
569570
mAttributesToFetch = fetchAttributes;
570571
mFetchGeom = fetchGeometry;
572+
mUseIntersect = useIntersect;
571573
if ( rect.isEmpty() )
572574
{
573575
mSelectionRectangle = mExtent;
@@ -644,7 +646,7 @@ bool QgsDelimitedTextProvider::boundsCheck( double x, double y )
644646
if ( mSelectionRectangle.isEmpty() || !mFetchGeom )
645647
return true;
646648

647-
return mSelectionRectangle.contains( QgsPoint(x,y) );
649+
return mSelectionRectangle.contains( QgsPoint( x, y ) );
648650
}
649651
/**
650652
* Check to see if the geometry is within the selection rectangle
@@ -655,8 +657,8 @@ bool QgsDelimitedTextProvider::boundsCheck( QgsGeometry *geom )
655657
if ( mSelectionRectangle.isEmpty() || !mFetchGeom )
656658
return true;
657659

658-
return geom->boundingBox().intersects( mSelectionRectangle )
659-
&& geom->intersects(mSelectionRectangle);;
660+
return geom->boundingBox().intersects( mSelectionRectangle ) &&
661+
( !mUseIntersect || geom->intersects( mSelectionRectangle ) );
660662
}
661663

662664
int QgsDelimitedTextProvider::capabilities() const

‎src/providers/delimitedtext/qgsdelimitedtextprovider.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -188,20 +188,20 @@ class QgsDelimitedTextProvider : public QgsVectorDataProvider
188188
QRegExp mDelimiterRegexp;
189189
QString mDelimiterType;
190190

191-
bool mHasWktField;
192-
int mFieldCount; // Note: this includes field count for wkt field
191+
bool mHasWktField;
192+
int mFieldCount; // Note: this includes field count for wkt field
193193
int mXFieldIndex;
194194
int mYFieldIndex;
195-
int mWktFieldIndex;
195+
int mWktFieldIndex;
196196

197-
// Handling of WKT types with .. Z, .. M, and .. ZM geometries (ie
198-
// Z values and/or measures). mWktZMRegexp is used to test for and
199-
// remove the Z or M fields, and mWktCrdRegexp is used to remove the
200-
// extra coordinate values.
197+
// Handling of WKT types with .. Z, .. M, and .. ZM geometries (ie
198+
// Z values and/or measures). mWktZMRegexp is used to test for and
199+
// remove the Z or M fields, and mWktCrdRegexp is used to remove the
200+
// extra coordinate values.
201201

202-
bool mWktHasZM;
203-
QRegExp mWktZMRegexp;
204-
QRegExp mWktCrdRegexp;
202+
bool mWktHasZM;
203+
QRegExp mWktZMRegexp;
204+
QRegExp mWktCrdRegexp;
205205

206206
//! Layer extent
207207
QgsRectangle mExtent;
@@ -216,6 +216,7 @@ class QgsDelimitedTextProvider : public QgsVectorDataProvider
216216
QTextStream *mStream;
217217

218218
bool mValid;
219+
bool mUseIntersect;
219220

220221
int mGeomType;
221222

0 commit comments

Comments
 (0)
Please sign in to comment.