mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-11 16:06:04 -06:00
#4819 Export correct UTM coordinates.
This commit is contained in:
parent
847bd0736a
commit
acddb4a156
@ -182,7 +182,10 @@ void RicExportContourMapToAsciiFeature::writeContourMapToStream( QTextStream&
|
||||
|
||||
formatter.header( header );
|
||||
|
||||
cvf::Vec2ui numVerticesIJ = contourMapProjection->numberOfVerticesIJ();
|
||||
cvf::Vec2ui numVerticesIJ = contourMapProjection->numberOfVerticesIJ();
|
||||
std::vector<double> xVertexPositions = contourMapProjection->xVertexPositions();
|
||||
std::vector<double> yVertexPositions = contourMapProjection->yVertexPositions();
|
||||
|
||||
for ( unsigned int j = 0; j < numVerticesIJ.y(); j++ )
|
||||
{
|
||||
for ( unsigned int i = 0; i < numVerticesIJ.x(); i++ )
|
||||
@ -190,8 +193,16 @@ void RicExportContourMapToAsciiFeature::writeContourMapToStream( QTextStream&
|
||||
double value = contourMapProjection->valueAtVertex( i, j );
|
||||
if ( !( std::isinf( value ) && excludeUndefinedValues ) )
|
||||
{
|
||||
formatter.add( static_cast<int>( i ) );
|
||||
formatter.add( static_cast<int>( j ) );
|
||||
double x = xVertexPositions.at( i );
|
||||
double y = yVertexPositions.at( j );
|
||||
if ( !exportLocalCoordinates )
|
||||
{
|
||||
x += contourMapProjection->origin3d().x();
|
||||
y += contourMapProjection->origin3d().y();
|
||||
}
|
||||
|
||||
formatter.add( x );
|
||||
formatter.add( y );
|
||||
formatter.add( value );
|
||||
formatter.rowCompleted();
|
||||
}
|
||||
|
@ -110,10 +110,6 @@ public:
|
||||
void setPickPoint( cvf::Vec2d globalPickPoint );
|
||||
cvf::Vec3d origin3d() const;
|
||||
|
||||
size_t cellIndexFromIJ( uint i, uint j ) const;
|
||||
size_t vertexIndexFromIJ( uint i, uint j ) const;
|
||||
cvf::Vec2d origin2d() const;
|
||||
|
||||
std::vector<double> xVertexPositions() const;
|
||||
std::vector<double> yVertexPositions() const;
|
||||
|
||||
@ -189,10 +185,13 @@ protected:
|
||||
|
||||
// Cell index and position conversion
|
||||
std::vector<CellIndexAndResult> cellsAtIJ( uint i, uint j ) const;
|
||||
size_t cellIndexFromIJ( uint i, uint j ) const;
|
||||
size_t vertexIndexFromIJ( uint i, uint j ) const;
|
||||
cvf::Vec2ui ijFromVertexIndex( size_t gridIndex ) const;
|
||||
cvf::Vec2ui ijFromCellIndex( size_t mapIndex ) const;
|
||||
cvf::Vec2ui ijFromLocalPos( const cvf::Vec2d& localPos2d ) const;
|
||||
cvf::Vec2d cellCenterPosition( uint i, uint j ) const;
|
||||
cvf::Vec2d origin2d() const;
|
||||
|
||||
cvf::Vec2ui calculateMapSize() const;
|
||||
double gridEdgeOffset() const;
|
||||
|
Loading…
Reference in New Issue
Block a user