Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix docs
  • Loading branch information
PeterPetrik committed Jan 21, 2019
1 parent 7423a74 commit 1b11ba4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
11 changes: 7 additions & 4 deletions python/core/auto_generated/mesh/qgsmeshlayerinterpolator.sip.in
Expand Up @@ -24,19 +24,22 @@ namespace QgsMeshUtils
QgsRasterBlock *exportRasterBlock(
const QgsMeshLayer &layer,
const QgsMeshDatasetIndex &datasetIndex,
const QgsCoordinateReferenceSystem &destination,
const QgsCoordinateTransformContext &context,
const QgsCoordinateReferenceSystem &destinationCrs,
const QgsCoordinateTransformContext &transformContext,
double mapUnitsPerPixel,
const QgsRectangle &extent,
QgsRasterBlockFeedback *feedback = 0
) /Factory/;
%Docstring
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 layer: mesh layer
:param datasetIndex: index from layer defining group and dataset (time) to export
:param destination: destination/map CRS. Used to create triangular mesh from native mesh
:param context: Transform context to transform layer CRS to destination CRS
:param destinationCrs: destination/map CRS. Used to create triangular mesh from native mesh
:param transformContext: Transform context to transform layer CRS to destination CRS
:param mapUnitsPerPixel: map units per pixel for block
:param extent: extent of block in destination CRS
:param feedback: optional raster feedback object for cancelation/preview
Expand Down
6 changes: 3 additions & 3 deletions src/core/mesh/qgsmeshlayerinterpolator.cpp
Expand Up @@ -154,8 +154,8 @@ QgsRasterBlock *QgsMeshLayerInterpolator::block( int, const QgsRectangle &extent
QgsRasterBlock *QgsMeshUtils::exportRasterBlock(
const QgsMeshLayer &layer,
const QgsMeshDatasetIndex &datasetIndex,
const QgsCoordinateReferenceSystem &destination,
const QgsCoordinateTransformContext &context,
const QgsCoordinateReferenceSystem &destinationCrs,
const QgsCoordinateTransformContext &transformContext,
double mapUnitsPerPixel,
const QgsRectangle &extent,
QgsRasterBlockFeedback *feedback )
Expand All @@ -176,7 +176,7 @@ QgsRasterBlock *QgsMeshUtils::exportRasterBlock(
widthPixel,
heightPixel,
0 );
QgsCoordinateTransform transform( layer.crs(), destination, context );
QgsCoordinateTransform transform( layer.crs(), destinationCrs, transformContext );

QgsRenderContext renderContext;
renderContext.setCoordinateTransform( transform );
Expand Down
11 changes: 7 additions & 4 deletions src/core/mesh/qgsmeshlayerinterpolator.h
Expand Up @@ -84,10 +84,13 @@ 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 layer mesh layer
* \param datasetIndex index from layer defining group and dataset (time) to export
* \param destination destination/map CRS. Used to create triangular mesh from native mesh
* \param context Transform context to transform layer CRS to destination CRS
* \param destinationCrs destination/map CRS. Used to create triangular mesh from native mesh
* \param transformContext Transform context to transform layer CRS to destination CRS
* \param mapUnitsPerPixel map units per pixel for block
* \param extent extent of block in destination CRS
* \param feedback optional raster feedback object for cancelation/preview
Expand All @@ -98,8 +101,8 @@ namespace QgsMeshUtils
CORE_EXPORT QgsRasterBlock *exportRasterBlock(
const QgsMeshLayer &layer,
const QgsMeshDatasetIndex &datasetIndex,
const QgsCoordinateReferenceSystem &destination,
const QgsCoordinateTransformContext &context,
const QgsCoordinateReferenceSystem &destinationCrs,
const QgsCoordinateTransformContext &transformContext,
double mapUnitsPerPixel,
const QgsRectangle &extent,
QgsRasterBlockFeedback *feedback = nullptr
Expand Down

0 comments on commit 1b11ba4

Please sign in to comment.