Skip to content
Permalink
Browse files

Documentation and warning fixes

  • Loading branch information
manisandro committed Sep 21, 2015
1 parent 5037328 commit 7573afc2ef5f9fda55b62952691cfb7cf3cc4f2d
@@ -139,8 +139,11 @@ class QgsMapSettings

const QgsMapToPixel& mapToPixel() const;

//! computes an *estimated* conversion factor between layer and map units: layerUnits * layerToMapUnits = mapUnits
//! @param referenceExtent A reference extent based on which to perform the computation. If not specified, the layer extent is used
/** Computes an *estimated* conversion factor between layer and map units: layerUnits * layerToMapUnits = mapUnits
* @param theLayer The layer
* @param referenceExtent A reference extent based on which to perform the computation. If not specified, the layer extent is used
* @note added in QGIS 2.12
*/
double layerToMapUnits( QgsMapLayer* theLayer, const QgsRectangle& referenceExtent = QgsRectangle() ) const;

/**
@@ -63,9 +63,10 @@ class CORE_EXPORT QgsGeometryUtils
* @param q1 Second segment start point
* @param q2 Second segment end point
* @param inter Output parameter, the intersection point
* @param tolerance The tolerance to use
* @return Whether the segments intersect
*/
static bool segmentIntersection( const QgsPointV2 &p1, const QgsPointV2 &p2, const QgsPointV2 &q1, const QgsPointV2 &q2, QgsPointV2& inter , double tolerance );
static bool segmentIntersection( const QgsPointV2 &p1, const QgsPointV2 &p2, const QgsPointV2 &q1, const QgsPointV2 &q2, QgsPointV2& inter, double tolerance );

/**
* @brief Project the point on a segment
@@ -91,8 +92,12 @@ class CORE_EXPORT QgsGeometryUtils

/**
* @brief Find self intersections in a polyline
* @param line The line
* @param geom The geometry to check
* @param part The part of the geometry to check
* @param ring The ring of the geometry part to check
* @param tolerance The tolerance to use
* @return The list of self intersections
* @note added in QGIS 2.12
*/
static QList<SelfIntersection> getSelfIntersections( const QgsAbstractGeometryV2* geom, int part, int ring, double tolerance );

@@ -49,8 +49,6 @@ email : marco.hugentobler at sourcepole dot com
return r; \
}

QString GEOSException::lastMsg;

static void throwGEOSException( const char *fmt, ... )
{
va_list ap;
@@ -71,6 +71,7 @@ class CORE_EXPORT QgsGeos: public QgsGeometryEngine
@param[out] newGeometries list of new geometries that have been created with the split
@param topological true if topological editing is enabled
@param[out] topologyTestPoints points that need to be tested for topological completeness in the dataset
@param[out] errorMsg error messages emitted, if any
@return 0 in case of success, 1 if geometry has not been split, error else*/
int splitGeometry( const QgsLineStringV2& splitLine,
QList<QgsAbstractGeometryV2*>& newGeometries,
@@ -152,14 +153,14 @@ class GEOSException
public:
GEOSException( QString theMsg )
{
if ( theMsg == "Unknown exception thrown" && lastMsg.isNull() )
if ( theMsg == "Unknown exception thrown" && lastMsg().isNull() )
{
msg = theMsg;
}
else
{
msg = theMsg;
lastMsg = msg;
lastMsg() = msg;
}
}

@@ -171,8 +172,8 @@ class GEOSException

~GEOSException()
{
if ( lastMsg == msg )
lastMsg = QString::null;
if ( lastMsg() == msg )
lastMsg() = QString::null;
}

QString what()
@@ -182,7 +183,7 @@ class GEOSException

private:
QString msg;
static QString lastMsg;
static QString& lastMsg() { static QString _lastMsg; return _lastMsg; }
};

/// @endcond
@@ -44,8 +44,7 @@ extern "C"
{
try
{
std::auto_ptr<GEOSGeometry> ptr = reducer->reduce( *geometry );
return ptr.release();
return reducer->reduce( *geometry ).release();
}
catch ( const geos::util::GEOSException& )
{
@@ -186,8 +186,11 @@ class CORE_EXPORT QgsMapSettings

const QgsMapToPixel& mapToPixel() const { return mMapToPixel; }

//! computes an *estimated* conversion factor between layer and map units: layerUnits * layerToMapUnits = mapUnits
//! @param referenceExtent A reference extent based on which to perform the computation. If not specified, the layer extent is used
/** Computes an *estimated* conversion factor between layer and map units: layerUnits * layerToMapUnits = mapUnits
* @param theLayer The layer
* @param referenceExtent A reference extent based on which to perform the computation. If not specified, the layer extent is used
* @note added in QGIS 2.12
*/
double layerToMapUnits( QgsMapLayer* theLayer, const QgsRectangle& referenceExtent = QgsRectangle() ) const;

/**
@@ -22,6 +22,6 @@ IF (POSTGRES_FOUND)
ADD_SUBDIRECTORY(postgres)
ENDIF (POSTGRES_FOUND)

IF (GRASS_FOUND)
IF (WITH_GRASS)
ADD_SUBDIRECTORY(grass)
ENDIF (GRASS_FOUND)
ENDIF (WITH_GRASS)

0 comments on commit 7573afc

Please sign in to comment.
You can’t perform that action at this time.