Skip to content

Commit

Permalink
GML parser boundedBy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Apr 9, 2013
1 parent 9a0dffe commit 487c424
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/qgsgml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ void QgsGml::startElement( const XML_Char* el, const XML_Char** attr )
{
mParseModeStack.push( QgsGml::geometry );
}
else if ( mParseModeStack.size() == 0 && elementName == GML_NAMESPACE + NS_SEPARATOR + "boundedBy" )
//else if ( mParseModeStack.size() == 0 && elementName == GML_NAMESPACE + NS_SEPARATOR + "boundedBy" )
else if ( elementName == GML_NAMESPACE + NS_SEPARATOR + "boundedBy" )
{
mParseModeStack.push( QgsGml::boundingBox );
}
Expand Down Expand Up @@ -240,7 +241,7 @@ void QgsGml::startElement( const XML_Char* el, const XML_Char** attr )
{
mParseModeStack.push( QgsGml::multiPolygon );
}
else if ( mParseModeStack.size() == 1 && mParseModeStack.top() == QgsGml::feature && mThematicAttributes.find( localName ) != mThematicAttributes.end() )
else if (( mParseModeStack.size() > 0 ) && ( mParseModeStack.top() == QgsGml::feature ) && ( mThematicAttributes.find( localName ) != mThematicAttributes.end() ) )
{
mParseModeStack.push( QgsGml::attribute );
mAttributeName = localName;
Expand Down Expand Up @@ -298,7 +299,7 @@ void QgsGml::endElement( const XML_Char* el )
mParseModeStack.pop();
}
}
else if ( elementName == GML_NAMESPACE + NS_SEPARATOR + "boundedBy" )
else if ( !mParseModeStack.empty() && mParseModeStack.top() == QgsGml::boundingBox && elementName == GML_NAMESPACE + NS_SEPARATOR + "boundedBy" )
{
//create bounding box from mStringCash
if ( createBBoxFromCoordinateString( mCurrentExtent, mStringCash ) != 0 )
Expand Down

0 comments on commit 487c424

Please sign in to comment.