Acknowledgement
i. Contributing participants
Nation |
Parent organization |
---|---|
Czech Republic |
Military Geographic and Hydrometeorologic Office (MGHMO) |
France |
Institut Geographique National (IGN) |
New Zealand |
NZDF - GeoInt New Zealand (GNZ) |
Sweden |
National Land Survey of Sweden |
United Kingdom |
MOD - Defence Geographic Centre (DGC) and Joint Forces Intelligence Group (JFIG) |
United States |
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:
Person |
Organization |
|
---|---|---|
Lars Schylberg |
FMV (SWE) |
lars.schylberg@saabgroup.com |
Leigh Carpenter |
JFIG (GBR) |
Leigh.carpenter863@mod.uk |
Lubos Belka |
MGHMO (CZE) |
lubos.belka@vghur.army.cz |
Doug Stiles |
NGA (USA) |
Douglas.P.Stiles@nga.mil |
Pierre Pradier |
IGN (FRA) |
pierre.pradier@ign.fr |
Document approved for public release use:
All questions regarding this document shall be directed to the
iii. Revision history
Date | Edition number | Primary clauses modified | Description |
---|---|---|---|
2017-03-27 |
0.5.0 |
|
First draft |
2017-04-03 |
0.5.1 |
Comments from Doug Stiles incorporated |
|
2017-05-30 |
0.5.2 |
Editing and formatting |
|
2017-06-30 |
1.0.0 |
Editing and formatting |
Based upon the 7 June telecon |
2017-10-26 |
1.0.1 |
Comments from OGC (Gobe Hobona) incorporated |
|
Introduction
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.
1. Methodology
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 ForcesThe 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
2. Findings
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).
5. Summary
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
6. References
Bocher E., Ertz O. 2016. Redesign of OGC Symbology Encoding standard for sharing cartography. PeerJ Preprints, https://doi.org/10.7287/peerj.preprints.2415v1
Annex A
Example of SLD code produced in QGIS, showing a complex line with SVG symbol along the line
<?xml version=“1.0” encoding=“UTF-8”?>
<StyledLayerDescriptor xmlns=“http://www.opengis.net/sld” xmlns:ogc=“http://www.opengis.net/ogc” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” version=“1.1.0” xmlns:xlink=“http://www.w3.org/1999/xlink” xsi:schemaLocation=“http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd” xmlns:se=“http://www.opengis.net/se”>
<NamedLayer>
<se:Name>L_FerryCrossing</se:Name>
<UserStyle>
<se:Name>L_FerryCrossing</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>Single symbol</se:Name>
<se:LineSymbolizer>
<se:Stroke>
<se:GraphicStroke>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type=“simple” xlink:href=“AA_LTDS/PT_Black_FenceX.svg”/>
<se:Format>image/svg+xml</se:Format>
</se:ExternalGraphic>
<se:Size>11</se:Size>
</se:Graphic>
<se:Gap>
<ogc:Literal>36</ogc:Literal>
</se:Gap>
</se:GraphicStroke>
</se:Stroke>
</se:LineSymbolizer>
<se:LineSymbolizer>
<se:Stroke>
<se:SvgParameter name=“stroke”>#0b75ef</se:SvgParameter>
<se:SvgParameter name=“stroke-width”>2</se:SvgParameter>
<se:SvgParameter name=“stroke-linejoin”>round</se:SvgParameter>
<se:SvgParameter name=“stroke-linecap”>square</se:SvgParameter>
<se:SvgParameter name=“stroke-dasharray”>21 14</se:SvgParameter>
</se:Stroke>
</se:LineSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
The PT_Black_FenceX.svg file referenced by the example SLD can be found at https://github.com/ngageoint/TM_UTDS_SVG