diff --git a/src/analysis/interpolation/qgsgridfilewriter.cpp b/src/analysis/interpolation/qgsgridfilewriter.cpp index 92b04fd0a6a..422d1cfaf8e 100644 --- a/src/analysis/interpolation/qgsgridfilewriter.cpp +++ b/src/analysis/interpolation/qgsgridfilewriter.cpp @@ -100,7 +100,7 @@ int QgsGridFileWriter::writeFile( bool showProgressDialog ) // create prj file QgsInterpolator::LayerData ld; - ld = mInterpolator->mLayerData.first(); + ld = mInterpolator->layerData().first(); QgsVectorLayer* vl = ld.vectorLayer; QString crs = vl->crs().toWkt(); QFileInfo fi( mOutputFilePath ); diff --git a/src/analysis/interpolation/qgsinterpolator.h b/src/analysis/interpolation/qgsinterpolator.h index 4f2ca2b8700..07e56b15517 100644 --- a/src/analysis/interpolation/qgsinterpolator.h +++ b/src/analysis/interpolation/qgsinterpolator.h @@ -64,6 +64,8 @@ class ANALYSIS_EXPORT QgsInterpolator @return 0 in case of success*/ virtual int interpolatePoint( double x, double y, double& result ) = 0; + const QList& layerData() const { return mLayerData; } + protected: /**Caches the vertex and value data from the provider. All the vertex data will be held in virtual memory @@ -86,8 +88,6 @@ class ANALYSIS_EXPORT QgsInterpolator @param attributeValue the attribute value for interpolation (if not interpolated from z-coordinate) @return 0 in case of success*/ int addVerticesToCache( QgsGeometry* geom, bool zCoord, double attributeValue ); - - friend class QgsGridFileWriter; }; #endif