Fix direction for eventLayer offset

This commit is contained in:
Marco Hugentobler 2012-04-01 13:23:26 +02:00
parent 17c04547ac
commit f2443737e0
3 changed files with 8 additions and 4 deletions

View File

@ -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
*/

View File

@ -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 )

View File

@ -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)