Skip to content

Commit

Permalink
Remove namespace prefix from typename in QgsGml
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Feb 21, 2013
1 parent a788b0d commit ee4cb3d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/core/qgsgml.cpp
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

0 comments on commit ee4cb3d

Please sign in to comment.