GeoServer Blog

GeoServer chart extension

Business reporting is a common need in various organisations. Most of the time, it is built upon tables and simple charts, such as pie or bar charts. Yet, sometimes, you need to add an extra dimension into it, in particular, geographic distribution. In some cases a thematic map does the job nicely, but if you need to represent the composition of a phenomena relying on more than one variable, the result ends up being hard to read.

This is where the overlay of charts and maps come into play: the idea is to overlay bar chars, or pie charts, over a polygon or point map, associating each geographic feature with its own little diagram. As surprising as it may sound, you have been able to create such maps with GeoServer since a few months ago: by putting together the dynamic symbolizers feature and the Google Charts online API, it’s already possible to nicely overlay charts of top of a map. This works great in conjuction with the KML output, where the client has to go and fetch the chart separately anyways. However, it present some limitations in the classic WMS case:

  • you are depending on an external service that’s not under your control

  • if there is any missing feature, you can just ask and hope that next release will include that feature

  • rendering the charts requires remote calls, which will slow down the map rendering significantly, at least for the first requests

An open source solution, completely embedded in GeoServer, would guarantee control over the service availability, over its features, and provide excellent performance. David Gilbert, of JFreeChart fame, must have thought the same when he developed Eastwood Charts, an open source implementation of the Google Charts API.

The GeoServer charting module builds on top of Eastwood charts, bridging it with the dynamic symbolizers capabilities already available, to provide fast, in process charting over the map. Let’s have a look at an example built on top of the usual topp:states demo layer. We are going to depict the distribution of male/female population in the various states using pie charts, and to make the diagram more interesting, we’ll make the pie size proportional to the total amount of people in the state. Here is how the result will look:

You can download the full style if you like, here we’ll have a look at the snippet in which the diagram is setup:

  <PointSymbolizer>
    <Graphic>
      <ExternalGraphic>
        <OnlineResource xlink:href="http://chart?cht=p&chd=t:${100 * MALE / PERSONS},${100 * FEMALE / PERSONS}&chf=bg,s,FFFFFF00" />
        <Format>application/chart</Format>
      </ExternalGraphic>
      <Size>
        <ogc:Add>
          <ogc:Literal>20</ogc:Literal>
          <ogc:Mul>
            <ogc:Div>
              <ogc:PropertyName>PERSONS</ogc:PropertyName>
              <ogc:Literal>20000000.0</ogc:Literal>
            </ogc:Div>
            <ogc:Literal>60</ogc:Literal>
          </ogc:Mul>
        </ogc:Add>
      </Size>
    </Graphic>
  </PointSymbolizer>

Let’s analyse the components of the ExternalGraphic call, which follow the rules of a Google Charts API call:

  • cht=p: the chart type is pie

  • chd=t:${100 * MALE / PERSONS},${100 * FEMALE / PERSONS}: the chart data is expressed in “text” format, and in particular, the first value is the result of 100 * MALE / PERSONS, where MALE and PERSONS are two attributes of feature being rendered

  • chf=bg,s,FFFFFF00: we state that the chart background fill is solid, white and… transparent. In particular, the color is expressed as RRGGBBAA, where AA is the alpha component, which controls transparency. In particular 0 is fully transparent, 255 is fully opaque

The size of the chart is controlled using the usual element of external graphics, an in particular, it's setup so that it's proportional to the PERSONS attribute via the expression: `20 + (PERSONS / 20,000,000) * 60`.

We encourage you to download the chart extension and to explore its charting possibilities. You can use it with GeoServer 1.7.4, and can find out more about chart setup in the online Google Charts documentation (mind, a handful of charts and options are not supported by Eastwood, in particular, the Google-o-meter and the spider ones).

Let us know how that works for you!

Read More

New documentation launched

I’m excited to tell you about some changes to the GeoServer documentation. We are transitioning away from our wiki in favor of a new system. After much discussion, we are now using the Sphinx Documentation Generator.

Sphinx has many advantages over a wiki. The biggest advantage is that the content of the documentation is written in plain text (using a simple markup language called reStructuredText) and then “compiled” to become the finished product. With documentation now essentially just another part of the source code, it can be brought under version control. This means that we can, for the first time, have version-specific documentation, as well as the ability to allow for simultaneous editing, conflict management, and all of the other tools associated with version control.

While wikis have many advantages, a clear hierarchy is generally not one of them. (For example, one doesn’t read Wikipedia “from the beginning.”) And while search remains a feature of our documentation, Sphinx is geared towards the creation of text that can be constructed and read like a manual. Along this line, we can now create documentation in PDF, a feature that has been asked about for years.

We have soft launched the new documentation with the release of GeoServer 1.7.4. The old wiki is still live, and will remain so. But there is still much to be done, and you can help. The documentation is still very much a work in progress, and not all of the content from the wiki has been migrated. We’ve developed a guide to documentation that describes the ways that you can contribute. The most helpful way is to create content for empty or unfinished pages, and either submit a bug report with the content attached or commit the changes on your own. (If you are interested in getting commit rights to our documentation, please send an email to the GeoServer developers mailing list.) If you are aware of a page in the wiki that should be migrated to the new site, please let us know as well.

For GeoServer 1.7.4, the documentation download contains both HTML and PDF output. I encourage everyone to download, read, and make suggestions. For our part, we will continue to work to make GeoServer easy to learn, use, and understand.

Read More

GeoServer 1.7.4 Released

The GeoServer Team is happy to announce the the release of GeoServer 1.7.4, the fifth stable version in the 1.7 series.

This release contains some new features, many having to do with improved map rendering options. We have introduced WMS decoration, which provides a framework for adding images such as compasses and legends to WMS requests using absolute, not spatial, positioning. The GetFeatureInfo request, often used when clicking on an OpenLayers map, now has a parameter that can be adjusted to allow for looser tolerance, eliminating the need to click precisely on the feature. GetFeatureInfo also now observes the filters in the SLD, so as to prevent displaying information about a hidden feature. (Thanks to SATA Hi-Tech Services, an Italian company specializing in data security solutions, for providing funding for the GetFeatureInfo improvements.) Those who work with labels on your map will be pleased to note that label conflict resolution (the selective display of labels to prevent visual collisions) can now be turned off if desired. Finally, we have the ability to generate custom legends for raster files via the GetLegendGraphic request.

And, as usual, a whole host of bug fixes (over 50!) have been incorporated into this release. Give it a try!

Development work on the 1.7 series will begin to wind down in favor of GeoServer 2.0, but we anticipate the release of 1.7.5 within the next two months.


GeoServer 1.7.4

Released on April 29, 2009

Download format

Documentation

(NEW!) Documentation

Extensions

Datastore

Coveragestore

Other

SourceForge

SourceForge Release 679097.

JIRA

JIRA Version 14787

Release notes

New Feature:

  • GEOS-1008 GetFeatureInfo should take into consideration filters in the SLD
  • GEOS-1162 Support custom raster legends via GetLegendGraphic
  • GEOS-1434 Making the tolerance of FeatureInfo-Requests configurable
  • GEOS-2625 Allow label conflict resolution to be turned off for selected labels
  • GEOS-2815 WMS Decoration Layout

Improvement:

  • GEOS-948 the namespace in front of the layer name in a map request is required
  • GEOS-1520 Improve the cite testing documentation
  • GEOS-1624 GML3-GZIP is not there
  • GEOS-2049 Remove the regionation factories, register the regionation strategies directly instead
  • GEOS-2363 Commit various improvements for RESTConfig
  • GEOS-2372 MIN_GOODNESS_FIT causing labels to be missed off.
  • GEOS-2529 REST CoverageListResource improvement
  • GEOS-2531 REST CoverageResource improvement
  • GEOS-2575 Tone down client stream aborted exceptions in kml/kmz map producers
  • GEOS-2629 Try to provide better error messages when the capabilities document fails due to a misconfigured layer
  • GEOS-2692 Allow for certain invalid characters (such as a period) in the created shapefile name
  • GEOS-2701 Have FeatureBoundsFeatureCollection force in the proper reference system when the wrapped collection does return an envelope without one
  • GEOS-2776 New splash screen for installers
  • GEOS-2786 GetFeatureInfo default template should not uppercase attribute names
  • GEOS-2824 Add number format support in text symbolizer
  • GEOS-2906 Add pom maven-resources-plugin configuration to set encoding to UTF-8

Bug:

  • GEOS-2053 SLD Library with WMS request not working properly
  • GEOS-2070 Oracle data won’t show up properly when bbox exceeeds world bounds
  • GEOS-2598 Java exception when doing getFeatureInfo on OpenLayers map with 2 layers
  • GEOS-2628 Request method check in GetMapRequest randomly throws NPE
  • GEOS-2633 Layer group bounds generation fails with postgis layers
  • GEOS-2656 Cannot configure a shapefile whose name is less than 3 chars long
  • GEOS-2670 Dynamic symbolizers not evaluated in KML output
  • GEOS-2690 WFS-T updates including geometry changes fail on Oracle-NG
  • GEOS-2695 WFS requests with PropertyName have error when using 1.0.0 (1.1.0 is OK) on 1.7.2
  • GEOS-2732 SHAPE-ZIP output format fails when the input data source does not have the geometry as the first attribute
  • GEOS-2734 Image Mosaic JDBC extension does not contain a README (or LICENSE) file
  • GEOS-2737 Imagemap extension does not contain a README (or LICENSE) file
  • GEOS-2744 Raster Issue - no-data pixels in full tiles should be 0xFF instead of 0x00
  • GEOS-2745 SDE Raster issue - Error fetching colormap data
  • GEOS-2746 SDE Raster issue - Some layers not drawing properly at different zoom levels
  • GEOS-2752 Loading base maps which have trailing default styles fails
  • GEOS-2769 Error saving the configuration of a new feature type
  • GEOS-2778 new directory datastore creates backup feature types instead of feature types
  • GEOS-2779 SLD filter against Postgresql 8.3.+
  • GEOS-2781 Stack overflow when using SLD with many rules against a JDBC database
  • GEOS-2803 FeatureType: baseschema: gml:AbstractFeatureType
  • GEOS-2807 Rendering issues caused by a poor quality shapefile
  • GEOS-2818 Namespace deletion should check for any store/layer still using the namespace
  • GEOS-2820 GetFeatureInfo does not work with aliased layers
  • GEOS-2821 GeoRSS and GeoJSON throwing exceptions with per layer security
  • GEOS-2823 Shapefile rendering slowdown when using directory data store
  • GEOS-2825 Styles changed using the Styler application (i.e. RESTconfig) are not persisted
  • GEOS-2831 geoserver 1.7.3 hangs while rendering short text
  • GEOS-2832 GetFeatureInfo does not return any rows with text/html format
  • GEOS-2863 GWC Demos don’t find OpenLayers.js
  • GEOS-2940 GetFeature fails if no native srs is set in Oracle
  • GEOS-2941 WFS 1.0.0 Cite tests, DescribeFeatureType schema namespace
  • GEOS-2942 best_guess regionating strategy broken

Task:

  • GEOS-2521 GWC needs database for meta information
  • GEOS-2671 Document support for new arcsde raster formats
  • GEOS-2838 Describe new &buffer GetFeatureInfo parameter and the maxBuffer wms setting
Read More

See the new UI

I am happy to announce to everyone a sneak peak of the future of GeoServer. Behold the newest alpha release of GeoServer 2.0.

I first mentioned GeoServer 2.0 last August when the first alpha was released, but much work has been done since then. The most obvious and exciting new feature in GeoServer 2.0 is the new UI, based on the Wicket framework. The UI has been totally redesigned and updated to provide a greatly improved user experience. Take a look at some screenshots:

Front page

Status

Layer preview

Styles

Another happy announcement is a major workflow change for data configuration. The Submit -> Apply -> Save workflow, often bemoaned by users, has been eliminated, in favor of a simpler Save changes workflow, with changes automatically persisting. To me, that’s a 66.6% reduction in button clicks!

This is an alpha release (the most recent stable version remains at 1.7.3) and so it comes with a few caveats. It’s very new code, and not fully tested, so please don’t run it in a production environment. Features may also be likely to change as the code approaches stability. Also, running GeoServer 2.0 with an existing data directory will alter it such that it will become incompatible with existing stable versions. We have instructions on how to migrate back to 1.7.x, but it might be better to use the built-in data directory for now, or at least to back up your existing data directory first.

That said, we want everyone to download, try it out, and provide feedback, since it was partly in response to user feedback that the GeoServer Team upgraded the user environment. I hope you enjoy!


GeoServer 2.0-alpha2

Released on April 15, 2009

Download format

Documentation

Extensions

Datastore

Coveragestore

Other

SourceForge

SourceForge Release 676086.

JIRA

JIRA Version 15211

Release notes

Improvement:

  • GEOS-2765 Factor out reusable component from StorePage
  • GEOS-2799 Catalog and configuration should use auto generated ids for catalog objects, not names

Bug:

  • GEOS-2872 Wicket UI is missing schemas inside the webapp
  • GEOS-2873 NPE generating wms caps when restarting the converted WMS 1.1 data dir
  • GEOS-2874 GetMap request with multiple layers and no specified styles use the style of the first layer for all layers
  • GEOS-2876 LegacyExceptionHanlder computes a wrong schema base, thus generates a wrong dtd reference
  • GEOS-2880 GML2OutputFormat creates a back referecen to DescribeFeatureType that does not include the namespace prefix in the typeName

Task:

  • GEOS-2134 Bring the new UI to feature parity with the old UI
  • GEOS-2143 Demo Requests
  • GEOS-2711 New data directory and persistence structure
  • GEOS-2898 Create page about data directory changes when going between 1.7.x and 2.0.x

Sub-task:

Read More

Marine conservation with GeoServer

I received a note recently from a GeoServer blog reader who wanted to show off another project using GeoServer, which I am happy to present here.

The Marine Science Institute at UC Santa Barbara and Farallon Geographics have built a public, online mapping application enabling scientists and community members to help select marine environments that they feel should be designated for conservation, recreational, and/or commercial uses. It’s called the MarineMap Decision Support Tool.

You need to have a login to make edits, but anyone can view the layers that are already there. And there’s a good amount of info too, from water quality to estuaries to locations of popular surfing sites. These layers can be exported to Google Earth as well. The designers have also helpfully created a screencast showing how to use their application.

The site is based on GeoServer and OpenLayers. But what intrigued me was the pleasing desktop-styled application. It reminded me of GeoExt, and for good reason, since GeoExt is a framework for constructing web mapping applications combining the user interface components of Ext with OpenLayers. And sure enough, it turns out that Ext was used in this application.

I don’t know about you, but I think the folks at the MSI should join up with the GeoExt project; I’m sure everyone could learn a lot.

Read More