mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-26 00:08:20 -04:00
WCS extent and save as fix
This commit is contained in:
parent
e8061c7fea
commit
3cb46692b5
@ -251,10 +251,10 @@ void QgsRasterLayerSaveAsDialog::setOutputExtent( const QgsRectangle& r, const Q
|
||||
extent = ct.transformBoundingBox( r );
|
||||
}
|
||||
|
||||
mXMinLineEdit->setText( QString::number( extent.xMinimum() ) );
|
||||
mXMaxLineEdit->setText( QString::number( extent.xMaximum() ) );
|
||||
mYMinLineEdit->setText( QString::number( extent.yMinimum() ) );
|
||||
mYMaxLineEdit->setText( QString::number( extent.yMaximum() ) );
|
||||
mXMinLineEdit->setText( QgsRasterInterface::printValue( extent.xMinimum() ) );
|
||||
mXMaxLineEdit->setText( QgsRasterInterface::printValue( extent.xMaximum() ) );
|
||||
mYMinLineEdit->setText( QgsRasterInterface::printValue( extent.yMinimum() ) );
|
||||
mYMaxLineEdit->setText( QgsRasterInterface::printValue( extent.yMaximum() ) );
|
||||
|
||||
mExtentState = state;
|
||||
extentChanged();
|
||||
|
@ -762,6 +762,7 @@ bool QgsWcsCapabilities::parseDescribeCoverageDom10( QByteArray const &xml, QgsW
|
||||
QList<int> high = parseInts( domElementText( gridElement, "limits.GridEnvelope.high" ) );
|
||||
if ( low.size() == 2 && high.size() == 2 )
|
||||
{
|
||||
// low/high are indexes in grid -> size is hight - low + 1
|
||||
double width = high[0] - low[0] + 1;
|
||||
double height = high[1] - low[1] + 1;
|
||||
if ( width > 0 && height > 0 )
|
||||
|
@ -171,11 +171,14 @@ QgsWcsProvider::QgsWcsProvider( QString const &uri )
|
||||
// in that case we continue without CRS and user is asked for it
|
||||
//if ( mCoverageCrs.isEmpty() ) return;
|
||||
|
||||
// Native size
|
||||
mWidth = mCoverageSummary.width;
|
||||
mHeight = mCoverageSummary.height;
|
||||
mHasSize = mCoverageSummary.hasSize;
|
||||
|
||||
QgsDebugMsg( QString( "mWidth = %1 mHeight = %2" ).arg( mWidth ).arg( mHeight ) ) ;
|
||||
QgsDebugMsg( QString( "mWidth = %1 mHeight = %2" ).arg( mWidth ).arg( mHeight ) );
|
||||
|
||||
// TODO: Consider if/how to recalculate mWidth, mHeight if non native CRS is used
|
||||
|
||||
if ( !calculateExtent() )
|
||||
{
|
||||
@ -1288,7 +1291,8 @@ bool QgsWcsProvider::calculateExtent()
|
||||
// Prefer to use extent from capabilities / coverage description because
|
||||
// transformation from WGS84 increases the extent
|
||||
mCoverageExtent = mCoverageSummary.boundingBoxes.value( mCoverageCrs );
|
||||
if ( !mCoverageExtent.isEmpty() && !mCoverageExtent.isFinite() )
|
||||
QgsDebugMsg( "mCoverageCrs = " + mCoverageCrs + " mCoverageExtent = " + mCoverageExtent.toString() );
|
||||
if ( !mCoverageExtent.isEmpty() && mCoverageExtent.isFinite() )
|
||||
{
|
||||
QgsDebugMsg( "mCoverageExtent = " + mCoverageExtent.toString() );
|
||||
return true;
|
||||
@ -1308,9 +1312,11 @@ bool QgsWcsProvider::calculateExtent()
|
||||
//QgsDebugMsg( "qgisSrsDest: " + qgisSrsDest.toWkt() );
|
||||
|
||||
mCoordinateTransform = new QgsCoordinateTransform( qgisSrsSource, qgisSrsDest );
|
||||
|
||||
}
|
||||
|
||||
QgsDebugMsg( "mCoverageSummary.wgs84BoundingBox= " + mCoverageSummary.wgs84BoundingBox.toString() );
|
||||
|
||||
// Convert to the user's CRS as required
|
||||
try
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user