mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-09 00:08:52 -04:00
non-POD static ([class name goes here]) [-Wclazy-non-pod-global-static]
This commit is contained in:
parent
29c2af9add
commit
e17f99c5c3
@ -26,8 +26,6 @@
|
|||||||
const int QgsClassificationMethod::MAX_PRECISION = 15;
|
const int QgsClassificationMethod::MAX_PRECISION = 15;
|
||||||
const int QgsClassificationMethod::MIN_PRECISION = -6;
|
const int QgsClassificationMethod::MIN_PRECISION = -6;
|
||||||
|
|
||||||
static const QRegularExpression RE_TRAILING_ZEROES = QRegularExpression( "[.,]?0*$" );
|
|
||||||
static const QRegularExpression RE_NEGATIVE_ZERO = QRegularExpression( "^\\-0(?:[.,]0*)?$" );
|
|
||||||
|
|
||||||
QList<double> QgsClassificationMethod::rangesToBreaks( const QList<QgsClassificationRange> &classes )
|
QList<double> QgsClassificationMethod::rangesToBreaks( const QList<QgsClassificationRange> &classes )
|
||||||
{
|
{
|
||||||
@ -141,6 +139,8 @@ void QgsClassificationMethod::setLabelPrecision( int precision )
|
|||||||
|
|
||||||
QString QgsClassificationMethod::formatNumber( double value ) const
|
QString QgsClassificationMethod::formatNumber( double value ) const
|
||||||
{
|
{
|
||||||
|
static const QRegularExpression RE_TRAILING_ZEROES = QRegularExpression( "[.,]?0*$" );
|
||||||
|
static const QRegularExpression RE_NEGATIVE_ZERO = QRegularExpression( "^\\-0(?:[.,]0*)?$" );
|
||||||
if ( mLabelPrecision > 0 )
|
if ( mLabelPrecision > 0 )
|
||||||
{
|
{
|
||||||
QString valueStr = QLocale().toString( value, 'f', mLabelPrecision );
|
QString valueStr = QLocale().toString( value, 'f', mLabelPrecision );
|
||||||
|
@ -82,8 +82,8 @@ email : sherman at mrcc.com
|
|||||||
#define OGR_F_IsFieldSetAndNotNull OGR_F_IsFieldSet
|
#define OGR_F_IsFieldSetAndNotNull OGR_F_IsFieldSet
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const QString TEXT_PROVIDER_KEY = QStringLiteral( "ogr" );
|
static constexpr QLatin1String TEXT_PROVIDER_KEY() { return QLatin1String( "ogr" ); }
|
||||||
static const QString TEXT_PROVIDER_DESCRIPTION = QStringLiteral( "OGR data provider" );
|
static constexpr QLatin1String TEXT_PROVIDER_DESCRIPTION() { return QLatin1String( "OGR data provider" ); }
|
||||||
|
|
||||||
static OGRwkbGeometryType ogrWkbGeometryTypeFromName( const QString &typeName );
|
static OGRwkbGeometryType ogrWkbGeometryTypeFromName( const QString &typeName );
|
||||||
|
|
||||||
@ -2785,17 +2785,17 @@ void QgsOgrProvider::computeCapabilities()
|
|||||||
|
|
||||||
QString QgsOgrProvider::name() const
|
QString QgsOgrProvider::name() const
|
||||||
{
|
{
|
||||||
return TEXT_PROVIDER_KEY;
|
return TEXT_PROVIDER_KEY();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QgsOgrProvider::providerKey()
|
QString QgsOgrProvider::providerKey()
|
||||||
{
|
{
|
||||||
return TEXT_PROVIDER_KEY;
|
return TEXT_PROVIDER_KEY();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QgsOgrProvider::description() const
|
QString QgsOgrProvider::description() const
|
||||||
{
|
{
|
||||||
return TEXT_PROVIDER_DESCRIPTION;
|
return TEXT_PROVIDER_DESCRIPTION();
|
||||||
} // QgsOgrProvider::description()
|
} // QgsOgrProvider::description()
|
||||||
|
|
||||||
|
|
||||||
@ -6694,7 +6694,7 @@ void QgsOgrProviderMetadata::cleanupProvider()
|
|||||||
|
|
||||||
|
|
||||||
QgsOgrProviderMetadata::QgsOgrProviderMetadata()
|
QgsOgrProviderMetadata::QgsOgrProviderMetadata()
|
||||||
: QgsProviderMetadata( TEXT_PROVIDER_KEY, TEXT_PROVIDER_DESCRIPTION )
|
: QgsProviderMetadata( TEXT_PROVIDER_KEY(), TEXT_PROVIDER_DESCRIPTION() )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,11 +27,11 @@
|
|||||||
#include <sqlite3.h>
|
#include <sqlite3.h>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
const QString AS_JOINFIELD = "ASPK";
|
static constexpr QLatin1String AS_JOINFIELD() { return QLatin1String( "ASPK" ); }
|
||||||
const QString AS_EXTENSION = "qgd";
|
static constexpr QLatin1String AS_EXTENSION() { return QLatin1String( "qgd" ); }
|
||||||
const QString AS_JOINPREFIX = "auxiliary_storage_";
|
static constexpr QLatin1String AS_JOINPREFIX() { return QLatin1String( "auxiliary_storage_" ); }
|
||||||
|
typedef QVector<QgsPalLayerSettings::Property> PalPropertyList;
|
||||||
const QVector<QgsPalLayerSettings::Property> palHiddenProperties
|
Q_GLOBAL_STATIC_WITH_ARGS( PalPropertyList, palHiddenProperties, (
|
||||||
{
|
{
|
||||||
QgsPalLayerSettings::PositionX,
|
QgsPalLayerSettings::PositionX,
|
||||||
QgsPalLayerSettings::PositionY,
|
QgsPalLayerSettings::PositionY,
|
||||||
@ -57,7 +57,7 @@ const QVector<QgsPalLayerSettings::Property> palHiddenProperties
|
|||||||
QgsPalLayerSettings::AlwaysShow,
|
QgsPalLayerSettings::AlwaysShow,
|
||||||
QgsPalLayerSettings::CalloutDraw,
|
QgsPalLayerSettings::CalloutDraw,
|
||||||
QgsPalLayerSettings::LabelAllParts
|
QgsPalLayerSettings::LabelAllParts
|
||||||
};
|
} ) )
|
||||||
|
|
||||||
//
|
//
|
||||||
// QgsAuxiliaryLayer
|
// QgsAuxiliaryLayer
|
||||||
@ -71,9 +71,9 @@ QgsAuxiliaryLayer::QgsAuxiliaryLayer( const QString &pkField, const QString &fil
|
|||||||
, mLayer( vlayer )
|
, mLayer( vlayer )
|
||||||
{
|
{
|
||||||
// init join info
|
// init join info
|
||||||
mJoinInfo.setPrefix( AS_JOINPREFIX );
|
mJoinInfo.setPrefix( AS_JOINPREFIX() );
|
||||||
mJoinInfo.setJoinLayer( this );
|
mJoinInfo.setJoinLayer( this );
|
||||||
mJoinInfo.setJoinFieldName( AS_JOINFIELD );
|
mJoinInfo.setJoinFieldName( AS_JOINFIELD() );
|
||||||
mJoinInfo.setTargetFieldName( pkField );
|
mJoinInfo.setTargetFieldName( pkField );
|
||||||
mJoinInfo.setEditable( true );
|
mJoinInfo.setEditable( true );
|
||||||
mJoinInfo.setUpsertOnEdit( true );
|
mJoinInfo.setUpsertOnEdit( true );
|
||||||
@ -107,7 +107,7 @@ QgsVectorLayer *QgsAuxiliaryLayer::toSpatialLayer() const
|
|||||||
layer->startEditing();
|
layer->startEditing();
|
||||||
while ( it.nextFeature( joinFeature ) )
|
while ( it.nextFeature( joinFeature ) )
|
||||||
{
|
{
|
||||||
QString filter = QgsExpression::createFieldEqualityExpression( pkField, joinFeature.attribute( AS_JOINFIELD ) );
|
QString filter = QgsExpression::createFieldEqualityExpression( pkField, joinFeature.attribute( AS_JOINFIELD() ) );
|
||||||
|
|
||||||
QgsFeatureRequest request;
|
QgsFeatureRequest request;
|
||||||
request.setFilterExpression( filter );
|
request.setFilterExpression( filter );
|
||||||
@ -289,7 +289,8 @@ bool QgsAuxiliaryLayer::isHiddenProperty( int index ) const
|
|||||||
|
|
||||||
if ( def.origin().compare( QLatin1String( "labeling" ) ) == 0 )
|
if ( def.origin().compare( QLatin1String( "labeling" ) ) == 0 )
|
||||||
{
|
{
|
||||||
for ( const QgsPalLayerSettings::Property &p : palHiddenProperties )
|
const PalPropertyList &palProps = *palHiddenProperties();
|
||||||
|
for ( const QgsPalLayerSettings::Property &p : palProps )
|
||||||
{
|
{
|
||||||
const QString propName = QgsPalLayerSettings::propertyDefinitions()[ p ].name();
|
const QString propName = QgsPalLayerSettings::propertyDefinitions()[ p ].name();
|
||||||
if ( propName.compare( def.name() ) == 0 )
|
if ( propName.compare( def.name() ) == 0 )
|
||||||
@ -372,7 +373,7 @@ QString QgsAuxiliaryLayer::nameFromProperty( const QgsPropertyDefinition &def, b
|
|||||||
fieldName = QStringLiteral( "%1_%2" ).arg( fieldName, def.comment() );
|
fieldName = QStringLiteral( "%1_%2" ).arg( fieldName, def.comment() );
|
||||||
|
|
||||||
if ( joined )
|
if ( joined )
|
||||||
fieldName = QStringLiteral( "%1%2" ).arg( AS_JOINPREFIX, fieldName );
|
fieldName = QStringLiteral( "%1%2" ).arg( AS_JOINPREFIX(), fieldName );
|
||||||
|
|
||||||
return fieldName;
|
return fieldName;
|
||||||
}
|
}
|
||||||
@ -674,7 +675,7 @@ bool QgsAuxiliaryStorage::saveAs( const QgsProject &project )
|
|||||||
|
|
||||||
QString QgsAuxiliaryStorage::extension()
|
QString QgsAuxiliaryStorage::extension()
|
||||||
{
|
{
|
||||||
return AS_EXTENSION;
|
return AS_EXTENSION();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QgsAuxiliaryStorage::exists( const QgsProject &project )
|
bool QgsAuxiliaryStorage::exists( const QgsProject &project )
|
||||||
@ -715,7 +716,7 @@ void QgsAuxiliaryStorage::debugMsg( const QString &sql, sqlite3 *handler )
|
|||||||
|
|
||||||
bool QgsAuxiliaryStorage::createTable( const QString &type, const QString &table, sqlite3 *handler )
|
bool QgsAuxiliaryStorage::createTable( const QString &type, const QString &table, sqlite3 *handler )
|
||||||
{
|
{
|
||||||
const QString sql = QStringLiteral( "CREATE TABLE IF NOT EXISTS '%1' ( '%2' %3 )" ).arg( table, AS_JOINFIELD, type );
|
const QString sql = QStringLiteral( "CREATE TABLE IF NOT EXISTS '%1' ( '%2' %3 )" ).arg( table, AS_JOINFIELD(), type );
|
||||||
|
|
||||||
if ( !exec( sql, handler ) )
|
if ( !exec( sql, handler ) )
|
||||||
return false;
|
return false;
|
||||||
|
@ -37,138 +37,138 @@ Q_GLOBAL_STATIC( EllipsoidDefinitionCache, sDefinitionCache )
|
|||||||
|
|
||||||
static bool sDisableCache = false;
|
static bool sDisableCache = false;
|
||||||
|
|
||||||
// maps older QGIS ellipsoid acronyms to proj acronyms/names
|
|
||||||
const QMap< QString, QString > sProj6EllipsoidAcronymMap
|
|
||||||
{
|
|
||||||
{ "clrk80", "clrk80ign" },
|
|
||||||
{"Adrastea2000", "ESRI:107909"},
|
|
||||||
{"Amalthea2000", "ESRI:107910"},
|
|
||||||
{"Ananke2000", "ESRI:107911"},
|
|
||||||
{"Ariel2000", "ESRI:107945"},
|
|
||||||
{"Atlas2000", "ESRI:107926"},
|
|
||||||
{"Belinda2000", "ESRI:107946"},
|
|
||||||
{"Bianca2000", "ESRI:107947"},
|
|
||||||
{"Callisto2000", "ESRI:107912"},
|
|
||||||
{"Calypso2000", "ESRI:107927"},
|
|
||||||
{"Carme2000", "ESRI:107913"},
|
|
||||||
{"Charon2000", "ESRI:107970"},
|
|
||||||
{"Cordelia2000", "ESRI:107948"},
|
|
||||||
{"Cressida2000", "ESRI:107949"},
|
|
||||||
{"Deimos2000", "ESRI:107906"},
|
|
||||||
{"Desdemona2000", "ESRI:107950"},
|
|
||||||
{"Despina2000", "ESRI:107961"},
|
|
||||||
{"Dione2000", "ESRI:107928"},
|
|
||||||
{"Elara2000", "ESRI:107914"},
|
|
||||||
{"Enceladus2000", "ESRI:107929"},
|
|
||||||
{"Epimetheus2000", "ESRI:107930"},
|
|
||||||
{"Europa2000", "ESRI:107915"},
|
|
||||||
{"Galatea2000", "ESRI:107962"},
|
|
||||||
{"Ganymede2000", "ESRI:107916"},
|
|
||||||
{"Helene2000", "ESRI:107931"},
|
|
||||||
{"Himalia2000", "ESRI:107917"},
|
|
||||||
{"Hyperion2000", "ESRI:107932"},
|
|
||||||
{"Iapetus2000", "ESRI:107933"},
|
|
||||||
{"Io2000", "ESRI:107918"},
|
|
||||||
{"Janus2000", "ESRI:107934"},
|
|
||||||
{"Juliet2000", "ESRI:107951"},
|
|
||||||
{"Jupiter2000", "ESRI:107908"},
|
|
||||||
{"Larissa2000", "ESRI:107963"},
|
|
||||||
{"Leda2000", "ESRI:107919"},
|
|
||||||
{"Lysithea2000", "ESRI:107920"},
|
|
||||||
{"Mars2000", "ESRI:107905"},
|
|
||||||
{"Mercury2000", "ESRI:107900"},
|
|
||||||
{"Metis2000", "ESRI:107921"},
|
|
||||||
{"Mimas2000", "ESRI:107935"},
|
|
||||||
{"Miranda2000", "ESRI:107952"},
|
|
||||||
{"Moon2000", "ESRI:107903"},
|
|
||||||
{"Naiad2000", "ESRI:107964"},
|
|
||||||
{"Neptune2000", "ESRI:107960"},
|
|
||||||
{"Nereid2000", "ESRI:107965"},
|
|
||||||
{"Oberon2000", "ESRI:107953"},
|
|
||||||
{"Ophelia2000", "ESRI:107954"},
|
|
||||||
{"Pan2000", "ESRI:107936"},
|
|
||||||
{"Pandora2000", "ESRI:107937"},
|
|
||||||
{"Pasiphae2000", "ESRI:107922"},
|
|
||||||
{"Phobos2000", "ESRI:107907"},
|
|
||||||
{"Phoebe2000", "ESRI:107938"},
|
|
||||||
{"Pluto2000", "ESRI:107969"},
|
|
||||||
{"Portia2000", "ESRI:107955"},
|
|
||||||
{"Prometheus2000", "ESRI:107939"},
|
|
||||||
{"Proteus2000", "ESRI:107966"},
|
|
||||||
{"Puck2000", "ESRI:107956"},
|
|
||||||
{"Rhea2000", "ESRI:107940"},
|
|
||||||
{"Rosalind2000", "ESRI:107957"},
|
|
||||||
{"Saturn2000", "ESRI:107925"},
|
|
||||||
{"Sinope2000", "ESRI:107923"},
|
|
||||||
{"Telesto2000", "ESRI:107941"},
|
|
||||||
{"Tethys2000", "ESRI:107942"},
|
|
||||||
{"Thalassa2000", "ESRI:107967"},
|
|
||||||
{"Thebe2000", "ESRI:107924"},
|
|
||||||
{"Titan2000", "ESRI:107943"},
|
|
||||||
{"Titania2000", "ESRI:107958"},
|
|
||||||
{"Triton2000", "ESRI:107968"},
|
|
||||||
{"Umbriel2000", "ESRI:107959"},
|
|
||||||
{"Uranus2000", "ESRI:107944"},
|
|
||||||
{"Venus2000", "ESRI:107902"},
|
|
||||||
{"IGNF:ELG053", "EPSG:7030"},
|
|
||||||
{"IGNF:ELG052", "EPSG:7043"},
|
|
||||||
{"IGNF:ELG102", "EPSG:7043"},
|
|
||||||
{"WGS66", "ESRI:107001"},
|
|
||||||
{"plessis", "EPSG:7027"},
|
|
||||||
{"IGNF:ELG017", "EPSG:7027"},
|
|
||||||
{"mod_airy", "EPSG:7002"},
|
|
||||||
{"IGNF:ELG037", "EPSG:7019"},
|
|
||||||
{"IGNF:ELG108", "EPSG:7036"},
|
|
||||||
{"cape", "EPSG:7034"},
|
|
||||||
{"IGNF:ELG010", "EPSG:7011"},
|
|
||||||
{"IGNF:ELG003", "EPSG:7012"},
|
|
||||||
{"IGNF:ELG004", "EPSG:7008"},
|
|
||||||
{"GSK2011", "EPSG:1025"},
|
|
||||||
{"airy", "EPSG:7001"},
|
|
||||||
{"aust_SA", "EPSG:7003"},
|
|
||||||
{"bessel", "EPSG:7004"},
|
|
||||||
{"clrk66", "EPSG:7008"},
|
|
||||||
{"clrk80ign", "EPSG:7011"},
|
|
||||||
{"evrst30", "EPSG:7015"},
|
|
||||||
{"evrstSS", "EPSG:7016"},
|
|
||||||
{"evrst48", "EPSG:7018"},
|
|
||||||
{"GRS80", "EPSG:7019"},
|
|
||||||
{"helmert", "EPSG:7020"},
|
|
||||||
{"intl", "EPSG:7022"},
|
|
||||||
{"krass", "EPSG:7024"},
|
|
||||||
{"NWL9D", "EPSG:7025"},
|
|
||||||
{"WGS84", "EPSG:7030"},
|
|
||||||
{"GRS67", "EPSG:7036"},
|
|
||||||
{"WGS72", "EPSG:7043"},
|
|
||||||
{"bess_nam", "EPSG:7046"},
|
|
||||||
{"IAU76", "EPSG:7049"},
|
|
||||||
{"sphere", "EPSG:7052"},
|
|
||||||
{"hough", "EPSG:7053"},
|
|
||||||
{"evrst69", "EPSG:7056"},
|
|
||||||
{"fschr60", "ESRI:107002"},
|
|
||||||
{"fschr68", "ESRI:107003"},
|
|
||||||
{"fschr60m", "ESRI:107004"},
|
|
||||||
{"walbeck", "ESRI:107007"},
|
|
||||||
{"IGNF:ELG001", "EPSG:7022"},
|
|
||||||
{"engelis", "EPSG:7054"},
|
|
||||||
{"evrst56", "EPSG:7044"},
|
|
||||||
{"SEasia", "ESRI:107004"},
|
|
||||||
{"SGS85", "EPSG:7054"},
|
|
||||||
{"andrae", "PROJ:ANDRAE"},
|
|
||||||
{"clrk80", "EPSG:7034"},
|
|
||||||
{"CPM", "PROJ:CPM"},
|
|
||||||
{"delmbr", "PROJ:DELMBR"},
|
|
||||||
{"Earth2000", "PROJ:EARTH2000"},
|
|
||||||
{"kaula", "PROJ:KAULA"},
|
|
||||||
{"lerch", "PROJ:LERCH"},
|
|
||||||
{"MERIT", "PROJ:MERIT"},
|
|
||||||
{"mprts", "PROJ:MPRTS"},
|
|
||||||
{"new_intl", "PROJ:NEW_INTL"},
|
|
||||||
{"WGS60", "PROJ:WGS60"}
|
|
||||||
};
|
|
||||||
|
|
||||||
QgsEllipsoidUtils::EllipsoidParameters QgsEllipsoidUtils::ellipsoidParameters( const QString &e )
|
QgsEllipsoidUtils::EllipsoidParameters QgsEllipsoidUtils::ellipsoidParameters( const QString &e )
|
||||||
{
|
{
|
||||||
|
// maps older QGIS ellipsoid acronyms to proj acronyms/names
|
||||||
|
static const QMap< QString, QString > sProj6EllipsoidAcronymMap
|
||||||
|
{
|
||||||
|
{ "clrk80", "clrk80ign" },
|
||||||
|
{"Adrastea2000", "ESRI:107909"},
|
||||||
|
{"Amalthea2000", "ESRI:107910"},
|
||||||
|
{"Ananke2000", "ESRI:107911"},
|
||||||
|
{"Ariel2000", "ESRI:107945"},
|
||||||
|
{"Atlas2000", "ESRI:107926"},
|
||||||
|
{"Belinda2000", "ESRI:107946"},
|
||||||
|
{"Bianca2000", "ESRI:107947"},
|
||||||
|
{"Callisto2000", "ESRI:107912"},
|
||||||
|
{"Calypso2000", "ESRI:107927"},
|
||||||
|
{"Carme2000", "ESRI:107913"},
|
||||||
|
{"Charon2000", "ESRI:107970"},
|
||||||
|
{"Cordelia2000", "ESRI:107948"},
|
||||||
|
{"Cressida2000", "ESRI:107949"},
|
||||||
|
{"Deimos2000", "ESRI:107906"},
|
||||||
|
{"Desdemona2000", "ESRI:107950"},
|
||||||
|
{"Despina2000", "ESRI:107961"},
|
||||||
|
{"Dione2000", "ESRI:107928"},
|
||||||
|
{"Elara2000", "ESRI:107914"},
|
||||||
|
{"Enceladus2000", "ESRI:107929"},
|
||||||
|
{"Epimetheus2000", "ESRI:107930"},
|
||||||
|
{"Europa2000", "ESRI:107915"},
|
||||||
|
{"Galatea2000", "ESRI:107962"},
|
||||||
|
{"Ganymede2000", "ESRI:107916"},
|
||||||
|
{"Helene2000", "ESRI:107931"},
|
||||||
|
{"Himalia2000", "ESRI:107917"},
|
||||||
|
{"Hyperion2000", "ESRI:107932"},
|
||||||
|
{"Iapetus2000", "ESRI:107933"},
|
||||||
|
{"Io2000", "ESRI:107918"},
|
||||||
|
{"Janus2000", "ESRI:107934"},
|
||||||
|
{"Juliet2000", "ESRI:107951"},
|
||||||
|
{"Jupiter2000", "ESRI:107908"},
|
||||||
|
{"Larissa2000", "ESRI:107963"},
|
||||||
|
{"Leda2000", "ESRI:107919"},
|
||||||
|
{"Lysithea2000", "ESRI:107920"},
|
||||||
|
{"Mars2000", "ESRI:107905"},
|
||||||
|
{"Mercury2000", "ESRI:107900"},
|
||||||
|
{"Metis2000", "ESRI:107921"},
|
||||||
|
{"Mimas2000", "ESRI:107935"},
|
||||||
|
{"Miranda2000", "ESRI:107952"},
|
||||||
|
{"Moon2000", "ESRI:107903"},
|
||||||
|
{"Naiad2000", "ESRI:107964"},
|
||||||
|
{"Neptune2000", "ESRI:107960"},
|
||||||
|
{"Nereid2000", "ESRI:107965"},
|
||||||
|
{"Oberon2000", "ESRI:107953"},
|
||||||
|
{"Ophelia2000", "ESRI:107954"},
|
||||||
|
{"Pan2000", "ESRI:107936"},
|
||||||
|
{"Pandora2000", "ESRI:107937"},
|
||||||
|
{"Pasiphae2000", "ESRI:107922"},
|
||||||
|
{"Phobos2000", "ESRI:107907"},
|
||||||
|
{"Phoebe2000", "ESRI:107938"},
|
||||||
|
{"Pluto2000", "ESRI:107969"},
|
||||||
|
{"Portia2000", "ESRI:107955"},
|
||||||
|
{"Prometheus2000", "ESRI:107939"},
|
||||||
|
{"Proteus2000", "ESRI:107966"},
|
||||||
|
{"Puck2000", "ESRI:107956"},
|
||||||
|
{"Rhea2000", "ESRI:107940"},
|
||||||
|
{"Rosalind2000", "ESRI:107957"},
|
||||||
|
{"Saturn2000", "ESRI:107925"},
|
||||||
|
{"Sinope2000", "ESRI:107923"},
|
||||||
|
{"Telesto2000", "ESRI:107941"},
|
||||||
|
{"Tethys2000", "ESRI:107942"},
|
||||||
|
{"Thalassa2000", "ESRI:107967"},
|
||||||
|
{"Thebe2000", "ESRI:107924"},
|
||||||
|
{"Titan2000", "ESRI:107943"},
|
||||||
|
{"Titania2000", "ESRI:107958"},
|
||||||
|
{"Triton2000", "ESRI:107968"},
|
||||||
|
{"Umbriel2000", "ESRI:107959"},
|
||||||
|
{"Uranus2000", "ESRI:107944"},
|
||||||
|
{"Venus2000", "ESRI:107902"},
|
||||||
|
{"IGNF:ELG053", "EPSG:7030"},
|
||||||
|
{"IGNF:ELG052", "EPSG:7043"},
|
||||||
|
{"IGNF:ELG102", "EPSG:7043"},
|
||||||
|
{"WGS66", "ESRI:107001"},
|
||||||
|
{"plessis", "EPSG:7027"},
|
||||||
|
{"IGNF:ELG017", "EPSG:7027"},
|
||||||
|
{"mod_airy", "EPSG:7002"},
|
||||||
|
{"IGNF:ELG037", "EPSG:7019"},
|
||||||
|
{"IGNF:ELG108", "EPSG:7036"},
|
||||||
|
{"cape", "EPSG:7034"},
|
||||||
|
{"IGNF:ELG010", "EPSG:7011"},
|
||||||
|
{"IGNF:ELG003", "EPSG:7012"},
|
||||||
|
{"IGNF:ELG004", "EPSG:7008"},
|
||||||
|
{"GSK2011", "EPSG:1025"},
|
||||||
|
{"airy", "EPSG:7001"},
|
||||||
|
{"aust_SA", "EPSG:7003"},
|
||||||
|
{"bessel", "EPSG:7004"},
|
||||||
|
{"clrk66", "EPSG:7008"},
|
||||||
|
{"clrk80ign", "EPSG:7011"},
|
||||||
|
{"evrst30", "EPSG:7015"},
|
||||||
|
{"evrstSS", "EPSG:7016"},
|
||||||
|
{"evrst48", "EPSG:7018"},
|
||||||
|
{"GRS80", "EPSG:7019"},
|
||||||
|
{"helmert", "EPSG:7020"},
|
||||||
|
{"intl", "EPSG:7022"},
|
||||||
|
{"krass", "EPSG:7024"},
|
||||||
|
{"NWL9D", "EPSG:7025"},
|
||||||
|
{"WGS84", "EPSG:7030"},
|
||||||
|
{"GRS67", "EPSG:7036"},
|
||||||
|
{"WGS72", "EPSG:7043"},
|
||||||
|
{"bess_nam", "EPSG:7046"},
|
||||||
|
{"IAU76", "EPSG:7049"},
|
||||||
|
{"sphere", "EPSG:7052"},
|
||||||
|
{"hough", "EPSG:7053"},
|
||||||
|
{"evrst69", "EPSG:7056"},
|
||||||
|
{"fschr60", "ESRI:107002"},
|
||||||
|
{"fschr68", "ESRI:107003"},
|
||||||
|
{"fschr60m", "ESRI:107004"},
|
||||||
|
{"walbeck", "ESRI:107007"},
|
||||||
|
{"IGNF:ELG001", "EPSG:7022"},
|
||||||
|
{"engelis", "EPSG:7054"},
|
||||||
|
{"evrst56", "EPSG:7044"},
|
||||||
|
{"SEasia", "ESRI:107004"},
|
||||||
|
{"SGS85", "EPSG:7054"},
|
||||||
|
{"andrae", "PROJ:ANDRAE"},
|
||||||
|
{"clrk80", "EPSG:7034"},
|
||||||
|
{"CPM", "PROJ:CPM"},
|
||||||
|
{"delmbr", "PROJ:DELMBR"},
|
||||||
|
{"Earth2000", "PROJ:EARTH2000"},
|
||||||
|
{"kaula", "PROJ:KAULA"},
|
||||||
|
{"lerch", "PROJ:LERCH"},
|
||||||
|
{"MERIT", "PROJ:MERIT"},
|
||||||
|
{"mprts", "PROJ:MPRTS"},
|
||||||
|
{"new_intl", "PROJ:NEW_INTL"},
|
||||||
|
{"WGS60", "PROJ:WGS60"}
|
||||||
|
};
|
||||||
|
|
||||||
QString ellipsoid = e;
|
QString ellipsoid = e;
|
||||||
#if PROJ_VERSION_MAJOR >= 6
|
#if PROJ_VERSION_MAJOR >= 6
|
||||||
// ensure ellipsoid database is populated when first called
|
// ensure ellipsoid database is populated when first called
|
||||||
|
@ -37,10 +37,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static const QString GML_NAMESPACE = QStringLiteral( "http://www.opengis.net/gml" );
|
static constexpr QLatin1String GML_NAMESPACE() { return QLatin1String( "http://www.opengis.net/gml" ); }
|
||||||
static const QString GML32_NAMESPACE = QStringLiteral( "http://www.opengis.net/gml/3.2" );
|
static constexpr QLatin1String GML32_NAMESPACE() { return QLatin1String( "http://www.opengis.net/gml/3.2" ); }
|
||||||
static const QString OGC_NAMESPACE = QStringLiteral( "http://www.opengis.net/ogc" );
|
static constexpr QLatin1String OGC_NAMESPACE() { return QLatin1String( "http://www.opengis.net/ogc" ); }
|
||||||
static const QString FES_NAMESPACE = QStringLiteral( "http://www.opengis.net/fes/2.0" );
|
static constexpr QLatin1String FES_NAMESPACE() { return QLatin1String( "http://www.opengis.net/fes/2.0" ); }
|
||||||
|
|
||||||
QgsOgcUtilsExprToFilter::QgsOgcUtilsExprToFilter( QDomDocument &doc,
|
QgsOgcUtilsExprToFilter::QgsOgcUtilsExprToFilter( QDomDocument &doc,
|
||||||
QgsOgcUtils::GMLVersion gmlVersion,
|
QgsOgcUtils::GMLVersion gmlVersion,
|
||||||
@ -136,7 +136,7 @@ QgsGeometry QgsOgcUtils::geometryFromGML( const QDomNode &geometryNode )
|
|||||||
QgsGeometry QgsOgcUtils::geometryFromGML( const QString &xmlString )
|
QgsGeometry QgsOgcUtils::geometryFromGML( const QString &xmlString )
|
||||||
{
|
{
|
||||||
// wrap the string into a root tag to have "gml" namespace (and also as a default namespace)
|
// wrap the string into a root tag to have "gml" namespace (and also as a default namespace)
|
||||||
QString xml = QStringLiteral( "<tmp xmlns=\"%1\" xmlns:gml=\"%1\">%2</tmp>" ).arg( GML_NAMESPACE, xmlString );
|
QString xml = QStringLiteral( "<tmp xmlns=\"%1\" xmlns:gml=\"%1\">%2</tmp>" ).arg( GML_NAMESPACE(), xmlString );
|
||||||
QDomDocument doc;
|
QDomDocument doc;
|
||||||
if ( !doc.setContent( xml, true ) )
|
if ( !doc.setContent( xml, true ) )
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -149,7 +149,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPoint( const QDomElement &geometryElemen
|
|||||||
{
|
{
|
||||||
QgsPolylineXY pointCoordinate;
|
QgsPolylineXY pointCoordinate;
|
||||||
|
|
||||||
QDomNodeList coordList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
QDomNodeList coordList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( !coordList.isEmpty() )
|
if ( !coordList.isEmpty() )
|
||||||
{
|
{
|
||||||
QDomElement coordElement = coordList.at( 0 ).toElement();
|
QDomElement coordElement = coordList.at( 0 ).toElement();
|
||||||
@ -160,7 +160,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPoint( const QDomElement &geometryElemen
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QDomNodeList posList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "pos" ) );
|
QDomNodeList posList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "pos" ) );
|
||||||
if ( posList.size() < 1 )
|
if ( posList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -204,7 +204,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLLineString( const QDomElement &geometryE
|
|||||||
{
|
{
|
||||||
QgsPolylineXY lineCoordinates;
|
QgsPolylineXY lineCoordinates;
|
||||||
|
|
||||||
QDomNodeList coordList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
QDomNodeList coordList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( !coordList.isEmpty() )
|
if ( !coordList.isEmpty() )
|
||||||
{
|
{
|
||||||
QDomElement coordElement = coordList.at( 0 ).toElement();
|
QDomElement coordElement = coordList.at( 0 ).toElement();
|
||||||
@ -215,7 +215,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLLineString( const QDomElement &geometryE
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QDomNodeList posList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "posList" ) );
|
QDomNodeList posList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "posList" ) );
|
||||||
if ( posList.size() < 1 )
|
if ( posList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -268,7 +268,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPolygon( const QDomElement &geometryElem
|
|||||||
|
|
||||||
//read coordinates for outer boundary
|
//read coordinates for outer boundary
|
||||||
QgsPolylineXY exteriorPointList;
|
QgsPolylineXY exteriorPointList;
|
||||||
QDomNodeList outerBoundaryList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "outerBoundaryIs" ) );
|
QDomNodeList outerBoundaryList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "outerBoundaryIs" ) );
|
||||||
if ( !outerBoundaryList.isEmpty() ) //outer ring is necessary
|
if ( !outerBoundaryList.isEmpty() ) //outer ring is necessary
|
||||||
{
|
{
|
||||||
QDomElement coordinatesElement = outerBoundaryList.at( 0 ).firstChild().firstChild().toElement();
|
QDomElement coordinatesElement = outerBoundaryList.at( 0 ).firstChild().firstChild().toElement();
|
||||||
@ -283,7 +283,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPolygon( const QDomElement &geometryElem
|
|||||||
ringCoordinates.push_back( exteriorPointList );
|
ringCoordinates.push_back( exteriorPointList );
|
||||||
|
|
||||||
//read coordinates for inner boundary
|
//read coordinates for inner boundary
|
||||||
QDomNodeList innerBoundaryList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "innerBoundaryIs" ) );
|
QDomNodeList innerBoundaryList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "innerBoundaryIs" ) );
|
||||||
for ( int i = 0; i < innerBoundaryList.size(); ++i )
|
for ( int i = 0; i < innerBoundaryList.size(); ++i )
|
||||||
{
|
{
|
||||||
QgsPolylineXY interiorPointList;
|
QgsPolylineXY interiorPointList;
|
||||||
@ -302,7 +302,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPolygon( const QDomElement &geometryElem
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//read coordinates for exterior
|
//read coordinates for exterior
|
||||||
QDomNodeList exteriorList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "exterior" ) );
|
QDomNodeList exteriorList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "exterior" ) );
|
||||||
if ( exteriorList.size() < 1 ) //outer ring is necessary
|
if ( exteriorList.size() < 1 ) //outer ring is necessary
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -319,7 +319,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPolygon( const QDomElement &geometryElem
|
|||||||
ringCoordinates.push_back( exteriorPointList );
|
ringCoordinates.push_back( exteriorPointList );
|
||||||
|
|
||||||
//read coordinates for inner boundary
|
//read coordinates for inner boundary
|
||||||
QDomNodeList interiorList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "interior" ) );
|
QDomNodeList interiorList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "interior" ) );
|
||||||
for ( int i = 0; i < interiorList.size(); ++i )
|
for ( int i = 0; i < interiorList.size(); ++i )
|
||||||
{
|
{
|
||||||
QgsPolylineXY interiorPointList;
|
QgsPolylineXY interiorPointList;
|
||||||
@ -392,7 +392,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPoint( const QDomElement &geometryE
|
|||||||
{
|
{
|
||||||
QgsPolylineXY pointList;
|
QgsPolylineXY pointList;
|
||||||
QgsPolylineXY currentPoint;
|
QgsPolylineXY currentPoint;
|
||||||
QDomNodeList pointMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "pointMember" ) );
|
QDomNodeList pointMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "pointMember" ) );
|
||||||
if ( pointMemberList.size() < 1 )
|
if ( pointMemberList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -404,13 +404,13 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPoint( const QDomElement &geometryE
|
|||||||
for ( int i = 0; i < pointMemberList.size(); ++i )
|
for ( int i = 0; i < pointMemberList.size(); ++i )
|
||||||
{
|
{
|
||||||
//<Point> element
|
//<Point> element
|
||||||
pointNodeList = pointMemberList.at( i ).toElement().elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "Point" ) );
|
pointNodeList = pointMemberList.at( i ).toElement().elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "Point" ) );
|
||||||
if ( pointNodeList.size() < 1 )
|
if ( pointNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//<coordinates> element
|
//<coordinates> element
|
||||||
coordinatesList = pointNodeList.at( 0 ).toElement().elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
coordinatesList = pointNodeList.at( 0 ).toElement().elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( !coordinatesList.isEmpty() )
|
if ( !coordinatesList.isEmpty() )
|
||||||
{
|
{
|
||||||
currentPoint.clear();
|
currentPoint.clear();
|
||||||
@ -428,7 +428,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPoint( const QDomElement &geometryE
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//<pos> element
|
//<pos> element
|
||||||
posList = pointNodeList.at( 0 ).toElement().elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "pos" ) );
|
posList = pointNodeList.at( 0 ).toElement().elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "pos" ) );
|
||||||
if ( posList.size() < 1 )
|
if ( posList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -502,18 +502,18 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiLineString( const QDomElement &geom
|
|||||||
QDomNodeList currentCoordList;
|
QDomNodeList currentCoordList;
|
||||||
QDomNodeList currentPosList;
|
QDomNodeList currentPosList;
|
||||||
|
|
||||||
QDomNodeList lineStringMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "lineStringMember" ) );
|
QDomNodeList lineStringMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "lineStringMember" ) );
|
||||||
if ( !lineStringMemberList.isEmpty() ) //geoserver
|
if ( !lineStringMemberList.isEmpty() ) //geoserver
|
||||||
{
|
{
|
||||||
for ( int i = 0; i < lineStringMemberList.size(); ++i )
|
for ( int i = 0; i < lineStringMemberList.size(); ++i )
|
||||||
{
|
{
|
||||||
QDomNodeList lineStringNodeList = lineStringMemberList.at( i ).toElement().elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LineString" ) );
|
QDomNodeList lineStringNodeList = lineStringMemberList.at( i ).toElement().elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LineString" ) );
|
||||||
if ( lineStringNodeList.size() < 1 )
|
if ( lineStringNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
}
|
}
|
||||||
currentLineStringElement = lineStringNodeList.at( 0 ).toElement();
|
currentLineStringElement = lineStringNodeList.at( 0 ).toElement();
|
||||||
currentCoordList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
currentCoordList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( !currentCoordList.isEmpty() )
|
if ( !currentCoordList.isEmpty() )
|
||||||
{
|
{
|
||||||
QgsPolylineXY currentPointList;
|
QgsPolylineXY currentPointList;
|
||||||
@ -525,7 +525,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiLineString( const QDomElement &geom
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentPosList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "posList" ) );
|
currentPosList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "posList" ) );
|
||||||
if ( currentPosList.size() < 1 )
|
if ( currentPosList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -541,13 +541,13 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiLineString( const QDomElement &geom
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QDomNodeList lineStringList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LineString" ) );
|
QDomNodeList lineStringList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LineString" ) );
|
||||||
if ( !lineStringList.isEmpty() ) //mapserver
|
if ( !lineStringList.isEmpty() ) //mapserver
|
||||||
{
|
{
|
||||||
for ( int i = 0; i < lineStringList.size(); ++i )
|
for ( int i = 0; i < lineStringList.size(); ++i )
|
||||||
{
|
{
|
||||||
currentLineStringElement = lineStringList.at( i ).toElement();
|
currentLineStringElement = lineStringList.at( i ).toElement();
|
||||||
currentCoordList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
currentCoordList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( !currentCoordList.isEmpty() )
|
if ( !currentCoordList.isEmpty() )
|
||||||
{
|
{
|
||||||
QgsPolylineXY currentPointList;
|
QgsPolylineXY currentPointList;
|
||||||
@ -560,7 +560,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiLineString( const QDomElement &geom
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentPosList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "posList" ) );
|
currentPosList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "posList" ) );
|
||||||
if ( currentPosList.size() < 1 )
|
if ( currentPosList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -656,13 +656,13 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
QDomNodeList currentCoordinateList;
|
QDomNodeList currentCoordinateList;
|
||||||
QDomNodeList currentPosList;
|
QDomNodeList currentPosList;
|
||||||
|
|
||||||
QDomNodeList polygonMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "polygonMember" ) );
|
QDomNodeList polygonMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "polygonMember" ) );
|
||||||
QgsPolygonXY currentPolygonList;
|
QgsPolygonXY currentPolygonList;
|
||||||
for ( int i = 0; i < polygonMemberList.size(); ++i )
|
for ( int i = 0; i < polygonMemberList.size(); ++i )
|
||||||
{
|
{
|
||||||
currentPolygonList.resize( 0 ); // preserve capacity - don't use clear
|
currentPolygonList.resize( 0 ); // preserve capacity - don't use clear
|
||||||
currentPolygonMemberElement = polygonMemberList.at( i ).toElement();
|
currentPolygonMemberElement = polygonMemberList.at( i ).toElement();
|
||||||
polygonList = currentPolygonMemberElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "Polygon" ) );
|
polygonList = currentPolygonMemberElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "Polygon" ) );
|
||||||
if ( polygonList.size() < 1 )
|
if ( polygonList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -670,19 +670,19 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
currentPolygonElement = polygonList.at( 0 ).toElement();
|
currentPolygonElement = polygonList.at( 0 ).toElement();
|
||||||
|
|
||||||
//find exterior ring
|
//find exterior ring
|
||||||
outerBoundaryList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "outerBoundaryIs" ) );
|
outerBoundaryList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "outerBoundaryIs" ) );
|
||||||
if ( !outerBoundaryList.isEmpty() )
|
if ( !outerBoundaryList.isEmpty() )
|
||||||
{
|
{
|
||||||
currentOuterBoundaryElement = outerBoundaryList.at( 0 ).toElement();
|
currentOuterBoundaryElement = outerBoundaryList.at( 0 ).toElement();
|
||||||
QgsPolylineXY ringCoordinates;
|
QgsPolylineXY ringCoordinates;
|
||||||
|
|
||||||
linearRingNodeList = currentOuterBoundaryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LinearRing" ) );
|
linearRingNodeList = currentOuterBoundaryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LinearRing" ) );
|
||||||
if ( linearRingNodeList.size() < 1 )
|
if ( linearRingNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
||||||
currentCoordinateList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
currentCoordinateList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( currentCoordinateList.size() < 1 )
|
if ( currentCoordinateList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -694,18 +694,18 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
currentPolygonList.push_back( ringCoordinates );
|
currentPolygonList.push_back( ringCoordinates );
|
||||||
|
|
||||||
//find interior rings
|
//find interior rings
|
||||||
QDomNodeList innerBoundaryList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "innerBoundaryIs" ) );
|
QDomNodeList innerBoundaryList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "innerBoundaryIs" ) );
|
||||||
for ( int j = 0; j < innerBoundaryList.size(); ++j )
|
for ( int j = 0; j < innerBoundaryList.size(); ++j )
|
||||||
{
|
{
|
||||||
QgsPolylineXY ringCoordinates;
|
QgsPolylineXY ringCoordinates;
|
||||||
currentInnerBoundaryElement = innerBoundaryList.at( j ).toElement();
|
currentInnerBoundaryElement = innerBoundaryList.at( j ).toElement();
|
||||||
linearRingNodeList = currentInnerBoundaryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LinearRing" ) );
|
linearRingNodeList = currentInnerBoundaryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LinearRing" ) );
|
||||||
if ( linearRingNodeList.size() < 1 )
|
if ( linearRingNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
||||||
currentCoordinateList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
currentCoordinateList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( currentCoordinateList.size() < 1 )
|
if ( currentCoordinateList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -720,7 +720,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//find exterior ring
|
//find exterior ring
|
||||||
exteriorList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "exterior" ) );
|
exteriorList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "exterior" ) );
|
||||||
if ( exteriorList.size() < 1 )
|
if ( exteriorList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -729,13 +729,13 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
currentExteriorElement = exteriorList.at( 0 ).toElement();
|
currentExteriorElement = exteriorList.at( 0 ).toElement();
|
||||||
QgsPolylineXY ringPositions;
|
QgsPolylineXY ringPositions;
|
||||||
|
|
||||||
linearRingNodeList = currentExteriorElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LinearRing" ) );
|
linearRingNodeList = currentExteriorElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LinearRing" ) );
|
||||||
if ( linearRingNodeList.size() < 1 )
|
if ( linearRingNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
||||||
currentPosList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "posList" ) );
|
currentPosList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "posList" ) );
|
||||||
if ( currentPosList.size() < 1 )
|
if ( currentPosList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -747,18 +747,18 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
currentPolygonList.push_back( ringPositions );
|
currentPolygonList.push_back( ringPositions );
|
||||||
|
|
||||||
//find interior rings
|
//find interior rings
|
||||||
QDomNodeList interiorList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "interior" ) );
|
QDomNodeList interiorList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "interior" ) );
|
||||||
for ( int j = 0; j < interiorList.size(); ++j )
|
for ( int j = 0; j < interiorList.size(); ++j )
|
||||||
{
|
{
|
||||||
QgsPolylineXY ringPositions;
|
QgsPolylineXY ringPositions;
|
||||||
currentInteriorElement = interiorList.at( j ).toElement();
|
currentInteriorElement = interiorList.at( j ).toElement();
|
||||||
linearRingNodeList = currentInteriorElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LinearRing" ) );
|
linearRingNodeList = currentInteriorElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LinearRing" ) );
|
||||||
if ( linearRingNodeList.size() < 1 )
|
if ( linearRingNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
||||||
currentPosList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "posList" ) );
|
currentPosList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "posList" ) );
|
||||||
if ( currentPosList.size() < 1 )
|
if ( currentPosList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -972,11 +972,11 @@ QgsRectangle QgsOgcUtils::rectangleFromGMLEnvelope( const QDomNode &envelopeNode
|
|||||||
if ( envelopeElem.tagName() != QLatin1String( "Envelope" ) )
|
if ( envelopeElem.tagName() != QLatin1String( "Envelope" ) )
|
||||||
return rect;
|
return rect;
|
||||||
|
|
||||||
QDomNodeList lowerCornerList = envelopeElem.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "lowerCorner" ) );
|
QDomNodeList lowerCornerList = envelopeElem.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "lowerCorner" ) );
|
||||||
if ( lowerCornerList.size() < 1 )
|
if ( lowerCornerList.size() < 1 )
|
||||||
return rect;
|
return rect;
|
||||||
|
|
||||||
QDomNodeList upperCornerList = envelopeElem.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "upperCorner" ) );
|
QDomNodeList upperCornerList = envelopeElem.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "upperCorner" ) );
|
||||||
if ( upperCornerList.size() < 1 )
|
if ( upperCornerList.size() < 1 )
|
||||||
return rect;
|
return rect;
|
||||||
|
|
||||||
@ -1822,15 +1822,15 @@ QDomElement QgsOgcUtils::expressionToOgcFilter( const QgsExpression &expression,
|
|||||||
|
|
||||||
QDomElement filterElem =
|
QDomElement filterElem =
|
||||||
( filterVersion == FILTER_FES_2_0 ) ?
|
( filterVersion == FILTER_FES_2_0 ) ?
|
||||||
doc.createElementNS( FES_NAMESPACE, QStringLiteral( "fes:Filter" ) ) :
|
doc.createElementNS( FES_NAMESPACE(), QStringLiteral( "fes:Filter" ) ) :
|
||||||
doc.createElementNS( OGC_NAMESPACE, QStringLiteral( "ogc:Filter" ) );
|
doc.createElementNS( OGC_NAMESPACE(), QStringLiteral( "ogc:Filter" ) );
|
||||||
if ( utils.GMLNamespaceUsed() )
|
if ( utils.GMLNamespaceUsed() )
|
||||||
{
|
{
|
||||||
QDomAttr attr = doc.createAttribute( QStringLiteral( "xmlns:gml" ) );
|
QDomAttr attr = doc.createAttribute( QStringLiteral( "xmlns:gml" ) );
|
||||||
if ( gmlVersion == GML_3_2_1 )
|
if ( gmlVersion == GML_3_2_1 )
|
||||||
attr.setValue( GML32_NAMESPACE );
|
attr.setValue( GML32_NAMESPACE() );
|
||||||
else
|
else
|
||||||
attr.setValue( GML_NAMESPACE );
|
attr.setValue( GML_NAMESPACE() );
|
||||||
filterElem.setAttributeNode( attr );
|
filterElem.setAttributeNode( attr );
|
||||||
}
|
}
|
||||||
filterElem.appendChild( exprRootElem );
|
filterElem.appendChild( exprRootElem );
|
||||||
@ -1908,15 +1908,15 @@ QDomElement QgsOgcUtils::SQLStatementToOgcFilter( const QgsSQLStatement &stateme
|
|||||||
|
|
||||||
QDomElement filterElem =
|
QDomElement filterElem =
|
||||||
( filterVersion == FILTER_FES_2_0 ) ?
|
( filterVersion == FILTER_FES_2_0 ) ?
|
||||||
doc.createElementNS( FES_NAMESPACE, QStringLiteral( "fes:Filter" ) ) :
|
doc.createElementNS( FES_NAMESPACE(), QStringLiteral( "fes:Filter" ) ) :
|
||||||
doc.createElementNS( OGC_NAMESPACE, QStringLiteral( "ogc:Filter" ) );
|
doc.createElementNS( OGC_NAMESPACE(), QStringLiteral( "ogc:Filter" ) );
|
||||||
if ( utils.GMLNamespaceUsed() )
|
if ( utils.GMLNamespaceUsed() )
|
||||||
{
|
{
|
||||||
QDomAttr attr = doc.createAttribute( QStringLiteral( "xmlns:gml" ) );
|
QDomAttr attr = doc.createAttribute( QStringLiteral( "xmlns:gml" ) );
|
||||||
if ( gmlVersion == GML_3_2_1 )
|
if ( gmlVersion == GML_3_2_1 )
|
||||||
attr.setValue( GML32_NAMESPACE );
|
attr.setValue( GML32_NAMESPACE() );
|
||||||
else
|
else
|
||||||
attr.setValue( GML_NAMESPACE );
|
attr.setValue( GML_NAMESPACE() );
|
||||||
filterElem.setAttributeNode( attr );
|
filterElem.setAttributeNode( attr );
|
||||||
}
|
}
|
||||||
filterElem.appendChild( exprRootElem );
|
filterElem.appendChild( exprRootElem );
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
static const QRegExp IDENTIFIER_RE( "^[A-Za-z_\x80-\xff][A-Za-z0-9_\x80-\xff]*$" );
|
|
||||||
|
|
||||||
// from parser
|
// from parser
|
||||||
extern QgsSQLStatement::Node *parse( const QString &str, QString &parserErrorMsg );
|
extern QgsSQLStatement::Node *parse( const QString &str, QString &parserErrorMsg );
|
||||||
@ -90,6 +89,7 @@ QString QgsSQLStatement::quotedIdentifierIfNeeded( const QString &name )
|
|||||||
return quotedIdentifier( name );
|
return quotedIdentifier( name );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static const QRegExp IDENTIFIER_RE( "^[A-Za-z_\x80-\xff][A-Za-z0-9_\x80-\xff]*$" );
|
||||||
return IDENTIFIER_RE.exactMatch( name ) ? name : quotedIdentifier( name );
|
return IDENTIFIER_RE.exactMatch( name ) ? name : quotedIdentifier( name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,6 @@ void QgsSymbolLayer::initPropertyDefinitions()
|
|||||||
{ QgsSymbolLayer::PropertyPointCount, QgsPropertyDefinition( "pointCount", QObject::tr( "Point count" ), QgsPropertyDefinition::IntegerPositive, origin )},
|
{ QgsSymbolLayer::PropertyPointCount, QgsPropertyDefinition( "pointCount", QObject::tr( "Point count" ), QgsPropertyDefinition::IntegerPositive, origin )},
|
||||||
{ QgsSymbolLayer::PropertyRandomSeed, QgsPropertyDefinition( "randomSeed", QgsPropertyDefinition::DataTypeNumeric, QObject::tr( "Random number seed" ), QObject::tr( "integer > 0, or 0 for completely random sequence" ), origin )},
|
{ QgsSymbolLayer::PropertyRandomSeed, QgsPropertyDefinition( "randomSeed", QgsPropertyDefinition::DataTypeNumeric, QObject::tr( "Random number seed" ), QObject::tr( "integer > 0, or 0 for completely random sequence" ), origin )},
|
||||||
{ QgsSymbolLayer::PropertyClipPoints, QgsPropertyDefinition( "clipPoints", QObject::tr( "Clip markers" ), QgsPropertyDefinition::Boolean, origin )},
|
{ QgsSymbolLayer::PropertyClipPoints, QgsPropertyDefinition( "clipPoints", QObject::tr( "Clip markers" ), QgsPropertyDefinition::Boolean, origin )},
|
||||||
{ QgsSymbolLayer::PropertyClipPoints, QgsPropertyDefinition( "densityArea", QObject::tr( "Density area" ), QgsPropertyDefinition::DoublePositive, origin )},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,84 +266,84 @@ QgsProperty propertyFromMap( const QgsStringMap &map, const QString &baseName )
|
|||||||
return QgsProperty::fromField( field, active );
|
return QgsProperty::fromField( field, active );
|
||||||
}
|
}
|
||||||
|
|
||||||
// property string to type upgrade map
|
|
||||||
static const QMap< QString, QgsSymbolLayer::Property > OLD_PROPS
|
|
||||||
{
|
|
||||||
{ "color", QgsSymbolLayer::PropertyFillColor },
|
|
||||||
{ "arrow_width", QgsSymbolLayer::PropertyArrowWidth },
|
|
||||||
{ "arrow_start_width", QgsSymbolLayer::PropertyArrowStartWidth },
|
|
||||||
{ "head_length", QgsSymbolLayer::PropertyArrowHeadLength },
|
|
||||||
{ "head_thickness", QgsSymbolLayer::PropertyArrowHeadThickness },
|
|
||||||
{ "offset", QgsSymbolLayer::PropertyOffset },
|
|
||||||
{ "head_type", QgsSymbolLayer::PropertyArrowHeadType },
|
|
||||||
{ "arrow_type", QgsSymbolLayer::PropertyArrowType },
|
|
||||||
{ "width_field", QgsSymbolLayer::PropertyWidth },
|
|
||||||
{ "height_field", QgsSymbolLayer::PropertyHeight },
|
|
||||||
{ "rotation_field", QgsSymbolLayer::PropertyAngle },
|
|
||||||
{ "outline_width_field", QgsSymbolLayer::PropertyStrokeWidth },
|
|
||||||
{ "fill_color_field", QgsSymbolLayer::PropertyFillColor },
|
|
||||||
{ "outline_color_field", QgsSymbolLayer::PropertyStrokeColor },
|
|
||||||
{ "symbol_name_field", QgsSymbolLayer::PropertyName },
|
|
||||||
{ "outline_width", QgsSymbolLayer::PropertyStrokeWidth },
|
|
||||||
{ "outline_style", QgsSymbolLayer::PropertyStrokeStyle },
|
|
||||||
{ "join_style", QgsSymbolLayer::PropertyJoinStyle },
|
|
||||||
{ "fill_color", QgsSymbolLayer::PropertyFillColor },
|
|
||||||
{ "outline_color", QgsSymbolLayer::PropertyStrokeColor },
|
|
||||||
{ "width", QgsSymbolLayer::PropertyWidth },
|
|
||||||
{ "height", QgsSymbolLayer::PropertyHeight },
|
|
||||||
{ "symbol_name", QgsSymbolLayer::PropertyName },
|
|
||||||
{ "angle", QgsSymbolLayer::PropertyAngle },
|
|
||||||
{ "fill_style", QgsSymbolLayer::PropertyFillStyle },
|
|
||||||
{ "color_border", QgsSymbolLayer::PropertyStrokeColor },
|
|
||||||
{ "width_border", QgsSymbolLayer::PropertyStrokeWidth },
|
|
||||||
{ "border_color", QgsSymbolLayer::PropertyStrokeColor },
|
|
||||||
{ "border_style", QgsSymbolLayer::PropertyStrokeStyle },
|
|
||||||
{ "color2", QgsSymbolLayer::PropertySecondaryColor },
|
|
||||||
{ "gradient_type", QgsSymbolLayer::PropertyGradientType },
|
|
||||||
{ "coordinate_mode", QgsSymbolLayer::PropertyCoordinateMode },
|
|
||||||
{ "spread", QgsSymbolLayer::PropertyGradientSpread },
|
|
||||||
{ "reference1_x", QgsSymbolLayer::PropertyGradientReference1X },
|
|
||||||
{ "reference1_y", QgsSymbolLayer::PropertyGradientReference1Y },
|
|
||||||
{ "reference2_x", QgsSymbolLayer::PropertyGradientReference2X },
|
|
||||||
{ "reference2_y", QgsSymbolLayer::PropertyGradientReference2Y },
|
|
||||||
{ "reference1_iscentroid", QgsSymbolLayer::PropertyGradientReference1IsCentroid },
|
|
||||||
{ "reference2_iscentroid", QgsSymbolLayer::PropertyGradientReference2IsCentroid },
|
|
||||||
{ "blur_radius", QgsSymbolLayer::PropertyBlurRadius },
|
|
||||||
{ "use_whole_shape", QgsSymbolLayer::PropertyShapeburstUseWholeShape },
|
|
||||||
{ "max_distance", QgsSymbolLayer::PropertyShapeburstMaxDistance },
|
|
||||||
{ "ignore_rings", QgsSymbolLayer::PropertyShapeburstIgnoreRings },
|
|
||||||
{ "svgFillColor", QgsSymbolLayer::PropertyFillColor },
|
|
||||||
{ "svgOutlineColor", QgsSymbolLayer::PropertyStrokeColor },
|
|
||||||
{ "svgOutlineWidth", QgsSymbolLayer::PropertyStrokeWidth },
|
|
||||||
{ "svgFile", QgsSymbolLayer::PropertyFile },
|
|
||||||
{ "lineangle", QgsSymbolLayer::PropertyLineAngle },
|
|
||||||
{ "distance", QgsSymbolLayer::PropertyLineDistance },
|
|
||||||
{ "distance_x", QgsSymbolLayer::PropertyDistanceX },
|
|
||||||
{ "distance_y", QgsSymbolLayer::PropertyDistanceY },
|
|
||||||
{ "displacement_x", QgsSymbolLayer::PropertyDisplacementX },
|
|
||||||
{ "displacement_y", QgsSymbolLayer::PropertyDisplacementY },
|
|
||||||
{ "file", QgsSymbolLayer::PropertyFile },
|
|
||||||
{ "alpha", QgsSymbolLayer::PropertyOpacity },
|
|
||||||
{ "customdash", QgsSymbolLayer::PropertyCustomDash },
|
|
||||||
{ "line_style", QgsSymbolLayer::PropertyStrokeStyle },
|
|
||||||
{ "joinstyle", QgsSymbolLayer::PropertyJoinStyle },
|
|
||||||
{ "capstyle", QgsSymbolLayer::PropertyCapStyle },
|
|
||||||
{ "placement", QgsSymbolLayer::PropertyPlacement },
|
|
||||||
{ "interval", QgsSymbolLayer::PropertyInterval },
|
|
||||||
{ "offset_along_line", QgsSymbolLayer::PropertyOffsetAlongLine },
|
|
||||||
{ "name", QgsSymbolLayer::PropertyName },
|
|
||||||
{ "size", QgsSymbolLayer::PropertySize },
|
|
||||||
{ "fill", QgsSymbolLayer::PropertyFillColor },
|
|
||||||
{ "outline", QgsSymbolLayer::PropertyStrokeColor },
|
|
||||||
{ "char", QgsSymbolLayer::PropertyCharacter },
|
|
||||||
{ "enabled", QgsSymbolLayer::PropertyLayerEnabled },
|
|
||||||
{ "rotation", QgsSymbolLayer::PropertyAngle },
|
|
||||||
{ "horizontal_anchor_point", QgsSymbolLayer::PropertyHorizontalAnchor },
|
|
||||||
{ "vertical_anchor_point", QgsSymbolLayer::PropertyVerticalAnchor },
|
|
||||||
};
|
|
||||||
|
|
||||||
void QgsSymbolLayer::restoreOldDataDefinedProperties( const QgsStringMap &stringMap )
|
void QgsSymbolLayer::restoreOldDataDefinedProperties( const QgsStringMap &stringMap )
|
||||||
{
|
{
|
||||||
|
// property string to type upgrade map
|
||||||
|
static const QMap< QString, QgsSymbolLayer::Property > OLD_PROPS
|
||||||
|
{
|
||||||
|
{ "color", QgsSymbolLayer::PropertyFillColor },
|
||||||
|
{ "arrow_width", QgsSymbolLayer::PropertyArrowWidth },
|
||||||
|
{ "arrow_start_width", QgsSymbolLayer::PropertyArrowStartWidth },
|
||||||
|
{ "head_length", QgsSymbolLayer::PropertyArrowHeadLength },
|
||||||
|
{ "head_thickness", QgsSymbolLayer::PropertyArrowHeadThickness },
|
||||||
|
{ "offset", QgsSymbolLayer::PropertyOffset },
|
||||||
|
{ "head_type", QgsSymbolLayer::PropertyArrowHeadType },
|
||||||
|
{ "arrow_type", QgsSymbolLayer::PropertyArrowType },
|
||||||
|
{ "width_field", QgsSymbolLayer::PropertyWidth },
|
||||||
|
{ "height_field", QgsSymbolLayer::PropertyHeight },
|
||||||
|
{ "rotation_field", QgsSymbolLayer::PropertyAngle },
|
||||||
|
{ "outline_width_field", QgsSymbolLayer::PropertyStrokeWidth },
|
||||||
|
{ "fill_color_field", QgsSymbolLayer::PropertyFillColor },
|
||||||
|
{ "outline_color_field", QgsSymbolLayer::PropertyStrokeColor },
|
||||||
|
{ "symbol_name_field", QgsSymbolLayer::PropertyName },
|
||||||
|
{ "outline_width", QgsSymbolLayer::PropertyStrokeWidth },
|
||||||
|
{ "outline_style", QgsSymbolLayer::PropertyStrokeStyle },
|
||||||
|
{ "join_style", QgsSymbolLayer::PropertyJoinStyle },
|
||||||
|
{ "fill_color", QgsSymbolLayer::PropertyFillColor },
|
||||||
|
{ "outline_color", QgsSymbolLayer::PropertyStrokeColor },
|
||||||
|
{ "width", QgsSymbolLayer::PropertyWidth },
|
||||||
|
{ "height", QgsSymbolLayer::PropertyHeight },
|
||||||
|
{ "symbol_name", QgsSymbolLayer::PropertyName },
|
||||||
|
{ "angle", QgsSymbolLayer::PropertyAngle },
|
||||||
|
{ "fill_style", QgsSymbolLayer::PropertyFillStyle },
|
||||||
|
{ "color_border", QgsSymbolLayer::PropertyStrokeColor },
|
||||||
|
{ "width_border", QgsSymbolLayer::PropertyStrokeWidth },
|
||||||
|
{ "border_color", QgsSymbolLayer::PropertyStrokeColor },
|
||||||
|
{ "border_style", QgsSymbolLayer::PropertyStrokeStyle },
|
||||||
|
{ "color2", QgsSymbolLayer::PropertySecondaryColor },
|
||||||
|
{ "gradient_type", QgsSymbolLayer::PropertyGradientType },
|
||||||
|
{ "coordinate_mode", QgsSymbolLayer::PropertyCoordinateMode },
|
||||||
|
{ "spread", QgsSymbolLayer::PropertyGradientSpread },
|
||||||
|
{ "reference1_x", QgsSymbolLayer::PropertyGradientReference1X },
|
||||||
|
{ "reference1_y", QgsSymbolLayer::PropertyGradientReference1Y },
|
||||||
|
{ "reference2_x", QgsSymbolLayer::PropertyGradientReference2X },
|
||||||
|
{ "reference2_y", QgsSymbolLayer::PropertyGradientReference2Y },
|
||||||
|
{ "reference1_iscentroid", QgsSymbolLayer::PropertyGradientReference1IsCentroid },
|
||||||
|
{ "reference2_iscentroid", QgsSymbolLayer::PropertyGradientReference2IsCentroid },
|
||||||
|
{ "blur_radius", QgsSymbolLayer::PropertyBlurRadius },
|
||||||
|
{ "use_whole_shape", QgsSymbolLayer::PropertyShapeburstUseWholeShape },
|
||||||
|
{ "max_distance", QgsSymbolLayer::PropertyShapeburstMaxDistance },
|
||||||
|
{ "ignore_rings", QgsSymbolLayer::PropertyShapeburstIgnoreRings },
|
||||||
|
{ "svgFillColor", QgsSymbolLayer::PropertyFillColor },
|
||||||
|
{ "svgOutlineColor", QgsSymbolLayer::PropertyStrokeColor },
|
||||||
|
{ "svgOutlineWidth", QgsSymbolLayer::PropertyStrokeWidth },
|
||||||
|
{ "svgFile", QgsSymbolLayer::PropertyFile },
|
||||||
|
{ "lineangle", QgsSymbolLayer::PropertyLineAngle },
|
||||||
|
{ "distance", QgsSymbolLayer::PropertyLineDistance },
|
||||||
|
{ "distance_x", QgsSymbolLayer::PropertyDistanceX },
|
||||||
|
{ "distance_y", QgsSymbolLayer::PropertyDistanceY },
|
||||||
|
{ "displacement_x", QgsSymbolLayer::PropertyDisplacementX },
|
||||||
|
{ "displacement_y", QgsSymbolLayer::PropertyDisplacementY },
|
||||||
|
{ "file", QgsSymbolLayer::PropertyFile },
|
||||||
|
{ "alpha", QgsSymbolLayer::PropertyOpacity },
|
||||||
|
{ "customdash", QgsSymbolLayer::PropertyCustomDash },
|
||||||
|
{ "line_style", QgsSymbolLayer::PropertyStrokeStyle },
|
||||||
|
{ "joinstyle", QgsSymbolLayer::PropertyJoinStyle },
|
||||||
|
{ "capstyle", QgsSymbolLayer::PropertyCapStyle },
|
||||||
|
{ "placement", QgsSymbolLayer::PropertyPlacement },
|
||||||
|
{ "interval", QgsSymbolLayer::PropertyInterval },
|
||||||
|
{ "offset_along_line", QgsSymbolLayer::PropertyOffsetAlongLine },
|
||||||
|
{ "name", QgsSymbolLayer::PropertyName },
|
||||||
|
{ "size", QgsSymbolLayer::PropertySize },
|
||||||
|
{ "fill", QgsSymbolLayer::PropertyFillColor },
|
||||||
|
{ "outline", QgsSymbolLayer::PropertyStrokeColor },
|
||||||
|
{ "char", QgsSymbolLayer::PropertyCharacter },
|
||||||
|
{ "enabled", QgsSymbolLayer::PropertyLayerEnabled },
|
||||||
|
{ "rotation", QgsSymbolLayer::PropertyAngle },
|
||||||
|
{ "horizontal_anchor_point", QgsSymbolLayer::PropertyHorizontalAnchor },
|
||||||
|
{ "vertical_anchor_point", QgsSymbolLayer::PropertyVerticalAnchor },
|
||||||
|
};
|
||||||
|
|
||||||
QgsStringMap::const_iterator propIt = stringMap.constBegin();
|
QgsStringMap::const_iterator propIt = stringMap.constBegin();
|
||||||
for ( ; propIt != stringMap.constEnd(); ++propIt )
|
for ( ; propIt != stringMap.constEnd(); ++propIt )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user