2. GEOSERVER
Open Source (GPL) WMS Server
Main language is Java
Also implements WFS, WCS, WPS, ect...
Uses GeoTools and JTS libraries
3. Scripting Module
Geoserver Community Module
Developed by: Justin Deoliveira and Tim
Schaub
I am adding Geoscript Groovy support
https://github.com/jericks/geoserver/tree/script_groovy
Python, JavaScript, Groovy, BeanShell, Ruby
Uses javax.scripting to execute scripts
Extend GeoServer on the fly
12. Groovy Geoserver API
geoserver
Geoserver: Main entry point for Catalog and Config
Config: Metadata about GeoServer
geoserver.catalog
Catalog: Contains Workspaces, Layers, Stores
Workspace: Contains Stores
Store: Contains Layers, Converts to GeoScript Workspace
Layer: Converts to GeoScript Layer
15. Filter Functions
Transform a value before displaying it
Format a date or a number
Capitalize a string
Manipulate a geometry
GeoTools input objects are wrapped as
GeoScript objects
GeoScript result objects are unwrapped as
GeoTools objects
16. Filter Function
1 /**
2 * Convert a Geometry into a buffered centroid
3 * @param value The Feature
4 * @param args A List of arguments
5 * args[0] is the Geometry
6 * args[1] is the buffer distance
7 */
8 def run(value, args) {
9 args[0].centroid.buffer(args[1] as double)
10 }
$DATA_DIR/scripts/function/bufferCentroid.groovy
19. WPS
Web Processing Service
Model builder for the web
Generic web services for spatial data
GeoTools inputs are wrapped as GeoScript
objects
GeoScript results are unwrapped as GeoTools
objects
25. Rendering transformations
Modify an entire dataset
Buffer the entire layer not each feature
Create a heatmap from points (vector to raster)
http://docs.geoserver.org/latest/en/user/
styling/sld-extensions/rendering-
transform.html
26. Rendering Transform sld
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <StyledLayerDescriptor version="1.0.0"
3 xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
4 xmlns="http://www.opengis.net/sld"
5 xmlns:ogc="http://www.opengis.net/ogc"
6 xmlns:xlink="http://www.w3.org/1999/xlink"
7 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
8 <!-- a Named Layer is the basic building block of an SLD document -->
9 <NamedLayer>
10 <Name>default_polygon</Name>
11 <UserStyle>
12 <!-- Styles can have names, titles and abstracts -->
13 <Title>Default Polygon</Title>
14 <Abstract>A sample style that draws a polygon</Abstract>
15 <!-- FeatureTypeStyles describe how to render different features -->
16 <!-- A FeatureTypeStyle for rendering polygons -->
17 <FeatureTypeStyle>
18 <Transformation>
19 <ogc:Function name="groovy:voronoi">
20 <ogc:Function name="parameter">
21 <ogc:Literal>layer</ogc:Literal>
22 </ogc:Function>
23 </ogc:Function>
24 </Transformation>
25 <Rule>
26 <Name>rule1</Name>
27 <Title>Gray Polygon with Black Outline</Title>
28 <Abstract>A polygon with a gray fill and a 1 pixel black outline</Abstract>
29 <PolygonSymbolizer>
30 <Fill>
31 <CssParameter name="fill">#AAAAAA</CssParameter>
32 </Fill>
33 <Stroke>
34 <CssParameter name="stroke">#000000</CssParameter>
35 <CssParameter name="stroke-width">1</CssParameter>
36 </Stroke>
37 </PolygonSymbolizer>
38 </Rule>
39 </FeatureTypeStyle>
40 </UserStyle>
41 </NamedLayer>
42 </StyledLayerDescriptor>
43
28. Conclusion
GeoServer is well known as a WMS, WFS,
WCS, WPS server
GeoServer is also a platform for spatial web
services
Scripting just finally makes it easy