Skip to content

Commit d463ddd

Browse files
authoredOct 1, 2016
Merge pull request #3549 from rldhont/release-2_14-aaime_sld
Cherry-picking @aaime works on SLD to release-2_14
2 parents 26d5c6b + da67550 commit d463ddd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3702
-110
lines changed
 

‎python/core/qgsogcutils.sip

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,12 @@ class QgsOgcUtils
5959
*/
6060
static QDomElement expressionToOgcFilter( const QgsExpression& exp, QDomDocument& doc, QString* errorMessage /Out/ );
6161

62+
/** Creates an OGC expression XML element.
63+
* @return valid OGC expression QDomElement on success,
64+
* otherwise null QDomElement
65+
* @note added in 2.14.8
66+
*/
67+
static QDomElement expressionToOgcExpression( const QgsExpression& exp, QDomDocument& doc, QString* errorMessage = nullptr );
68+
6269
};
6370

‎python/core/qgsvectorlayer.sip

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,23 @@ class QgsVectorLayer : QgsMapLayer
733733
*/
734734
bool writeSymbology( QDomNode& node, QDomDocument& doc, QString& errorMessage ) const;
735735

736-
bool writeSld( QDomNode& node, QDomDocument& doc, QString& errorMessage ) const;
736+
/**
737+
* Writes the symbology of the layer into the document provided in SLD 1.1 format
738+
* @param node the node that will have the style element added to it.
739+
* @param doc the document that will have the QDomNode added.
740+
* @param errorMessage reference to string that will be updated with any error messages
741+
* @param props a open ended set of properties that can drive/inform the SLD encoding
742+
* @return true in case of success
743+
*/
744+
bool writeSld( QDomNode& node, QDomDocument& doc, QString& errorMessage, const QgsStringMap& props = QgsStringMap() ) const;
745+
746+
/**
747+
* Read the symbology of the layer according to the information contained in
748+
* the UserStyle element of a SLD style document
749+
* @param node the node that have the style element in it.
750+
* @param errorMessage reference to string that will be updated with any error messages
751+
* @return true in case of success
752+
*/
737753
bool readSld( const QDomNode& node, QString& errorMessage );
738754

739755
/**
@@ -1820,4 +1836,3 @@ class QgsVectorLayer : QgsMapLayer
18201836

18211837

18221838
};
1823-

0 commit comments

Comments
 (0)
Please sign in to comment.