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 ...
Get Mastering GeoServer now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.