New in OpenGeo Suite 4.5: Style maps more easily with YSLD

Some years ago, I gave a talk at FOSS4G entitled “Styled Layer Descriptor, or How I Learned To Stop Worrying and Love XML.” Designed to appease the skeptical audience, I described some of the more nifty features of the SLD syntax that GeoServer uses to style its maps and layers. You could have been excused for not sharing in my enthusiasm and Dr. Strangelove fans may notice that I was equating XML with a nuclear bomb, so the point was never lost on me either.

For example:

          <CssParameter name="fill">#ff0000</CssParameter>
          <CssParameter name="stroke">#000000</CssParameter>
          <CssParameter name="stroke-width">2</CssParameter>

That’s a lot of markup just to create red points with a black outline. Can’t we do better? Indeed we can.

Maps are not web pages, alas

There have been a few efforts over the years to make improvements to how users style layers in GeoServer. One such notable attempt was to adapt the usage of CSS in web page design to the task of map making. At first blush, this seems like a perfect fit: web-based maps can use web-based design! And in truth, the CSS styling extension for GeoServer is a powerful tool for converting CSS-like markup to SLD.

There are issues, though. CSS uses a fundamentally different painting model from SLD, so it is not possible to convert freely back and forth between CSS and SLD. Generated SLDs typically have many more rules than the CSS rules, so a reverse converter would need to identify the redundancies and eliminate them. Because the underlying rendering engine was built on the SLD model, this was problematic, and rewriting the engine wasn’t feasible.

So then the question became: is there a way to simplify the syntax, while still remaining true to the underlying rendering model?

Y not?

Frustrated from working with SLD, one of my former colleagues came up with an idea: why not adapt an existing markup language? He was familiar with YAML, which we had used internally in our work with map printing. It was pleasantly terse and seemed suited to the task. This idea percolated for a while, and months later, has emerged as a central component of OpenGeo Suite Composer: YSLD.

Remember that SLD example above? Here it is as YSLD:

  size: 8
  - mark:
  	shape: circle
  	fill-color: '#FF0000'
  	stroke-color: '#000000'
  	stroke-width: 2

Much better isn’t it? Easier to read and more compact — and with many fewer brackets, that’s for sure.

There are other advantages to YSLD as well. Unlike XML, YSLD is schema-less, so ordering of components is not important. And for the first time, you can now define markup that is repeated throughout the document with a variable, so you can define it once and reuse it all over.

And, since YSLD uses the same underlying model as SLD, you can translate back and forth as you wish, making it completely interchangeable and compliant with OGC standards.

Get started with YSLD!

YSLD and OpenGeo Suite Composer are available exclusively to our enterprise customers. If you needed another reason to get OpenGeo Suite Enterprise, aside from proven on-demand support and maintenance, assistance with upgrades, and advice direct from the software developers, how about we add one more: a better way to style maps.

YSLD example

Have you checked out YSLD and Composer yet? Contact us to learn more or evaluate the tools.

New in OpenGeo Suite 4.5: Build maps with Composer

With the release of OpenGeo Suite 4.5, we’re proud to introduce OpenGeo Suite Composer, a tool for creating, styling, and publishing maps that is currently available exclusively to our enterprise customers. By focusing on the user experience, Composer makes authoring and publishing maps to GeoServer vastly easier than ever before with a simpler styling syntax, real-time feedback, and convenience features such as code-completion and sample code. Getting started is quick and straightforward.

Map styling is easy with YSLD

YSLD example

A typical workflow in OpenGeo Suite Composer starts with creating a new map, adding layers to it, tweaking the sample code provided for the layers, and saving the map. The new YSLD styling syntax is shorter and easier to write and, while still remaining compliant with OGC standards, represents a significant departure from the SLD syntax that was the main method for styling data layers in OpenGeo Suite. Thanks to its terse notation, a YSLD code block for styling a data layer might be 12 lines whereas its exact SLD counterpart could easily be 40 or more lines.

See the map as you edit

This new syntax combined with the ability to view changes in real-time enables cartographers to improve the quality of their maps, thus speeding up the styling process. Taking a look at the Composer interface, shown in the video above, we can see that the map takes up a large portion of the interface and is zoomable (a), that the data layer list is accessible via a re-sizable column in the center (b), and that the code for the selected layer is editable on the right-hand side (c).


Productivity boosters

To further enhance productivity, we’ve introduced a number of convenience features. For example, the ability to set zoom levels in the code for styles that change by zoom. In the above example, for the layer “natural,” zooms 7 and higher will display with the fill color, stroke color (i.e., outline color), and stroke width specified. Other zoom levels will not display that data layer. Previously, it was necessary to provide minimum and maximum zoom levels by source-scale denominator, and while that is still an option in YSLD, it can be difficult and verbose. Other features include:

  • Colors can be chosen via a color wheel interface or specified by color name (e.g., “green,” “blue”)
  • Any number of rules can be provided for a data layer
  • The order in which the code specifies things like filters and symbolizers is flexible
  • Code autocomplete is provided via keyboard shortcuts
  • See attributes for each data layer so they can be used in styling rules (e.g., features of type=park are green while type=hospital are pink)
  • Pan and zoom the map to determine which data layers should appear at which zoom levels

Less hassle means more designing

OpenGeo Suite Composer is not just an improved alternative to SLD, it is a significant interface overhaul that enables cartographers to make maps in a way that provides instant visual feedback and a much gentler learning curve. With Composer, a cartographer’s emphasis is primarily oriented toward the design of sophisticated cartographic compositions—a welcome sight.

A Composer-built map example

This example map, best viewed at zooms 4-10, was designed in OpenGeo Suite Composer, employing many Natural Earth datasets as well as a high-resolution land boundary built from OpenStreetMap polygons. Additionally, a high-resolution OpenStreetMap natural area dataset is visible in Canada at the higher zoom levels.

Try OpenGeo Suite Composer!

OpenGeo Suite Composer is available exclusively to our enterprise customers. Contact us to learn more or evaluate the tool.

OpenGeo Suite 4.5 Released!

Boundless is proud to announce the release of OpenGeo Suite 4.5! Each new version of OpenGeo Suite includes numerous fixes and component upgrades as well as bringing many new features and improvements to the platform, including:


Try it!

Download OpenGeo Suite 4.5 and try our census map tutorial or heat map tutorial to learn more. Details about this release are included in the release notes and, as always, we strongly advise you to read the updating instructions and backup your data before installing.

Want to try out new features like Composer? Interested in support and maintenance from the experts at Boundless? Contact us to learn more about our OpenGeo Suite Enterprise offerings!

Use promotional code suite45 for a discount of 45% on training for the next week.

Happy PostGIS Day!

PostGISYesterday was GIS Day, which means that today is PostGIS Day — get it? Post-GIS Day! To celebrate, we’re giving a 50% discount on online PostGIS training through the end of the week! Visit our training catalog and use promo code “postgis2014″ to take advantage of this offer.

A lot has happened since last year, when I joined Stephen Mather, Josh Berkus, and Bborie Park in a PostGIS all-star hangout with James Fee.

In case you missed them, here are some features from our blog and elsewhere that highlight what’s possible with PostGIS:

An, as always, be sure to check out our workshops for a slew of PostGIS-related courses, including Introduction to PostGIS and our Spatial Database Tips & Tricks.

Interested in learning about or deploying PostGIS? Boundless provides support, training, and maintenance for installations of PostGIS. Contact us to learn more.

Partner Profiles: Gaia3D

Boundless partners are an important part of spreading the depth and breadth of our software around the world. In this ongoing series, we will be featuring some of our partners and the ways they are expanding the reach of our Spatial IT solutions.

Gaia3DLong-time Boundless partner Gaia3D is a software development and system integration firm focused on solving spatial IT challenges for government and research institute clients across South Korea. Since Gaia3D founder Sanghee Shin was first exposed to open source geospatial solutions many years ago at a FOSS4G conference, he and the team at Gaia3D have been vocal advocates for open source. The company initially reached out to Boundless (then OpenGeo) for guidance as they worked to introduce open source geospatial to the burgeoning South Korean market. The enterprise OpenGeo Suite packaging and support enabled Gaia3D to foster adoption of these powerful new tools.

“OpenGeo Suite is equipped with everything we need,” said Gaia3D Director of Marketing Heegu Park.

Gaia3D’s recent development efforts include projects for the Korea Aerospace Research Institute, Korea Meteorological Administration and the Korean Ministry of Land, Infrastructure and Transportation. Their partnership with Boundless has provided essential tools and resources for giving their clients the best possible service. For the Ministry of Land, Infrastructure and Transportation, Gaia3D deployed OpenGeo Suite Enterprise to develop a mobile traffic information system, responsible for tracking traffic throughout the country during specific peak traffic times. As proof of the the outstanding performance OpenGeo Suite Enterprise delivers, this system is designed to handle over 100,000 concurrent connections at peak time and is capable of serving up to 1 million tiles per hour from a single cache server. The system generates 14 leveled image tiles after processing all traffic information from up to 240 thousands road links per minute.

As part of their strong commitment to open source, the company has been instrumental in translating open source GIS software and manuals to Korean, and they also recently played a pivotal role in winning the bid to host the 2015 FOSS4G Conference. So they hope to see us all in Seoul next year!

If you’d like your company to be considered for our international network of partners, please contact us!

QGIS Compared: Editing data

Gretchen PetersonAs mentioned in my previous posts about visualizationcartography and analysis, QGIS is easy-to-install, integrates with OpenGeo Suite, and has reliable support offerings, making it a viable alternative to proprietary desktop GIS software such as Esri ArcGIS for Desktop. While editing spatial data is not something that everyone does, it is definitely an important component of desktop GIS. So how does QGIS perform when it comes to editing data?

Strength: Creating Shapefiles

To start off with, the simple act of creating a new shapefile is actually a bit easier in QGIS than in other software. For example, in ArcGIS the typical workflow is to open a folder catalog to locate a folder, then right-clicking and choosing New > Shapefile. The workflow in QGIS is to simply click the New shapefile layer button (a), put in some of the details, and then save it in a standard Save As dialog. Adding new features to the new layer is straightforward in QGIS. When the new shapefile is added you click the toggle editing button (b) and then add a new feature with the Add feature button (c).


Once digitizing of the new feature is complete, you must right-click to finish the feature. This triggers a pop-up window that displays the attributes of the new shapefile and allows you to fill in the attributes. This prompting for attributes after each completed feature could be cumbersome for some workflows, especially those that involve many features that will all have the same attributes, but it is more intuitive for smaller, simpler jobs. A little sleuthing, however, uncovers a setting for suppressing this pop-up under Settings > Options > Digitizing.

Strength: Copying & Pasting

Copying and pasting of features from one dataset to another is actually quite easy in QGIS. In fact, it’s so easy that you may be able to accomplish it without consulting any how-tos (an important productivity enhancer in my opinion). It’s intuitive: click the layer that you will be selecting features from in the table of contents, select the features in the map or in the table and hit Ctrl-C (⌘C on OS X), then select the layer you want to copy to, click the edit button (pencil icon), then hit Ctrl-V (⌘V on OS X). As a bonus, you can also copy and paste WKT strings to and from QGIS.

Strength: Snapping and Topological Editing

Snapping is also easy, intuitive, and familiar, though new users might be surprised that it is turned on by default. This may cause some confusion if the snap tolerance is too high, making it seem like new features can’t be digitized without sharing a vertex with an existing feature. The snapping tolerances can be adjusted in the Snapping options found in the Settings menu (a). When editing existing polygons, it is often useful to make sure that shared boundaries move together. To accomplish this in QGIS, check Enable topological editing in that same snapping dialog (b). Once checked, it will detect shared boundaries and move them together.


Strength: Working with Vectors

In proprietary GIS software, converting lines to polygons is typically only possible in advanced versions of the software but QGIS makes it easy to accomplish. It is fairly straightforward to use the Lines to polygons tool that comes out-of-the-box in QGIS under the Vector menu. Tracing existing features is also possible via the QGIS plugin called AutoTrace.


Mixed Results: Feature Templates

Feature templates are short-cuts that allow you to digitize easily by self-populating “type” attributes in a layer (e.g., road, sidewalk, tunnel). Feature templates aren’t currently available in QGIS. If you digitize many different feature types at once then QGIS may slow your workflow as you’d have to manually input each attribute as you finish each feature.

Hidden Gem: CadTools

Some of the advanced feature construction tools that you might be familiar with such as points at invisible intersections, regular arcs, Bézier curves, and trace aren’t available in the core QGIS software but they are available in plugins. One of the most notable plugins for advanced feature construction is CadTools. CadTools provides 13 advanced tools for workflows that require high accuracy at large scales.


While I set out with fairly low expectations regarding QGIS editing, my impression of the QGIS editing tools has been outstanding. If the basic tools aren’t enough, the plugins come to the rescue with advanced functionality. As with visualizationcartography and analysis, it’s clear that the QGIS developers are cognizant of the demands that we GIS professionals put on our software in terms of needing exacting, fool-proof, and robust editing tools and they have made great progress in meeting those needs.

Partner Profiles: Addition

Boundless partners are an important part of spreading the depth and breadth of our software around the world. In this ongoing series, we will be featuring some of our partners and the ways they are expanding the reach of our Spatial IT solutions.

Addition“Since becoming Boundless partners, we have been able to take advantage of next generation spatial technology. We find the public agencies and private businesses we work with to be increasingly interested in cost effective, professional open-source solutions, moving away from old and tired, closed products,” says Diogo Vitorino, principal of Addition, a Lisbon–based Boundless Partner.

Founded in 1998, Addition builds online information systems, sophisticated websites and mobile applications for large government efforts initiated by organizations such as National Registry for the Portugal Environment Agency and Portugal’s Institute for the Conservation of Nature and Forest.  The company’s services include infrastructure management, state-of-the-art web user interfaces, and informed IT consulting. In order to achieve this, Addition relies greatly on many of the components that make up OpenGeo Suite, including PostGIS, GeoServer, and OpenLayers.

Addition Baseform Monitor

Addition’s portfolio continues to rapidly develop, and the company has recently completed projects for Australia’s largest water utility, Sydney Water; the US Environmental Protection Agency; the Portuguese Environment Agency and multiple water utilities in Portugal. Addition has also created public portals for the Portugal Ministry of Education, they were also instrumental in creating the Eurocean website, which harmonizes data from marine research agencies across Europe, and they are the purveyors of Baseform, an open and collaborative platform for networked utility infrastructures.

“The ability to collaborate on and to discuss upcoming solutions directly with the main developers of open-source projects such as PostGIS or OpenLayers is invaluable,” continues Vitorino.

If you’d like your company to be considered for our international network of partners, please contact us!

QGIS Compared: GIS Analysis

Gretchen PetersonAs mentioned in my other posts on visualizationcartography and editing, QGIS is easy-to-install, integrates with OpenGeo Suite, and has reliable support offerings, making it a viable alternative to proprietary desktop GIS software such as Esri ArcGIS for Desktop. I showed that it works very well for visualizing most formats of spatial data and creating beautiful maps, but how well does it perform GIS analysis?

Many of the analytical capabilities in QGIS will pleasantly surprise the seasoned GIS analyst. The tools are easy to find and are intuitive to use. For example, inputs self-populate with any data already loaded into the project and many of the processes run faster than on heavier-weight proprietary GIS software. Still, comparing some of the differences and similarities between QGIS and other GIS software with respect to commonly performed analytical tasks is helpful. To that end, I’ll discuss hillshading, attribute calculation, generalizing, and running multiple tasks via models.


In proprietary GIS software such as Esri ArcGIS, hillshades are created from elevation data either temporarily or permanently. Temporary hillshades help preserve disk space while permanent hillshades can be reused in other GIS projects just as with any saved dataset. A sometimes overlooked benefit of the temporary hillshade method is that, because it is dynamically tied to the original elevation data, the z factor is recalculated as the map is zoomed in or out, allowing for a more realistic visual effect. QGIS has much the same options for creating hillshades as other tools except that all hillshades are saved in permanent files, so the dynamic z factor is not possible. The creation of hillshades can be a very basic process of accepting defaults or a very complex process with many factors for the user to tweak.


Software designed specifically for rich 3D visualization can ingest outputs from QGIS or other GIS software to create even more realistic hillshades. Blender is one such open source project that is not to be missed if you want to step up your hillshading a notch higher than what can be accomplished in GIS programs. (See also, Daniel Huffman’s Blender Tutorial.) However, the basic hillshading capabilites found in QGIS are directly comparable to that found in proprietary GIS.

Attribute Calculation

Working with tables in GIS is normally a bit difficult, no matter what GIS software you use. In proprietary products and in QGIS, the typical workflow is to load a dataset into the project, right-click the dataset name in the table of contents, select open table, and view the table of data in the separate window that pops up. Editing those attributes, adding columns, changing column names, and so on, has typically been quite difficult. QGIS, however, has made some improvements on this. Not only can column (field) names be changed, but there is now—as of QGIS 2.4—an easier way to calculate new field values than the field calculator. An Excel-like field bar with an expression box was created by Nathan Woodrow and is thoroughly explained in his post on the subject. Attribute calculation and manipulation is therefore directly comparable to that found in proprietary GIS, and with the new expression box, perhaps even easier.


Generalization of line and polygon geometry is considered an edit task in other software and is therefore included in the pricier editing versions of the software. There are two types of generalizing to consider: smoothing and simplifying. Smoothing decreases small curves (e.g., a river that generally follows a single arc but has many sinuous curves along the way could be smoothed such that the smaller curves are eliminated for small scale visualization). Simplifying decreases the number of vertices along a line or polygon such that the lines become more jagged but are faster to load and render. Smoothing in QGIS must be performed by installing the Generalizer plugin or by using the v.generalize plugin in the Processing menu. The Generalizer plugin works on line features while the v.generalize plugin also works on polygons.

For simplifying, QGIS’s Simplify Geometries tool is found under the Vector menu in the Geometry Tools section and is easy to use. Tests showed that it will simplify 4 million vertices by 97% in approximately 13 seconds (shown below). Generalizing in QGIS is therefore very similar to generalizing in proprietary GIS.



Analysts often string together a series of analyses together and want to test the resultant model out with different input datasets or different input parameters. This is fairly easy to do in both proprietary GIS software and with QGIS. In QGIS this capability is located in the graphical modeler, and while it does have some differences, it serves the same purpose and is flexible enough for even the most complicated models. Below is an example of a model from our Introduction to QGIS training course.


Hidden Gem: Frequency Statistics

Frequency statistics can now be calculated from polygon-raster overlays in QGIS. This capability was developed as part of our new QGIS for Analysts workshop, first presented at FOSS4G 2014. The script, called, is located on the QGIS GitHub Scripts page. The Frequency Statistics process takes a vector layer and a raster layer as inputs and outputs a new copy of the vector layer with some additional attributes that provide information on the most-common and least-common raster values within the vector layer polygons, noted as MAJ for “majority” and MIN for “minority” respectively. It also creates a table output which gives a detailed breakdown of all the different raster values for each feature.


For the common analytical workflows discussed above, we’ve shown that QGIS works quite well. For a free software product it may even be surprising that it includes many analytical procedures that are usually thought of as advanced and priced accordingly. My conclusion from conducting these tests is that the analytical capabilities in QGIS are such that, as with visualizationcartography and editing, it can absolutely be considered a viable alternative to your current GIS software.

Creating a custom build of OpenLayers 3 (Revisited)

OpenLayersSince OpenLayers 3 likely includes more than needed for any single application, we previously described how to generate custom builds with just the relevant code.

As promised back in February, things have changed for the better and it’s now easier than ever to create a custom build of OpenLayers 3 thanks to a task called build.js that uses a JSON configuration file. Documentation for the tool resides here.

Configuration file

We will now use build.js to create a custom build for the GeoServer OpenLayers 3 preview application, the same application that we used in our previous blog post. The full configuration file for our application can be found here.

The exports section of the configuration file defines which parts of the API will be exported in our custom build. By using the name of a class such as ol.Map we export the constructor. By using a syntax such as ol.Map#updateSize we are exporting the updateSize method of ol.Map. The exports section is basically the replacement for the exports file that we used in the older blog post.

We did not make any changes to the compile section. In the define section we are using the same defines as we were using before with Plovr, but its syntax is a bit different "ol.ENABLE_DOM=false" versus "ol.ENABLE_DOM": false. By the way, OpenLayers 3 does not use Plovr anymore.


To compile our custom build, first make sure you have run npm install in your OpenLayers 3 git clone directory, then use the following command:

node tasks/build.js geoserver.json ol.min.js

The first argument (geoserver.json) is our build configuration file, the second argument is the name of the output file.

That’s it!

The end result should be a much smaller file tailored specifically to the needs of this specific application.

Interested in using OpenLayers in your enterprise? Boundless provides support, training, and maintenance. Contact us to learn more.

QGIS Compared: Cartography

Gretchen PetersonAs mentioned in my other posts about visualization, analysis and editing, QGIS is easy-to-install, integrates with OpenGeo Suite, and has reliable support offerings, making it a viable alternative to proprietary desktop GIS software such as Esri ArcGIS for Desktop. I’ve written a couple of books on designing cartographic products so it is something I’m passionate about and it is definitely an important component of desktop GIS. So how does QGIS perform when it comes to cartographic design?

In making the examples for this blog post series, I was impressed by the capabilities of QGIS and found it was easy and straightforward to create maps like the Halloween map below.

Halloween in Fort Collins, 2014

Strength: Text and Image Elements

Placing text and images is as easy as finding the Add new label and Add image buttons on the left-hand side of the print composer (a). Once you add a text box or any other element, the Item properties tab on the right-hand side of the print composer gives you most of the complex options that you’d find in any layout or commercial GIS software such as alignment, display, and rotation (b). You can also align these elements by using the Align selected items button in the main button bar (c).


Strength: Advanced Techniques

Advanced labeling functionality is included in the main QGIS interface, including SQL-based labeling, font choice, and placement protocols. Exporting a layout to SVG for editing in Inkscape or other design software is easy. Another advanced technique is the creation of atlases, or map books, that replicate a layout for each part of an indexed main map. QGIS provides an atlas composer as part of the core functionality within the Print Composer, a very powerful feature.

Strength: Color Blending

An exciting feature is the addition of color blending modes, typically found only in design software, that can add special effects to the look and feel of the map by adding texture or special brightening effects, for example. The following modes are available: lighten, screen, dodge, addition, darken, multiply, burn, overlay, soft light, hard light, difference, and subtract. Color blending can be applied to a single layer in the layer properties dialog (a) or it can be applied to an entire map in the Print Composer (b).


Mixed Results: Map Elements

Adding the map to the layout is a little more difficult if you are used to commercial GIS software. You have to use the Add new map button (the wording of which I found to be confusing since it somehow implies a new map rather than the existing map in your project), which adds the map from the main QGIS project to the layout. Another potential area of confusion is the fact that once the map element is added to the project, it doesn’t dynamically update if the main map is changed. In fact, to update it there are actually two buttons in the map element’s Item properties: one to update the preview and the other to set the map extent. The former updates the map if a new map layer has been added or the symbology has changed but only the latter updates the map if it has been panned or zoomed. These, however, are minor quibbles.

Mixed Results: Sizing and Graticules

The Print Composer does have a few shortcomings that I suspect will be cleaned up in later releases. It isn’t possible to change the size of multiple images all at once. For example, enlarging the pumpkin images in the right-hand information panel of the example map has to be done for each pumpkin separately since selecting them all and changing the properties isn’t possible. Also, there is no graticule functionality in the Print Composer. Instead, the user would need to find or create a graticule line dataset to add as a layer in the map if a graphic-like grid was desired. Another minor quibble is that the size dialog for images has the wrong tab order (if you try to tab between the input boxes the tabbing skips boxes instead of sequentially moving the cursor to the next input box).

Hidden Gem: Gradient Fills

Gradient fills, also known as vignette effects, are also possible, in a new plugin called Shapeburst. You can use it to achieve subtle shading along land-water boundaries but also to do some unexpected things like banding the edges of administrative boundaries in different colors or to reverse-fade the edges of a map. This latter effect takes advantage of QGIS’s built-in inverted polygons tool, which simplifies what used to be a task that would take several steps to achieve.


The cartographic capabilities of QGIS are sufficient to produce almost all the common map layout components with an adequate amount of advanced capabilities and even some options, like the color blending modes, that aren’t typically found elsewhere. Cartography is where many people think that QGIS falls short. However, in making the examples for this blog post series, including the Halloween map, I was blown away by its capabilities. See also the QGIS Map Gallery for more map examples. Overall, my experience with QGIS has been that the visualizationcartography, and editing functions of QGIS have matured to the point where GIS professionals of all types can’t afford not to strongly consider adopting it.