GeoServer hidden treasures: filter functions

Ever had the need to format some text in SLD, or to perform complex filter in WFS, and noticed that the basic elements of the OGC Filter specification left you wanting for more?

If so, welcome to the club. One thing few people know is that both SLD and WFS filtering capabilities can be extended by using filter functions. A filter function is just like a programming language function, it’s something that takes arguments and returns some result. For example, “sin(toRadians(45))” will compute the mathematical sin of 45 degrees, and “strSubstring(”hippopotamus”, 0,  5)” will return “hippo”.

The concept of filter function is standardized, but functions themselves are not, so once you start using them you’re tied to a specific server. However they often provide the level of flexibility that you just need in order to get some work done. The good news is that GeoServer already contains tens of them, from number and date formatting, to geometry manipulation, math, string wrangling. So far we just never found the time to document them, but things have changed and we have now quite a complete reference along with some examples.

Let me show you a simple example of using functions. Say we have a contour map, each isoline has an elevation, and we want to show it on the map. Unfortunately the elevation is stored as a floating point, resulting in a less than pleasing output of “150.0″ or sometimes “149.999999″ when we know the elevation accuracy does not go beyond the meter. To get nice labelling we can use the “numberFormat” filter function to force an integer representation instead (along with some VendorOptions):

<TextSymbolizer>
  <Label>
    <ogc:Function name="numberFormat">
       <ogc:Literal>#</ogc:Literal>
       <ogc:PropertyName>ELEVATION</ogc:PropertyName>
    </ogc:Function>
   </Label>
  ....
   <VendorOption name="followLine">true</VendorOption>
   <VendorOption name="repeat">250</VendorOption>
   <VendorOption name="maxDisplacement">150</VendorOption>
   <VendorOption name="maxAngleDelta">30</VendorOption>
</TextSymbolizer>

Notice how the the ELEVATION field is formatted as an integer number following the simple formatting pattern provided (for a full reference see the the Java DecimalFormat documentation):

contours

I hope you’ll find interesting and clever uses of the existing filter functions to improve the way you work with GeoServer. Next time I’ll show you my favourite one, which is also a new feature in GeoServer 2.0.1, called “geometry transformations”. Stay tuned to learn more about it.

REST Security Update for 1.7.x

A recent post describes a security issue with RESTful services in GeoServer that was fixed for GeoServer 2.0.1. A patch has been created for 1.7.x and is now available. Any users using the restconfig plugin with GeoServer 1.7 are urged to apply the patch.

Note that by applying the patch the same rules as described here apply. Users will have to either update systems that rely on anonymous access via GET operations or alternatively configure the security subsystem to allow them.

Securing RESTful Services with GeoServer 2.0.1

A feature that has become quite popular in GeoServer over the last year has been the RESTful configuration plug-in (”restconfig”), that allows one to configure a GeoServer instance programmatically via simple HTTP operations.

Recently the issue of security has come up with regards to the restconfig plug-in. Essentially it boils down to the fact that GeoServer allows anonymous access to any resource or service when the HTTP request method is GET. In the case of restconfig this can make sensitive information available anonymously such as database connection parameters which can contain passwords and the like.

To remedy this situation in 2.0.1 the GeoServer security subsystem has been extended to allow for configuring access to RESTful services. This is documented in the user guide.

The major caveat for users upgrading to 2.0.1 is that any systems that depended on the previous behavior of allowing GET access to resources without authentication will undoubtedly break. In this case users have two options:

  1. Start supplying administrator credentials with all requests
  2. Reconfigure GeoServer to allow for anonymous access for GET operations

A patch has been created for 1.7.x users as well.

Try it out. Please report any issues to the GeoServer users list. Thanks for using GeoServer!

GeoServer 2.0.1 Released

With a large number of users upgrading to GeoServer 2.0, it’s no wonder we’ve had so many fixes and improvements make it into GeoServer 2.0.1, now available for download.

Possibly the most significant change since 2.0.0 has been the addition of the RESTful API to the security sub system. Previously, users were able to connect in a read-only capacity to otherwise secure services through RESTful GET requests. While this is a good fix for GeoServer, it does mean that users who were previously relying on anonymous read access to secure services must now authenticate before they can access them. More details are available for those who are interested.

Other changes include usability changes to the administration UI, an updated Windows installer that now contains service and console installation options, and over 100 other issues fixed.

We encourage you to download the latest version and take it for a spin and report any issues you encounter to the mailing list or bug tracker.

As always, we owe a debt of gratitude to all those that have contributed bug reports, fixes, patches and features. A special thanks goes out to LISAsoft for managing this release.

Seven CSIRO jobs for open source geospatial software developers in Perth, Western Australia

CSIRO is now hiring seven software developers “to join an established team within CSIRO Earth Science and Resource Engineering (CESRE). As part of the Australian Spatial Research Data Commons (ASRDC) Project, this team is responsible for investigating and implementing open source and open standards based software for geospatial information exchange using Open Geospatial Consortium (OGC) web services.”

CSIRO is Australia’s national science agency.

As advertised on seek.com.au:

Senior Software Engineer – Leading Role
http://www.seek.com.au/users/apply/index.ascx?Sequence=39&PageNumber=1&jobid=16484299

Software Engineers – 5 Positions
http://www.seek.com.au/users/apply/index.ascx?Sequence=72&PageNumber=1&jobid=16484529

Software Engineer – Administrator
http://www.seek.com.au/users/apply/index.ascx?Sequence=56&PageNumber=1&jobid=16484057

The same positions on the CSIRO recruitment website:

Positions Details – 2009/995 – Senior Software Engineer – Leading Role
https://recruitment.csiro.au/asp/job_details.asp?RefNo=2009%2F995

Positions Details – 2009/996 – Software Engineers – 5 Positions
https://recruitment.csiro.au/asp/job_details.asp?RefNo=2009%2F996

Positions Details – 2009/994 – Software Engineer – Administrator
https://recruitment.csiro.au/asp/job_details.asp?RefNo=2009%2F994

Applications close on 10 January 2010. These are fixed-term positions of approximately 18 months (term end 30 June, 2011).

The positions will be based at the Australian Resources Research Centre, 26 Dick Perry Ave, Kensington WA, Australia. This is in an inner suburb of Perth, Western Australia.
http://maps.google.com.au/maps?f=q&source=s_q&hl=en&geocode=&q=26+Dick+Perry+Ave+Kensington+WA&sll=-31.993227,115.885849&sspn=0.969029,2.073669&ie=UTF8&hq=&hnear=26+Dick+Perry+Ave,+Kensington+Western+Australia+6151&ll=-31.994847,115.884718&spn=0.242253,0.518417&z=12

Street view:
http://maps.google.com.au/maps?f=q&source=s_q&hl=en&geocode=&q=26+Dick+Perry+Ave+Kensington+WA&sll=-31.993227,115.885849&sspn=0.969029,2.073669&ie=UTF8&hq=&hnear=26+Dick+Perry+Ave,+Kensington+Western+Australia+6151&ll=-31.995238,115.885892&spn=0.001893,0.00405&t=h&z=19&layer=c&cbll=-31.995244,115.8861&panoid=-fbF3xYlc6_RMyuiOUPYMQ&cbp=12,356.75,,0,5.95

Adding Time support to GeoServer via the ImageMosaic plugin

Lately, I have been working on adding support for the TIME attribute for GeoServer in WMS GetMap requests via an improvement of the ImageMosaic raster store:

http://yourserver/geoserver/wms?REQUEST=GetMap&...&TIME=2009-12-12,2009-12-13&...

You can get some more details on the GeoSolutions blog.

Proposal for improving ImagePyramid support (and other small developments)

Ciao a tutti,

Supporting a project such as GeoServer requires a great investment of time and resources. Organizations that support it are faced with the problem of finding funding. As founder of my own company, I often find myself in the position to seek funding for supporting GeoServer and I obviously tend to prefer large contracts to small ones. This seems perfectly reasonable, however I do recognize that in the long run this approach may cause some missed opportunities. Large funding usually focuses on large developments, but they leave aside common glitches and bugs, i.e. isolated features that are not working properly or could be improved relatively easily. To counter this, supporting organizations must invest surplus money and resources from other contracts into tackling these problems, since it is difficult or inefficient to chase money to address each small issue separately.

As a specific example, I have lately seen people struggling to get the ImagePyramid extension working, and I know it would be relatively easy to improve things (in that it would not need a lot of funding) but none of our current clients needs this functionality, so the work never gets done.

With this in mind, I have come up with the following idea: once someone, be it a user or a support organization, recognizes an issue/missing feature that no one else wants or has funding to fix, we should try to describe the problem/feature somewhere (such as on this blog), provide a Point of Contact (POC) for the work and then ask the community for an Expression of Interest (EOI) to check whether there is enough momentum/desire to fix/implement. Perhaps the POC should write the proposal having already scoped out the work or maybe the scope should wait until we know that there is enough interest. Another topic where I would see some interest is in whether the process should be completely transparent or not regarding who gives the funding as well as who spends the funding gathered. I would be interested in feedback on all of these suggestions.

To test his idea, I would like to invite anyone who might be interested in providing a bit of funding to improve the support for the ImagePyramid extension in GeoServer to express your interest to me. Specifically, I am talking about automagic import from GDAL retile, improved stability and performance, and/or automagic pyramiding as a GeoServer/GeoTools utility.

If you are interested you can drop me an email at simone.giannecchiniATgeo-solutions.it.

Ciao, Simone.

A mailing list for Japanese users.

After a nice showing at the FOSS4G Tokyo and Osaka conferences we decided the time had come for a new GeoServer language users mailing list.  Taking advantage of the fact that GeoServer just got accepted to OSGeo incubation the new list is on the OSGeo infrastructure, at http://lists.osgeo.org/mailman/listinfo/geoserver-jp The mailing list is a resource for those who would like assistance in all things GeoServer, but prefer to discuss in Japanese.  This marks the sixth language mailing list for GeoServer.  We’re hoping soon the community gets a translation of the new UI, and some Japanese docs as well.

GeoServer accepted to OSGeo incubation

It’s official!  We are pleased to announce that GeoServer has been accepted into incubation at the Open Source Geospatial Foundation (OSGeo).  Putting GeoServer under the same roof as all the best geospatial projects in the open source world is a great advance for the project.  While GeoServer is not yet an official OSGeo project, just getting accepted in to the incubation process is a firm indicator that we are on the right track.  The process makes sure that we meet all of OSGeo’s standards for a diverse community, a robust governance structure, and clean code that others can rely upon.  We believe GeoServer has all of these, but additional validation from a third party like OSGeo signals to the world that it is so.  Thanks to the incubation committee and the board for approving our application, and to Richard Gould for serving as our mentor.  And of course to the whole GeoServer community for taking us here.

GeoServer 2.0 Released!

It has been a long time coming but it is finally here. GeoServer 2.0 has been officially released and is available for download. The 2.0 release marks a major milestone for the GeoServer project. A special thanks to all the developers who worked hard for this release, all the users who contributed bug reports, and for those who provided feedback by testing out the 2.0 release candidates.

So what is new in 2.0? The first new feature that people will notice is a completely new web administration interface. Based on the Wicket framework the new user interface provides a much more integrated and streamlined application for configuring GeoServer. Wicket makes developing ajax enabled applications trivial by doing all the hard work for you.

GeoServer_ Welcome-1-1

One of the powerful features of Wicket for the developer is extensibility. Wicket allows one to plug-in components dynamically. This means that developers can now easily write plug-ins and extensions for the GeoServer UI. And some have already done so. Francesco Izzi and the developers from the geoSDI project have contributed a plug-in for configuring the GeoServer security sub system. Special thanks for the great contribution.

GeoServer_ Users list

The 2.0 release also hails the home coming of the “complex features” branch and true support for application schemas. Led by Ben Caradoc-Davies and Rini Angreani, developers from CSIRO have made this functionality available in the core of GeoServer. Special thanks to them and to AuScope for funding the work. Check out the documentation for more information about getting started with application schemas.

New features has not been the only focus of 2.0. Much work has also gone into scalability and performance in order to ensure that GeoServer continues to improve not only in terms of new features, but also that it continues to get faster.

Much of this work came in preparation for the WMS Shootout at FOSS4G in Sydney this year. Great thanks goes out to Andrea Aime for not only representing GeoServer in this benchmarking exercise, but also for the countless number of hours he has poured into improving GeoServer performance and robustness.

As with any release many minor features and bug fixes have gone into 2.0. Be sure to check out the GeoServer Past Present Future talk given at FOSS4G that provides an overview of what else has gone on this year in preparation for 2.0.

Download 2.0 now and try it out. Please help us to continue to improve GeoServer by reporting any issues you encounter on the mailing list and bug tracker.

Download GeoServer