This document is not an OGC Standard. This document is an OGC Discussion Paper and is therefore not an official position of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard. Further, an OGC Discussion Paper should not be referenced as required or mandatory technology in procurements.
OGC Discussion Paper
Approved for public release
Permission is hereby granted by the Open Geospatial Consortium, ("Licensor"), free of charge and subject to the terms set forth below, to any person obtaining a copy of this Intellectual Property and any associated documentation, to deal in the Intellectual Property without restriction (except as set forth below), including without limitation the rights to implement, use, copy, modify, merge, publish, distribute, and/or sublicense copies of the Intellectual Property, and to permit persons to whom the Intellectual Property is furnished to do so, provided that all copyright notices on the intellectual property are retained intact and that each person to whom the Intellectual Property is furnished agrees to the terms of this Agreement.
If you modify the Intellectual Property, all copies of the modified Intellectual Property must include, in addition to the above copyright notice, a notice that the Intellectual Property includes modifications that have not been approved or adopted by LICENSOR.
THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD.
THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE INTELLECTUAL PROPERTY WILL BE UNINTERRUPTED OR ERROR FREE. ANY USE OF THE INTELLECTUAL PROPERTY SHALL BE MADE ENTIRELY AT THE USER’S OWN RISK. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY CONTRIBUTOR OF INTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM ANY ALLEGED INFRINGEMENT OR ANY LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR UNDER ANY OTHER LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH THE IMPLEMENTATION, USE, COMMERCIALIZATION OR PERFORMANCE OF THIS INTELLECTUAL PROPERTY.
This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except as provided in the following sentence, no such termination of this license shall require the termination of any third party end-user sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual Property, or the operation of the Intellectual Property, infringe, or in LICENSOR’s sole opinion be likely to infringe, any patent, copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy or cause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party.
Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual Property shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without prior written authorization of LICENSOR or such copyright holder. LICENSOR is and shall at all times be the sole entity that may authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any LICENSOR standards or specifications. This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of this Agreement shall be deemed unenforceable, void or invalid, such provision shall be modified so as to make it valid and enforceable, and as so modified the entire Agreement shall remain in full force and effect. No decision, action or inaction by LICENSOR shall be construed to be a waiver of any rights or remedies available to it.
DGIWG – 17-003 / OGC 17-059
Technical report from the DGIWG Portrayal Technical Panel testing of SLD (1.1.0) for OGC
DGIWG Technical Report / OGC Discussion paper
26 October 2017
Lars Schylberg, Lubos Belka
DGIWG participants and associates
Template to create STD, TCR, and HBK documents
(C) Copyright DGIWG, some rights reserved - (CC) (By:) Attribution
You are free:
to copy, distribute, display, and perform/execute the work
to make derivative works
to make commercial use of the work
Under the following conditions:
(By:) Attribution. You must give the original author (DGIWG) credit.
For any reuse or distribution, you must make clear to others the license terms of this work.
Any of these conditions can be waived if you get permission from the copyright holder DGIWG.
Your fair use and other rights are in no way affected by the above.
This is a human-readable summary of the Legal Code (the full license is available from Creative Commons <http://creativecommons.org/licenses/by/2.0/ >).
i. Contributing participants
Military Geographic and Hydrometeorologic Office
Institut Geographique National (IGN)
NZDF - GeoInt New Zealand (GNZ)
National Land Survey of Sweden
MOD - Defence Geographic Centre (DGC) and Joint
Forces Intelligence Group (JFIG)
National Geospatial-Intelligence Agency (NGA)
ii. Document points of contact
For internal documents use:
All questions regarding this document shall be directed to the editor or the contributors:
Document approved for public release use:
All questions regarding this document shall be directed to the
iii. Revision history
Comments from Doug Stiles incorporated
Editing and formatting
Editing and formatting
Based upon the 7 June telecon
Comments from OGC (Gobe Hobona) incorporated
The DGIWG Portrayal Technical Panel (DPTP) has been investigating how to standardize the portrayal of military context symbology within Web Services. The team sought to use version 1.1.0 of OGC Style Layer Descriptor standard and version 1.1.0 of Symbology Encoding (SLD and SE) standard to achieve this.
The team sought to apply military-specific symbology to military-specific topographic feature vector datasets within a number of software products.
The testing and experimentation highlighted a number of deficiencies in the SLD and SE standards which result in a barrier to interoperability. The ideal situation would be to have SLD and SE descriptors interoperable between all software products that implement the standard. This was found not to be the current situation.
This position paper describes the findings and outlines recommendations for a revised future version of the SLD and SE standards that resolves these issues.
The independent tests were performed using two open source applications; Geoserver and QGIS. In Test one, carried out by the Czech Armed Forces, the SLDs were authored in QGIS and exported to Geoserver. In the second test, carried out by IGN France, the SLDs were authored in Geoserver and viewed in QGIS.
1.1. Test one, Czech Republic Armed Forces
The following work flow was used to test the SLD files interoperability and to discover any deficiencies in the SLD standard:
1.1.1. SVG 1.1 files were created to construct complex symbols using Inkscape 0.91, this step is optional
1.1.2. Symbols were defined in QGIS (version 2.18 Las Palmas)
1.1.3. The symbols were then exported to SLD files, SVG files were used as a reference in SLD
1.1.4. The same SLD files were then imported and validated in Geoserver (version 2.9.2)
1.2. Test two, French (IGN)
The following work flow was used in the IGN test, figure 1 shows the data flow.
1.2.1. Preparation process
1.2.2. Shapefiles are stored in Geoserver (version 2.8.3) by its own interface
1.2.3. SVG are stored in Geoserver via WinSCP (version 5.8.4)
1.2.4. Styling process (in Geoserver interface)
1.2.5. For each class a style is defined by encoding in SLD/SE with potential link to stored SVG file
1.2.6. Defined style is assigned to layer class
1.2.7. Map preview
1.2.8. Each layer class is gathered by the Geoserver aggregated layers function
1.3. Datasets Used in the tests
1.3.1. MGCP TRD3
1.3.2. VMAP level 1 data sets in shapefile format
1.3.3. Natural Earth data set
1.4. Symbol set used
1.4.1. TDS Symbols data in SVG format created in Adobe Illustrator
DPTP has reviewed the results of the tests and concluded that many of the SLD and SE extensions available in Geoserver should be added to the SLD and SE standards. The DPTP also found the standards deficient in several major areas;
2.1. Advanced line styling
2.1.1. Line symbology with unique start and end symbols
Start and end symbols for the line symbols such as bridge and elevated pipeline are not a part of the standard SLD specification and currently must be solved by vendor extensions. Examples of expected results are shown in figure 2 and 3.
2.1.2. Perpendicular offset for polygons
The SLD tag <se:PerpendicularOffset> ensures an asymmetric placement of the polygon outline. However, there is a difference between QGIS and Geoserver in the direction (plus/minus) of the offset value.
Figure 4: Example shows Geoserver correctly placing the ticks on the outside to portray a mound; whereas QGIS places the ticks on the inside using the same parameters.
Figure 5: The example shows a mound incorrectly portrayed as a depression by QGIS. Ticks are to indicate direction of slope. The implementation is ambiguous in the standard.
NOTE: The SE 1.1.0 standard states that “The distance is in uoms and is positive to the left-hand side of the line string. Negative numbers mean right. The default offset is 0 The issue raise the question of whether the standard is clear enough.
2.1.3. Combined lines with ‘complex’ (svg) symbols
An SLD that is authored in QGIS and exported to Geoserver, using the SvgParameters, SLD tag <gap> does not produce the expected graphic in Geoserver. To be able to use this type of symbology the QGIS SLD requires extensive editing, replacing the SLD SvgParameters with the CssParameters that work within Geoserver.
Figure 6 shows a difference in the portrayal of the same code for a complex line (dash line + SVG symbol). It is not fully clear if the difference is caused just by “the units of measurement” or by other syntax incompatibilities. Appendix A shows the code used.
2.1.4. Rotation of Patterns within area symbols
The tag <se:Rotation> has a different syntax in Geoserver and QGIS which causes an inconsistent result between the two applications. The standard should clearly define the proper syntax. An example is shown in figure 7.
3. Recommended additions to the SLD and SE standards
3.1. Combined area and point symbols (e.g. area airfield) including multiple points
Irregular polygons may have point symbols that fall outside the polygon as a result of the anchor position. This is because the position of the anchor point varies in the two applications used in the test, leading to inconsistent positioning.
The desired behavior would be for the symbol to fall within the polygon and optimally central to the x and y axis regardless of the application used. DPTP recommends a common definition for the anchor point position.
3.2. Polygon hatching
Hatching is not a part of the standard SLD specification and is currently solved by vendor extensions. This functionality should be added to the standard.
3.3. Units of measure
The SLD and SE specifications support “on screen pixel”, “on ground meter”, “on ground feet”. QGIS includes “on screen mm” as a default measure, which is outside the standard. We recommend supporting “on screen mm” in the SLD and SE specifications. We recommend identifying “on screen pixel,” as the preferred units of measure in the SLD and SE specifications.
4. Issues for Further Investigation
The following issues have been identified as beneficial for further research:
4.1. The ability to invert a symbol color within a polygon (e.g. building & areas) would be a desirable function for the SLD and SE standards.
4.2. The DPTP requests OGC to consider evaluating competing alternative style encodings such as CSS, JSON, or YSLD as proposed in (Bocher & Ertz, 2016). If a suitable alternative style encoding is identified, further updates to XML-based SLD and SE specifications would not be required.
Further investigations and tests are recommended in the upcoming OGC Testbed (OWS 14).
The limited testing carried out by the DPTP has found some of the elements in the SLD and SE are deficient and hinder interoperability. The DPTP would recommend the following changes in the next version of the SLD and SE standards.
5.1. Include ‘Hatching’ for polygon fills and combined lines (currently solved by Geoserver extension)
5.2. Include start and end symbols for lines (currently solved by Geoserver extension)
5.3. Improve implementations of tags to remove inconsistent implementation by different applications
5.3.1. WellKnownName” Tags (e.g. Geoserver interprets some “WellKnownName” tags differently than QGIS)
5.3.2. The rotation tag has a different syntax in Geoserver and QGIS which causes different results
5.3.3. The PerpendicularOffset tag has different implementation in direction (plus/minus) depending on the application used. This has to be consistently implemented
5.3.4. The gap tag produces an inconsistent output in Geoserver (pixel or on ground meter) depending on the layer type. On screen pixel should be mandatory to implement in products
5.4. Further tests should be carried out in the next OGC Testbed (OWS 14), DGIWG is investigating the possibility of providing test data sets
Bocher E., Ertz O. 2016. Redesign of OGC Symbology Encoding standard for sharing cartography. PeerJ Preprints, https://doi.org/10.7287/peerj.preprints.2415v1
Example of SLD code produced in QGIS, showing a complex line with SVG symbol along the line