O'Reilly logo

Mastering GeoServer by Colin Henderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating SQL View layers

So far in this chapter, we have looked at publishing layers based on traditional database tables; so now, we will look at GeoServer's ability to create SQL View layers. A SQL View layer is a kind of dynamic layer within GeoServer that allows for a custom SQL script to be executed on each request for data. A SQL View layer can be used to perform complex database queries to derive content for a layer, for example, selecting all the points of a certain type within a polygon and adding a count value to that polygon. The generated polygon layer can then be rendered with a color ramp to show the range of values.

GeoServer SQL Views versus database views

You might be looking at this and thinking to yourself, "Why will I use a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required