Showing with 13 additions and 8 deletions.
  1. +8 −4 src/core/qgsgml.cpp
  2. +5 −4 src/providers/wfs/qgswfsprovider.cpp
12 changes: 8 additions & 4 deletions src/core/qgsgml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ QgsGml::QgsGml(
}

mEndian = QgsApplication::endian();

int index = mTypeName.indexOf( ":" );
if ( index != -1 && index < mTypeName.length() )
{
mTypeName = mTypeName.mid( index + 1 );
}
}

QgsGml::~QgsGml()
Expand Down Expand Up @@ -187,8 +193,7 @@ void QgsGml::startElement( const XML_Char* el, const XML_Char** attr )
{
mParseModeStack.push( QgsGml::boundingBox );
}
else if ( elementName == GML_NAMESPACE + NS_SEPARATOR + "featureMember" )
//else if ( localName == mTypeName )
else if ( localName == mTypeName )
{
mCurrentFeature = new QgsFeature( mFeatureCount );
QgsAttributes attributes( mThematicAttributes.size() ); //add empty attributes
Expand Down Expand Up @@ -306,8 +311,7 @@ void QgsGml::endElement( const XML_Char* el )
mParseModeStack.pop();
}
}
//else if ( localName == mTypeName )
else if ( elementName == GML_NAMESPACE + NS_SEPARATOR + "featureMember" )
else if ( localName == mTypeName )
{
if ( mCurrentWKBSize > 0 )
{
Expand Down
9 changes: 5 additions & 4 deletions src/providers/wfs/qgswfsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,10 +847,11 @@ int QgsWFSProvider::describeFeatureTypeGET( const QString& uri, QString& geometr
}

mNetworkRequestFinished = false;

QString describeFeatureUri = uri;
describeFeatureUri.replace( QString( "GetFeature" ), QString( "DescribeFeatureType" ) );
QNetworkRequest request( describeFeatureUri );
QUrl describeFeatureUrl( uri );
describeFeatureUrl.removeQueryItem( "SRSNAME" );
describeFeatureUrl.removeQueryItem( "REQUEST" );
describeFeatureUrl.addQueryItem( "REQUEST", "DescribeFeatureType" );
QNetworkRequest request( describeFeatureUrl.toString() );
QNetworkReply* reply = QgsNetworkAccessManager::instance()->get( request );
connect( reply, SIGNAL( finished() ), this, SLOT( networkRequestFinished() ) );
while ( !mNetworkRequestFinished )
Expand Down