Wednesday, September 20, 2017

More on SLD and SE

Styled Layer Descriptor (SLD) and Symbology Encoding (SE) are two related OGC standards. They have been around for over a decade but I think we can safely say that they have not definitively met their primary purpose - to enable the portrayal of feature data in an interoperable way. The most common complaint with these standards boils down to one thing - a high barrier to entry. This manifests itself in a few ways:
  1. SLD and SE are XML encodings. While many server-side developers are comfortable dealing with XML, this only represents a small fraction of the market these days. Most developers want nothing to do with XML if they can help it. JSON is a more natural choice for web applications, mobile applications, and many server-side frameworks. CSS is comfortable for many front-end developers. SQL developers (think GeoPackage) want to be working with SQL predominantly. A way past this issue would be to produce a conceptual model that could then be implemented in formats more appropriate for the target environment. The conceptual model could then be implemented a fairly small number of times and then abstracted for the various encodings.
  2. SLD and SE are fairly complicated. The documents are long and intimidating and compliance is an all-or-nothing affair. It would be helpful to have something akin to "Simple Features" for SLD and SE - a core that only covers the most important and common options. Like most things in software development, the Pareto Principle applies.
  3. Tools are lacking. There is currently no public executable test suite for the two standards. While GeoServer's SLD and SE support are pretty robust, alternatives are pretty hit-or-miss. If we want people to use these standards, we need the tools that make them easy to use.
On the flip side, SLD and SE also suffer from a lack of extensibility. There are use cases that cannot be handled by SLD and SE out of the box[1] and without an extension mechanism, there is no clear way for a developer to introduce interoperable solutions. This means that complex portrayals (think MIL-STD-2525) are a non-starter.

When a solution is not ideal for either the low end (lots of potential users) or the high end (lots of potential funding), all that is left is the skinny middle and it isn't enough. This is solvable if we have the will. That phrase is key - if we have the will[2]. The solution is not going to fall from the sky. It is going to take effort and leadership from a number of organizations over the course of more than a year. OGC appears to be willing to take the lead here but the effort requires community support to be successful. There will be opportunities to participate and I hope that you will find a way to do so. 

[1] The "TENET report" enumerates several limitations of the OGC SE, including hierarchical symbols, multiple delineations, and pivot points.
 
[2] Total tangent here. I first drafted this post on 9/13/17 and happened to include this phrase which comes from a Grant Hart song of the same name. That very night he passed away (unexpectedly, at least to me). RIP Grant.

Tuesday, September 12, 2017

Improving geopackage.org

Part of my job as GeoPackage SWG Chair is to improve outreach. This includes disseminating information (like this blog post) but it also means making information easier to discover. I feel good about the state of the specification / encoding standard but our outreach leaves room for improvement. One potential area of improvement is our website, geopackage.org. It is okay but it could be much better.

Over the next few months, I intend to revamp this site to make it more useful for its target audiences. When a visitor reaches the site, it should be self-evident where to go for relevant information. We're not there today. In response, I plan to reorganize the content to align it by reader type: general, developer, administrator, data publisher, data consumer, and SWG participant.

For this to work, I need more input from the user community. For example, a geopackage.org reader may wish to learn not only what GPKG implementations are out there but what they are useful for. Therefor I will be reaching out to vendors to clarify the role of the software that is currently listed under http://www.geopackage.org/implementations.html. I am also going to solicit user guides and demonstrations that can be incorporated into the site. This content can describe FOSS or proprietary software; my goal is to inform and to present options to the community.

If you can help me out here, I want to know about it.

Friday, September 1, 2017

A Busy Time at GeoPackage

Things have been busy on the GeoPackage front. I sense an uptick in both interest and adoption of GeoPackage. FOSS4G was the most public example but there have been others. With this in mind, I would like to share three recent developments. It is a busy time at GeoPackage!

1. GeoPackage 1.2 has been formally adopted by OGC. The OGC standards page has the "official" PDF version of the document (edit: and now the release notes) and the HTML version is what is currently at geopackage.org/spec. Thanks go to the large number of people who made this release possible.

2. OGC has released "OGC GeoPackage Extension for Tiled Gridded Coverage Data" for public comment. This extension is a reworking of the elevation extension. The primary change was expanding the scope of the extension from just elevation data to any regular gridded coverage data. The normative changes from the original extension are minimal - just a few additional columns that allow us to define what content is held in the tiles. We expect that implementers will find it easy to transition from the elevation extension to this one.

 
3. OGC has issued a call for participants for the "GeoPackage Related Tables Extension Interoperability Experiment". Yes, that is a mouthful. The idea is that our friends at Compusult have produced an extension for associating tables with existing feature or attribute tables in a GeoPackage. Among other things, it can be used to establish a many-to-many relationship between features and multimedia files. We are looking for willing participants (OGC membership optional) to help us determine if the extension accomplishes what it is designed to do. If you are interested, please accept the Observer Agreement and plan to dial into the kickoff tentatively scheduled for September 25.

Saturday, July 8, 2017

Let's Make a GeoPackage Extensions Registry

One of the best ideas I have heard recently is that there needs to be a registry for proprietary GeoPackage extensions. While OGC has a number of registered extensions as part of the encoding standard, is it only natural that there are going to be proprietary ones out there. What we don't have today is a way for developers to see what exists as prior art. We then run the risk of developers reinventing the wheel and the longer this persists, the harder it is to deal with. The last thing we want is multiple competing extensions out there and no interoperability between them.

I believe an extensions registry will address this problem effectively. I will do the legwork for creating it. In the short term it is going to be pretty simple - just a web page off of geopackage.org with a bunch of hyperlinks. I will use the Leaflet Plugins page as inspiration; hopefully one day we will end up more like QGIS Plugins but it won't happen overnight.
Update: this is now live at http://www.geopackage.org/extensions.html.

To be added to the registry, I will need from the developer a completed Extension Template [1]. This template includes all of the information developers will need to understand what the extension does and how it works. I will post the template to geopackage.org (or more likely, link to it) and help publicize it. If the extension suits other people's needs then great! If a number of implementers start using a particular extension, let the GeoPackage SWG know and we will discuss whether it is ready to be adopted by OGC.

[1] The raw AsciiDoc of the template is on GitHub. If filling out a template is going to be a major problem, let me know and I'll see what can be done to help you out.

Saturday, July 1, 2017

The Styling / Portrayal Ad Hoc Meeting



On Thursday June 29, I facilitated a Styling / Portrayal Ad Hoc at the OGC Technical Committee Meeting. This ad hoc meeting was called because there is broad agreement that GeoPackage would benefit from standardized feature styling and portrayal capabilities. (Anecdotal evidence suggests that the lack of common/standardized solutions here is already inhibiting GeoPackage adoption.) However, there is also agreement in OGC circles that whatever capabilities used by GeoPackage should apply across all of OGC Simple Features. The meeting was attended by over 40 people (combined in-person and on-line[1]).

Much of the meeting centered around Styled Layer Descriptor (SLD) and Symbology Encoding (SE), two OGC encoding standards[2]. The consensus was that while these are annoying (XML!) formats to work with and that they have a number of issues, they are not that far off for meeting most needs. (The geospatial community has created a number of specifications over the years but none of the alternatives have been standardized and many of them have been abandoned.) The attendees tentatively agreed that attempting to move SLD/SE forward was the best available option for supporting the desired capabilities in a timely manner.

The attendees agreed on the following action items:
  Rechartering the SLD/SE Standards Working Group (SWG) with the goal of producing updated standards that feature a core and extensions model and/or multiple conformance levels so that there is some separation between essential and non-essential elements
  Finding someone to create an executable test suite, developer’s guide, and other materials to lower the bar for developer use
  Initiating a pilot to experiment with the SLD/SE changes
My own next step is to take these findings back to OGC’s Architecture Board and try to turn them into action.

[1] Don't get me started on the pathetic state of hybrid in-person / on-line meetings in 2017.
[2] There was also discussion of portrayal registries, but that is a topic for another day.


Wednesday, May 3, 2017

Good News / Bad News

First the good news. OGC's Architecture Board (OAB) has approved our request to send GeoPackage 1.2 to the Technical Committee (TC) for an electronic adoption vote. This vote will start in a couple of weeks and there is a high likelihood that this version will be fully adopted by OGC by the end of June. 

The bad news is that the Elevation Extension has been delayed. The OAB requested that the extension be removed from version 1.2 so that it can be worked on separately. The feeling was that elevation data was too important to be rushed and that more time was needed to align it to other parts of the OGC baseline including things called "Geographic information — Schema for coverage geometry and functions"[1] and "Coverage Implementation Schema"[2].

I know this decision will cause uncertainty in the GeoPackage community. The extension does what it does and there is nothing keeping people from using it as is right now. Your mileage may vary. We should probably give it an alias (something without a gpkg_ prefix) to distinguish it from other adopted extensions. Other than that, we will have to wait for the process to play out. I made sure that someone was committed to carrying the extension to adoption.

[1] This document is dual published as OGC Abstract Specification Topic 6 (Schema for coverage geometry and functions) and ISO 19123 (Geographic information — Schema for coverage geometry and functions).
[2] This document used to be called GMLCOV but it was renamed when version 1.0.1 was adopted.

Wednesday, March 29, 2017

GeoPackage vs. Extended GeoPackage

One constant area of confusion is the notion of "GeoPackage" vs. "Extended GeoPackage". The idea is that a file using just core elements would be a GeoPackage and that one including extensions would be an Extended GeoPackage. However, this has caused problems in practice and we have had to adapt. A couple of months ago I wrote about non-spatial tables. Recently we got rid of the clause that allowed Extended GeoPackages to use the .gpkx extension (no one was). It turns out that this wasn't enough. 

We have been getting some push-back on the WKT for Coordinate Reference Systems extension because it adds a column to the gpkg_spatial_ref_sys table. While we feel that we were justified in this decision, it does affect some design decisions. For one thing, Object Relational Mappings are more complicated when a column might or might not exist. However, we have gotten feedback from other developers that adding columns to tables as part of extensions is a reasonable and necessary technique. What to do?

I propose to tweak a few requirements to get past this. To summarize, the GeoPackage designation acts as a sort of compatibility mode. At the expense of extensions, you get maximum interoperability. If you produce a GeoPackage with extensions (by definition an Extended GeoPackage) then your risk of interoperability issues increases (though hopefully is still small). We hope that applications and libraries will grow to deal with extensions gracefully but in the meantime, avoiding unnecessary extensions does provide the greatest interoperability. 

Does this work for you? Let me know here, on the mailing list, or on Twitter.