Skip to content

Commit 5091408

Browse files
author
gcontreras
committed
Fix for Ticket #1881. This allows to change the srs for wms based in geoserver.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11460 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b227712 commit 5091408

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/gui/qgsprojectionselector.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,19 @@ QString QgsProjectionSelector::ogcWmsCrsFilterAsSqlExpression( QSet<QString> * c
195195
// iterate through all incoming CRSs
196196

197197
QSet<QString>::const_iterator i = crsFilter->begin();
198+
QRegExp rx( "[^0-9]" );
198199
while ( i != crsFilter->end() )
199200
{
200201
QStringList parts = i->split( ":" );
201202

202203
if ( parts.at( 0 ) == "EPSG" && parts.size() >= 2 )
203204
{
204-
epsgParts.push_back( parts.at( 1 ) );
205+
//this line is neccesary to make change projection work
206+
//with geoserver because for some reason geoserver returns
207+
//EPSG:WGS84(DD) as the first srs and is invalid because the
208+
//epsg database expect an integer string
209+
if(rx.indexIn(parts.at( 1 )) == -1)
210+
epsgParts.push_back( parts.at( 1 ) );
205211
}
206212

207213
++i;

0 commit comments

Comments
 (0)