Skip to content
Permalink
Browse files

fix spelling doc ans SIP

  • Loading branch information
vcloarec authored and PeterPetrik committed Nov 10, 2020
1 parent 886460c commit 0a2af53c2803bda2319db36db7b7771c98a8669f
@@ -32,23 +32,31 @@ Caches the native and triangular mesh from data provider

:param layer: mesh layer to be associated with this exporter
%End



~QgsMeshContours();

QgsGeometry exportLines( const QgsMeshDatasetIndex &index,
double value,
QgsMeshRendererScalarSettings::DataResamplingMethod method,
QgsFeedback *feedback = 0 );
%Docstring
Exports multi line string containing the contour line for particular dataset and value
Exports multi line string containing the contour line for particular dataset and value.

:param index: dataset index
:param index: dataset index that is used to update the cache
:param value: value of the contour line
:param method: for datasets defined on faces, the method will be used to convert data to vertices
:param feedback: optional feedback object for progress and cancellation support

:return: MultiLineString geometry containing contour lines

.. note::

not thread safe
%End


QgsGeometry exportPolygons( const QgsMeshDatasetIndex &index,
double min_value,
double max_value,
@@ -64,8 +72,14 @@ Exports multi polygons representing the areas with values in range for particula
:param feedback: optional feedback object for progress and cancellation support

:return: MultiPolygon geometry containing contour polygons

.. note::

not thread safe
%End



};

/************************************************************************
@@ -49,6 +49,8 @@ from data provider and calculates triangular mesh

.. versionadded:: 3.6
%End


};

/************************************************************************
@@ -49,11 +49,10 @@ QgsMeshContours::QgsMeshContours( QgsMeshLayer *layer )
mTriangularMesh.update( &mNativeMesh );
}

QgsMeshContours::QgsMeshContours(
const QgsTriangularMesh &triangularMesh,
const QgsMesh &nativeMesh,
const QVector<double> &datasetValues,
QgsMeshDataBlock scalarActiveFaceFlagValues ):
QgsMeshContours::QgsMeshContours( const QgsTriangularMesh &triangularMesh,
const QgsMesh &nativeMesh,
const QVector<double> &datasetValues,
const QgsMeshDataBlock scalarActiveFaceFlagValues ):
mTriangularMesh( triangularMesh )
, mNativeMesh( nativeMesh )
, mDatasetValues( datasetValues )
@@ -62,12 +62,17 @@ class ANALYSIS_EXPORT QgsMeshContours
* Constructs the mesh contours exporter directly with triangular mesh and dataset values to populate the cache with them.
* The cache can't be changed.
* This instance can be used in a thread safe way.
* \param layer mesh layer to be associated with this exporter
* \param triangularMesh triangular mesh of the meshlayer
* \param nativeMesh the native mesh of the mesh layer
* \param datasetValues the dataset values to used for creating contours
* \param scalarActiveFaceFlagValues active face flag values
*
* \since QGIS 3.18
*/
QgsMeshContours( const QgsTriangularMesh &triangularMesh,
const QgsMesh &nativeMesh,
const QVector<double> &datasetValues,
QgsMeshDataBlock scalarActiveFaceFlagValues );
const QgsMeshDataBlock scalarActiveFaceFlagValues ) SIP_SKIP;


~QgsMeshContours();
@@ -94,8 +99,10 @@ class ANALYSIS_EXPORT QgsMeshContours
* \returns MultiLineString geometry containing contour lines
*
* \note thread safe
*
* \since QGIS 3.18
*/
QgsGeometry exportLines( double value, QgsFeedback *feedback = nullptr );
QgsGeometry exportLines( double value, QgsFeedback *feedback = nullptr ) SIP_SKIP;

/**
* Exports multi polygons representing the areas with values in range for particular dataset
@@ -122,8 +129,10 @@ class ANALYSIS_EXPORT QgsMeshContours
* \returns MultiPolygon geometry containing contour polygons
*
* \note thread safe
*
* \since QGIS 3.18
*/
QgsGeometry exportPolygons( double min_value, double max_value, QgsFeedback *feedback = nullptr );
QgsGeometry exportPolygons( double min_value, double max_value, QgsFeedback *feedback = nullptr ) SIP_SKIP;


private:
@@ -960,7 +960,7 @@ bool QgsMeshContoursAlgorithm::prepareAlgorithm( const QVariantMap &parameters,

// Prepare levels
mLevels.clear();
// Fisrt, try with the levels list
// First, try with the levels list
QString levelsString = parameterAsString( parameters, QStringLiteral( "CONTOUR_LEVEL_LIST" ), context );
if ( ! levelsString.isEmpty() )
{
@@ -116,10 +116,14 @@ namespace QgsMeshUtils
/**
* Exports mesh layer's dataset values as raster block
*
* The function always fetches native mesh and dataset data
* from data provider and calculates triangular mesh
*
* \param
* \param triangularMesh the triangular mesh of the mesh layer
* \param datasetValues dataset values used to build the raster block
* \param activeFlags active flag values
* \param dataType the data type iof the dataset values
* \param transform the coordinate transform used to export the raster block
* \param mapUnitsPerPixel map units per pixel for block
* \param extent extent of block in destination CRS
* \param feedback optional raster feedback object for cancellation/preview
* \returns raster block with Float::64 values. NULLPTR on error
*
* \since QGIS 3.18
@@ -133,7 +137,7 @@ namespace QgsMeshUtils
double mapUnitsPerPixel,
const QgsRectangle &extent,
QgsRasterBlockFeedback *feedback = nullptr
) SIP_FACTORY;
) SIP_SKIP;
};

#endif // QGSMESHLAYERINTERPOLATOR_H
@@ -0,0 +1,21 @@
<GMLFeatureClassList>
<GMLFeatureClass>
<Name>linedensity</Name>
<ElementPath>linedensity</ElementPath>
<!--LINESTRING-->
<GeometryType>2</GeometryType>
<SRSName>EPSG:4326</SRSName>
<DatasetSpecificInfo>
<FeatureCount>5</FeatureCount>
<ExtentXMin>0.36056</ExtentXMin>
<ExtentXMax>9.93099</ExtentXMax>
<ExtentYMin>-1.01549</ExtentYMin>
<ExtentYMax>5.51268</ExtentYMax>
</DatasetSpecificInfo>
<PropertyDefn>
<Name>weight</Name>
<ElementPath>weight</ElementPath>
<Type>Real</Type>
</PropertyDefn>
</GMLFeatureClass>
</GMLFeatureClassList>

0 comments on commit 0a2af53

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