"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core/qgsgml.cpp" between
QGIS-final-3_10_11.tar.gz and QGIS-final-3_10_12.tar.gz

About: QGIS (Quantum GIS) is a Geographic Information System that supports vector, raster, and database formats. Long-term release (3.10.x series).

qgsgml.cpp  (QGIS-final-3_10_11):qgsgml.cpp  (QGIS-final-3_10_12)
skipping to change at line 504 skipping to change at line 504
bool isGeom = false; bool isGeom = false;
if ( parseMode == Geometry || parseMode == Coordinate || parseMode == PosList || if ( parseMode == Geometry || parseMode == Coordinate || parseMode == PosList ||
parseMode == MultiPoint || parseMode == MultiLine || parseMode == MultiPo lygon ) parseMode == MultiPoint || parseMode == MultiLine || parseMode == MultiPo lygon )
{ {
mGeometryString.append( "<", 1 ); mGeometryString.append( "<", 1 );
mGeometryString.append( pszLocalName, localNameLen ); mGeometryString.append( pszLocalName, localNameLen );
mGeometryString.append( " ", 1 ); mGeometryString.append( " ", 1 );
for ( const XML_Char **attrIter = attr; attrIter && *attrIter; attrIter += 2 ) for ( const XML_Char **attrIter = attr; attrIter && *attrIter; attrIter += 2 )
{ {
mGeometryString.append( attrIter[0] ); const size_t nAttrLen = strlen( attrIter[0] );
const size_t GML32_NAMESPACE_LEN = strlen( GML32_NAMESPACE );
const size_t GML_NAMESPACE_LEN = strlen( GML_NAMESPACE );
if ( nAttrLen > GML32_NAMESPACE_LEN &&
attrIter[0][GML32_NAMESPACE_LEN] == '?' &&
memcmp( attrIter[0], GML32_NAMESPACE, GML32_NAMESPACE_LEN ) == 0 )
{
mGeometryString.append( "gml:" );
mGeometryString.append( attrIter[0] + GML32_NAMESPACE_LEN + 1 );
}
else if ( nAttrLen > GML_NAMESPACE_LEN &&
attrIter[0][GML_NAMESPACE_LEN] == '?' &&
memcmp( attrIter[0], GML_NAMESPACE, GML_NAMESPACE_LEN ) == 0 )
{
mGeometryString.append( "gml:" );
mGeometryString.append( attrIter[0] + GML_NAMESPACE_LEN + 1 );
}
else
{
mGeometryString.append( attrIter[0] );
}
mGeometryString.append( "=\"", 2 ); mGeometryString.append( "=\"", 2 );
mGeometryString.append( attrIter[1] ); mGeometryString.append( attrIter[1] );
mGeometryString.append( "\" ", 2 ); mGeometryString.append( "\" ", 2 );
} }
mGeometryString.append( ">", 1 ); mGeometryString.append( ">", 1 );
} }
if ( isGMLNS && LOCALNAME_EQUALS( "coordinates" ) ) if ( isGMLNS && LOCALNAME_EQUALS( "coordinates" ) )
{ {
skipping to change at line 885 skipping to change at line 905
setAttribute( mAttributeName, mStringCash ); setAttribute( mAttributeName, mStringCash );
} }
else if ( parseMode == Geometry && else if ( parseMode == Geometry &&
localNameLen == static_cast<int>( mGeometryAttributeUTF8Len ) && localNameLen == static_cast<int>( mGeometryAttributeUTF8Len ) &&
memcmp( pszLocalName, mGeometryAttributePtr, localNameLen ) == 0 ) memcmp( pszLocalName, mGeometryAttributePtr, localNameLen ) == 0 )
{ {
mParseModeStack.pop(); mParseModeStack.pop();
if ( mFoundUnhandledGeometryElement ) if ( mFoundUnhandledGeometryElement )
{ {
gdal::ogr_geometry_unique_ptr hGeom( OGR_G_CreateFromGML( mGeometryString. c_str() ) ); gdal::ogr_geometry_unique_ptr hGeom( OGR_G_CreateFromGML( mGeometryString. c_str() ) );
//QgsDebugMsg( QStringLiteral("for OGR: %1 -> %2").arg(mGeometryString.c_s tr()).arg(hGeom != nullptr));
if ( hGeom ) if ( hGeom )
{ {
const int wkbSize = OGR_G_WkbSize( hGeom.get() ); const int wkbSize = OGR_G_WkbSize( hGeom.get() );
unsigned char *pabyBuffer = new unsigned char[ wkbSize ]; unsigned char *pabyBuffer = new unsigned char[ wkbSize ];
OGR_G_ExportToIsoWkb( hGeom.get(), wkbNDR, pabyBuffer ); OGR_G_ExportToIsoWkb( hGeom.get(), wkbNDR, pabyBuffer );
QgsGeometry g; QgsGeometry g;
g.fromWkb( pabyBuffer, wkbSize ); g.fromWkb( pabyBuffer, wkbSize );
if ( mInvertAxisOrientation ) if ( mInvertAxisOrientation )
{ {
g.transform( QTransform( 0, 1, 1, 0, 0, 0 ) ); g.transform( QTransform( 0, 1, 1, 0, 0, 0 ) );
 End of changes. 2 change blocks. 
1 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)