Skip to content
Permalink
Browse files
Fix direction for eventLayer offset
  • Loading branch information
mhugent committed Apr 1, 2012
1 parent 17c0454 commit f2443737e0b7267e4c15498db4a3c056e4adccdc
Showing with 8 additions and 4 deletions.
  1. +5 −1 python/analysis/qgsgeometryanalyzer.sip
  2. +2 −2 src/analysis/vector/qgsgeometryanalyzer.cpp
  3. +1 −1 src/analysis/vector/qgsgeometryanalyzer.h
@@ -46,7 +46,8 @@ class QgsGeometryAnalyzer
bool onlySelectedFeatures = false,
int uniqueIdField = -1 );

/**Creates an event layer (multipoint or multiline). Note that currently (until QgsGeometry supports m-values) the z-coordinate of the line layer is used for linear referencing
/**Creates an event layer (multipoint or multiline) by locating features from a (non-spatial) event table along the features of a line layer.
Note that currently (until QgsGeometry supports m-values) the z-coordinate of the line layer is used for linear referencing
@param lineLayer layer with the line geometry
@param eventLayer layer with features and location field
@param lineField join index in line layer
@@ -56,6 +57,9 @@ class QgsGeometryAnalyzer
@param unlocatedFeatureIds out: ids of event features where linear referencing was not successful
@param locationField1 attribute index of location field in event layer
@param locationField2 attribute index of location end field (or -1 for point layer)
@param offsetField attribute index for offset field. Negative offset value = offset to left side, positive value = offset to right side
@param offsetScale factor to scale offset
@param forceSingleGeometry force layer to single point/line type. Feature attributes are copied in case of multiple matches
@param memoryProvider memory provider to write output to (can be 0 if output is written to a file)
@param p progress dialog or 0 if no progress dialog should be shown
*/
@@ -1108,9 +1108,9 @@ void QgsGeometryAnalyzer::createOffsetGeometry( QgsGeometry* geom, QgsGeometry*
//geos 3.3 needed for line offsets
#if defined(GEOS_VERSION_MAJOR) && defined(GEOS_VERSION_MINOR) && \
((GEOS_VERSION_MAJOR>3) || ((GEOS_VERSION_MAJOR==3) && (GEOS_VERSION_MINOR>=3)))
outputGeomList.push_back( GEOSOffsetCurve(( *inputGeomIt )->asGeos(), offset, 8 /*quadSegments*/, 0 /*joinStyle*/, 5.0 /*mitreLimit*/ ) );
outputGeomList.push_back( GEOSOffsetCurve(( *inputGeomIt )->asGeos(), -offset, 8 /*quadSegments*/, 0 /*joinStyle*/, 5.0 /*mitreLimit*/ ) );
#else
outputGeomList.push_back( 0 );
outputGeomList.push_back( GEOSGeom_clone(( *inputGeomIt )->asGeos() ) );
#endif
}
else if ( geom->type() == QGis::Point )
@@ -111,7 +111,7 @@ class ANALYSIS_EXPORT QgsGeometryAnalyzer
@param unlocatedFeatureIds out: ids of event features where linear referencing was not successful
@param locationField1 attribute index of location field in event layer
@param locationField2 attribute index of location end field (or -1 for point layer)
@param offsetField attribute index for offset field
@param offsetField attribute index for offset field. Negative offset value = offset to left side, positive value = offset to right side
@param offsetScale factor to scale offset
@param forceSingleGeometry force layer to single point/line type. Feature attributes are copied in case of multiple matches
@param memoryProvider memory provider to write output to (can be 0 if output is written to a file)

0 comments on commit f244373

Please sign in to comment.