License Agreement

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

        

Document type:DGIWG Technical Report / OGC Discussion paper

Document date:26 October 2017

Edition:1.0.1

Responsible Party:DGIWG

Editor:Lars Schylberg, Lubos Belka

Audience:DGIWG participants and associates

Abstract:Template to create STD, TCR, and HBK documents

Copyright:(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/ >).


 

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

Email

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 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

 

Diagram showing IGN test environment
Figure : Diagram showing IGN test environment

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.

Bridge with start and end symbol highlighted with red circles, not part of the SLD 1.1.0 and SE 1.1.0   standards.
Figure : Bridge with start and end symbol highlighted with red circles, not part of the SLD 1.1.0 and SE 1.1.0   standards.

Elevated pipeline with start and end symbols, highlighted with red circle, not part of the SLD 1.1.0 and SE 1.1.0 standards.
Figure : Elevated pipeline with start and end symbols, highlighted with red circle, not part of the SLD 1.1.0 and SE 1.1.0 standards.

 

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.

 

Perpendicular line symbol depicted by Geoserver
Figure : Perpendicular line symbol depicted by Geoserver

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.

 

Perpendicular line symbol depicted by QGIS
Figure : Perpendicular line symbol depicted by QGIS

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.

 

Difference in the portrayal rendering of the same code for a complex line
Figure : Difference in the portrayal rendering of the same code for a complex line

 

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.

 

Usage of area pattern with rotation (difference in the portrayal rendering of the same code)
Figure : Usage of area pattern with rotation (difference in the portrayal rendering of the same code)

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