Skip to content
Permalink
Browse files

Try special treatment for arcgis

  • Loading branch information
elpaso committed Oct 15, 2020
1 parent 6ec7919 commit f29f86fab41531242ea3abc4a479b08df440241a
@@ -879,12 +879,11 @@ bool QgsWFSProvider::addFeatures( QgsFeatureList &flist, Flags flags )
}
QDomElement gmlElem;
// WFS 1.1.0 uses preferably GML 3, but ESRI mapserver in 2020 doesn't like it so we stick to GML2
/*
if ( mShared->mWFSVersion == QStringLiteral( "1.1.0" ) )
if ( mShared->mWFSVersion == QStringLiteral( "1.1.0" ) && ! mShared->mServerPrefersCoordinatesForTransactions_1_1 )
{
gmlElem = QgsOgcUtils::geometryToGML( the_geom, transactionDoc, QLatin1String( "GML3" ) );
}
else */
else
{
gmlElem = QgsOgcUtils::geometryToGML( the_geom, transactionDoc, QLatin1String( "GML2" ) );
}
@@ -1057,11 +1056,11 @@ bool QgsWFSProvider::changeGeometryValues( const QgsGeometryMap &geometry_map )
QDomElement valueElem = transactionDoc.createElementNS( QgsWFSConstants::WFS_NAMESPACE, QStringLiteral( "Value" ) );
QDomElement gmlElem;
// WFS 1.1.0 uses preferably GML 3, but ESRI mapserver in 2020 doesn't like it so we stick to GML2
/* if ( mShared->mWFSVersion == QStringLiteral( "1.1.0" ) )
if ( mShared->mWFSVersion == QStringLiteral( "1.1.0" ) && ! mShared->mServerPrefersCoordinatesForTransactions_1_1 )
{
gmlElem = QgsOgcUtils::geometryToGML( geomIt.value(), transactionDoc, QLatin1String( "GML3" ) );
}
else */
else
{
gmlElem = QgsOgcUtils::geometryToGML( geomIt.value(), transactionDoc, QLatin1String( "GML2" ) );
}
@@ -27,6 +27,7 @@ QgsWFSSharedData::QgsWFSSharedData( const QString &uri )
, mURI( uri )
{
mHideProgressDialog = mURI.hideDownloadProgressDialog();
mServerPrefersCoordinatesForTransactions_1_1 = uri.contains( QLatin1String( "/arcgis/" ), Qt::CaseSensitivity::CaseInsensitive );
}

QgsWFSSharedData::~QgsWFSSharedData()
@@ -89,6 +89,11 @@ class QgsWFSSharedData : public QObject, public QgsBackgroundCachedSharedData
*/
bool mGetFeatureEPSGDotHonoursEPSGOrder = false;

/**
* Server (typically ESRI) does not like pos and posList, and wants "coordinates" for WFS 1.1 transactions
*/
bool mServerPrefersCoordinatesForTransactions_1_1 = false;

//! Geometry type of the features in this layer
QgsWkbTypes::Type mWKBType = QgsWkbTypes::Unknown;

0 comments on commit f29f86f

Please sign in to comment.
You can’t perform that action at this time.