Skip to content
Permalink
Browse files

Remove unused functions

  • Loading branch information
pblottiere committed Jan 10, 2019
1 parent d67875f commit f636147fbb81c0f393f1ca3ece0421ef08fdb34d
Showing with 0 additions and 46 deletions.
  1. +0 −31 src/server/services/wms/qgswmsutils.cpp
  2. +0 −15 src/server/services/wms/qgswmsutils.h
@@ -103,16 +103,6 @@ namespace QgsWms
return UNKN;
}

void readLayersAndStyles( const QgsServerRequest::Parameters &parameters, QStringList &layersList, QStringList &stylesList )
{
//get layer and style lists from the parameters trying LAYERS and LAYER as well as STYLE and STYLES for GetLegendGraphic compatibility
layersList = parameters.value( QStringLiteral( "LAYER" ) ).split( ',', QString::SkipEmptyParts );
layersList = layersList + parameters.value( QStringLiteral( "LAYERS" ) ).split( ',', QString::SkipEmptyParts );
stylesList = parameters.value( QStringLiteral( "STYLE" ) ).split( ',', QString::SkipEmptyParts );
stylesList = stylesList + parameters.value( QStringLiteral( "STYLES" ) ).split( ',', QString::SkipEmptyParts );
}


// Write image response
void writeImage( QgsServerResponse &response, QImage &img, const QString &formatStr,
int imageQuality )
@@ -180,25 +170,4 @@ namespace QgsWms
QString( "Output format '%1' is not supported in the GetMap request" ).arg( formatStr ) );
}
}

QgsRectangle parseBbox( const QString &bboxStr )
{
QStringList lst = bboxStr.split( ',' );
if ( lst.count() != 4 )
return QgsRectangle();

double d[4];
bool ok;
for ( int i = 0; i < 4; i++ )
{
lst[i].replace( ' ', '+' );
d[i] = lst[i].toDouble( &ok );
if ( !ok )
return QgsRectangle();
}
return QgsRectangle( d[0], d[1], d[2], d[3] );
}

} // namespace QgsWms


@@ -67,21 +67,6 @@ namespace QgsWms
*/
void writeImage( QgsServerResponse &response, QImage &img, const QString &formatStr,
int imageQuality = -1 );

/**
* Parse bbox parameter
* \param bboxstr the bbox string as comma separated values
* \returns QgsRectangle
*
* If the parsing fail then an empty bbox is returned
*/
QgsRectangle parseBbox( const QString &bboxstr );

/**
* Reads the layers and style lists from the parameters LAYERS and STYLES
*/
void readLayersAndStyles( const QgsServerRequest::Parameters &parameters, QStringList &layersList, QStringList &stylesList );

} // namespace QgsWms

#endif

0 comments on commit f636147

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