Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Feb 26, 2019
1 parent d67875f commit f636147
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
31 changes: 0 additions & 31 deletions src/server/services/wms/qgswmsutils.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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


15 changes: 0 additions & 15 deletions src/server/services/wms/qgswmsutils.h
Expand Up @@ -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
Expand Down

0 comments on commit f636147

Please sign in to comment.