@@ -947,7 +947,6 @@ bool QgsGeometryAnalyzer::eventLayer( QgsVectorLayer* lineLayer, QgsVectorLayer*
947
947
eventLayer->select ( eventLayer->pendingAllAttributesList (), QgsRectangle (), true , false );
948
948
QgsGeometry* lrsGeom = 0 ;
949
949
QgsFeature lineFeature;
950
- QgsGeometry* lineGeom = 0 ;
951
950
double measure1, measure2;
952
951
953
952
while ( eventLayer->nextFeature ( fet ) )
@@ -1002,7 +1001,6 @@ QgsGeometry* QgsGeometryAnalyzer::locateBetweenMeasures( double fromMeasure, dou
1002
1001
1003
1002
// need to go with WKB and z coordinate until QgsGeometry supports M values
1004
1003
unsigned char * lineWkb = lineGeom->asWkb ();
1005
- int wkbSize = lineGeom->wkbSize ();
1006
1004
1007
1005
unsigned char * ptr = lineWkb + 1 ;
1008
1006
QGis::WkbType wkbType;
@@ -1319,58 +1317,3 @@ void QgsGeometryAnalyzer::locateAlongSegment( double x1, double y1, double m1, d
1319
1317
pt1.setY ( y1 + dist * ( y2 - y1 ) );
1320
1318
pt1Ok = true ;
1321
1319
}
1322
-
1323
- QgsGeometry* QgsGeometryAnalyzer::testLocateBetweenMeasures ( double fromMeasure, double toMeasure, QgsGeometry* lineGeom, QList<double >& zValues )
1324
- {
1325
- // assume single line
1326
- QgsPolyline line = lineGeom->asPolyline ();
1327
-
1328
- QgsMultiPolyline output;
1329
- QgsPolyline currentLine;
1330
-
1331
- double x, y, z, prevx, prevy, prevz;
1332
-
1333
- QgsPoint pt1, pt2;
1334
- bool measureInSegment; // true if measure is contained in the segment
1335
- bool secondPointClipped; // true if second point is != segment endpoint
1336
-
1337
- for ( int i = 0 ; i < line.size (); ++i )
1338
- {
1339
- x = line.at ( i ).x ();
1340
- y = line.at ( i ).y ();
1341
- z = zValues.at ( i );
1342
-
1343
- if ( i > 0 )
1344
- {
1345
- measureInSegment = clipSegmentByRange ( prevx, prevy, prevz, x, y, z, fromMeasure, toMeasure, pt1, pt2, secondPointClipped );
1346
- if ( measureInSegment )
1347
- {
1348
- if ( currentLine.size () < 1 ) // no points collected yet, so the first point needs to be added to the line
1349
- {
1350
- currentLine.append ( pt1 );
1351
- }
1352
-
1353
- if ( pt1 != pt2 ) // avoid duplicated entry if measure value equals m-value of vertex
1354
- {
1355
- currentLine.append ( pt2 );
1356
- }
1357
-
1358
- if ( secondPointClipped || i == line.size () - 1 ) // close current segment
1359
- {
1360
- if ( currentLine.size () > 1 )
1361
- {
1362
- output.append ( currentLine );
1363
- }
1364
- currentLine.clear ();
1365
- }
1366
- }
1367
- }
1368
- prevx = x; prevy = y; prevz = z;
1369
- }
1370
- return QgsGeometry::fromMultiPolyline ( output );
1371
- }
1372
-
1373
- QgsGeometry* QgsGeometryAnalyzer::testLocateAlongMeasures ( double measure, QgsGeometry* lineGeom, QList<double >& zValues )
1374
- {
1375
- return 0 ;
1376
- }
0 commit comments