1 of 73

GeoServer

Workshop

FOSS4G 2022

2 of 73

Introductions

Jody Garnett

Technical Director

jody.garnett@gmail.com

@jodygarnett

GeoCat

Netherlands open-source company focused on spatial data publication and discovery.

Open Source Projects

  • GeoServer, GeoTools, JTS, ImageN, uDig�

Open Source Geospatial Foundation

  • Incubation Committee Chair
  • GeoTools Project Officer
  • GeoServer Project Steering Committee
  • Marketing Committee�

Eclipse Foundation

  • JTS Topology Suite
  • ImageN

3 of 73

Popular GeoServer Talks

GeoServer use in organizations, and technologies, around the worlds.

Beloved features, and impressive tricks, showing what is possible with GeoServer

Annual team update and tour of what is new!

Downloaded GeoServer, now what does it do again?

4 of 73

GeoServer Beginner Workshop

  • Getting Started
    • GeoServer
    • Install
  • Publication
    • Feature Publication
    • Raster Publication
    • Mapping
  • Data access
    • Features
    • Rasters
    • Security
  • coffee break
  • Production
    • Automating
    • GeoServer Checklist
    • WMS Checklist
    • Layer checklist
  • Explore
    • Tiles
    • Process
    • Styling
  • Discussion

5 of 73

What is GeoServer for?

6 of 73

GeoServer Vision

geoserver.org:

“GeoServer is an open source server for sharing geospatial data.”

GeoServer is passionate about sharing data. GeoServer was founded out of a community project to map trees in New York city.

  • If you are here to share a map..�GeoServer can do mapping
  • But we don’t stop at a map ...�GeoServer will share the data
  • And don’t stop at the data …�GeoServer encourages data editing

7 of 73

GeoServer approach

Approach:

Designed for interoperability, it publishes data from any major spatial data source using open standards.

GeoServer really does not want to “lock-in” in you or your data, from the ground up:

  • Access your data where it is stored
  • An share your data with a wide audience
  • We start with “industry standards”
  • Add more protocols over time

Opposite of a “not-invented-here” attitude.

If GeoServer has to invent something in isolation chances are we are doing it wrong.

8 of 73

Map Publishing

GeoServer can publish maps:

  • Each dataset is a “layer” of content
  • Gather into a “layer group”�to arrange layers into a basemap
  • Aside: We include a small layer preview (intended for local testing)

GeoServer is the rendering engine producing maps, for access from web clients and desktop clients.

9 of 73

Map Publishing: Continued

GeoServer map publishing is about publishing a visualization.

More than one approach:

  • Publish as a “Map” supporting, ad-hoc requests to draw imagery
  • Publish entire “Tileset” of content

The result does not always look like an image:

  • SVG and KML output combine vector output with styling
  • Extensions provide PDF output for printing
  • Vector-tile output pre-processed for client side drawing

10 of 73

Vector data: publishing

In the spirit of open, GeoServer is setup to share the data being used to draw the map.

To reach a wide audience:

  • Supports queries
  • Range of output formats available�(and more available to install)

11 of 73

Vector data: editing

Sharing does not stop at providing access, the ability to edit information together is key to collaboration.

GeoServer is not used to interactively edit data, instead it provides a protocol for QGIS Desktop and OpenLayers library to edit information. These clients are responsible for providing an interactive editing experience.

The same protocols can be used in your own scripts for batch editing and processing.

Hint: We made sure editing is off by default!

12 of 73

Raster data access

Direct access to raster data is available.

  • Imagery
  • Digital Elevation Model
  • NetCDF for scientific modeling

Hint: The language “grid coverage” is used to emphasis that measurements are being provided (rather than just a visualization)

13 of 73

Before we start

14 of 73

GeoServer Configuration

GeoServer provides a web application for configuration and setup.

A REST API is also available for automation.

Notes:

  • “Web admin” is not really geoserver
    • Only used for setup geoserver
    • In production hide this!
  • The links to “service capabilities” are the actual web services

15 of 73

Natural Earth

A great public domain dataset used for web illustrations.

Our example uses the “Quickstart” download containing a range of vector and raster data

See: www.naturalearthdata.com

16 of 73

GeoServer Installation

17 of 73

GeoServer Installation

  • Java Web Application
  • Which Java?
    • Java 11 LTS - recommended
    • Java 8 LTS - recommended
    • Java 17 LTS being "tested" presently
  • Which Application Server?
    • Tomcat 8.5 or Tomcat 9
  • Dev: GeoServer 2.22-M0 Milestone
    • What we are using today!
    • New data directory for this workshop
    • New "welcome page"
  • Stable: GeoServer 2.21.1
    • Recommended for Production
    • First release with Official Docker
    • Updates for 6 months
  • Maintenance: GeoServer 2.20.5
    • Fixes for 6 additional months

18 of 73

Running GeoServer

  • “Web Archive” for production systems
    • Use with your application server (we recommend Tomcat)
  • “binary” download
    • Try things out on the command line, often for testing or evaluation
  • Windows Installer
    • windows service, similar to "binary" download above
    • (no macOS installers at present due to vandalism)
  • Docker
    • New official docker image, please give us feedback their own

19 of 73

docs.geoserver.org → User Manual → Installation

20 of 73

Running GeoServer

21 of 73

Welcome to GeoServer

22 of 73

Workspace

23 of 73

Workspace

Workspace is used to:

  • Folder to organize content
  • “Namespace” for XML content publication

Notes:

  • Workspace name used as a prefix for each layer
  • Namespace should be a unique URI
  • One workspace can be the “default”
  • Advanced: Each workspace can be used as its own “virtual web service”

24 of 73

New Workspace

  • Data → Workspaces
  • Create new workspace
  • Fill in:
    • Name:�tutorial
    • Namespace:�http://localhost:8080/tutorial

25 of 73

Vector Data Source

26 of 73

Vector Data Source

Data store:

  • Used to connect to your data
    • Shapefile needs a file location
    • Database needs connection parameters
  • Managed in a workspace

Notes:

  • DataStore name is “internal” to GeoServer
    • So you can switch from Oracle to PostGIS
  • Called a “DataStore” as we were focused on editing (and thus storing information)

27 of 73

New Vector Data Source

  • Data → Stores
  • Add new store
  • Select GeoPackage
  • Basic store info
    • Name: NaturalEarth
    • Description: GeoPackage of NaturalEarth
    • Enabled: true
  • Connection Parameters
    • database: (use browse button to locate)�data/ne/natural_earth.gpkg
    • read_only: true
  • Save

28 of 73

Vector Layer

29 of 73

Vector Layers

Layer:

  • GeoServer publishes information as distinct layers
  • To publish you need to check
    • Name and title for the layer
    • Spatial Reference System
    • Bounds

Notes:

  • Each protocol uses a different word for its data product (feature type, coverage, tileset)

30 of 73

New Vector Layer

  • Data → Layers
  • Use add new layer, and select tutorial:NaturalEarth
  • Layer name: countries, and Publish

31 of 73

New Vector Layer: Basic Resource Info

  • Data → Layers
  • Use add new layer, and select tutorial:NaturalEarth
  • Layer name: countries, and Publish
  • Data tab
    • Name: countries
    • Title: Countries
    • Abstract: Sovereign states

32 of 73

New Vector Layer: CRS and Bounds

  • Data → Layers
  • Use add new layer, and select tutorial:NaturalEarth
  • Layer name: countries, and Publish
  • Data tab
    • Name: countries
    • Title: Countries
    • Abstract: Sovereign states
  • Coordinate Reference Systems
    • EPSG:4326
  • Bounding Boxes
    • Compute from data
    • Compute from native bounds
  • Save

33 of 73

New Vector Layer: Preview

  • Data → Layer Preview
  • Locate tutorial:countries in list
  • Click OpenLayers to open preview app

34 of 73

Publishing a GeoPackage

Getting Started Tutorial

35 of 73

Manual → Getting started → Publish a GeoPackage

36 of 73

Raster Data Source

37 of 73

Raster Data Source

Data store:

  • Used to connect to your data
    • Location of Raster / Imagery
    • Image Mosiac needs directory
    • Cloud Optimized GeoTIFF needs URL
  • Managed in a workspace

38 of 73

Add Raster Data Source

  • Download: SR_50M.zip → data/ne
  • Navigate: Data → Stores
  • Add new store
  • Basic Store Info
    • Select WorldImage
    • Name: ShadedRelief
  • Connection Parameters
    • Browser to locate data/ne/SR_50M.tif
  • Save

39 of 73

Raster Layer

40 of 73

Raster Layers

Layer:

  • publishes information as distinct layers
  • To publish you need to check
    • Name and title for the layer
    • Spatial Reference System
    • Bounds

Notes:

  • Raster protocols use "grid coverage" due to regular grid used to sample the data for result (often using image format).

41 of 73

New Raster Layer

  • Data → Layers
  • Use add new layer, select ShadedRelief
  • Data
    • Name: tutorial
    • Title: shaded
  • Double check:
    • Spatial Reference System
    • Bounds
  • Save

42 of 73

New Raster Layer: Preview

  • Data → Layer Preview
  • Locate tutorial:shaded in list
  • Click OpenLayers to open preview app

43 of 73

Publishing an Image

Getting Started

44 of 73

Manual → Getting started → Publish an Image

45 of 73

Layer Group

46 of 73

Layer Group

Layer groups are used:

  • Can be used as a basemap
  • Order of layers is in draw order

Notes:

  • Can also use layer groups to define a table-of-contents structure for published content

47 of 73

Create Layer Group

  • Data → Layer Group
  • Click Add new layer group
  • Details:
    • Name: basemap
    • Title: Basemap

48 of 73

Create Layer Group

  • Data → Layer Group
  • Click Add new layer group
  • Details:
    • Name: basemap
    • Title: Basemap
  • Scroll down to Layers heading
  • Use add layer to add�tutorial:shaded
  • Use add layer to addtutorial:countries
  • Scroll up to bounds
  • Click Generate Bounds
  • Save

49 of 73

Create Layer Group: Preview

  • Data → Layer Preview
  • Locate tutorial:basemap in list
  • Click OpenLayers to open preview app

50 of 73

Style

51 of 73

Style

Used to configure the rendering process:

  • We use an XML format called SLD
    • Intended for machine-to-machine use!
  • We recommend people use anything else
    • CSS or YSLD "human readable"
    • mbstyle JSON

Notes:

  • Built-in styles provided
  • Styles folder used for icons and fonts
  • Each workspace has a styles folder also

52 of 73

New Style

  • Data → Styles
  • Click Add new style
  • Style data
    • Workspace: tutorial
    • Name: background
    • Format: SLD
  • Style content
    • Select Polygon, and Generate
  • Apply

53 of 73

New Style Publish

  • Data → Styles
  • Click Add new style
  • Style data
    • Workspace: tutorial
    • Name: background
    • Format: SLD
  • Style content
    • Select Polygon, and Generate
  • Apply
  • Publishing: countries default
  • Layer preview: tutorial:countries

54 of 73

New Style: Live Preview

  • Data → Styles
  • Click Add new style
  • Style data
    • Workspace: tutorial
    • Name: background
    • Format: SLD
  • Style content
    • Select Polygon, and Generate
  • Apply
  • Publishing: countries default
  • Layer preview: tutorial:countries
  • Add fill-opacity 0.5
  • Apply

55 of 73

Checklist

56 of 73

Production Checklist

  • Security
    • Change admin/geoserver password
  • Global Settings
    • Change to PRODUCTION_LOGGING
  • Contact Information
    • Fill in your contact details

57 of 73

Layer Checklist

  • Basic Information
    • name
    • title
    • abstract
  • Spatial Reference System
  • Bounds

58 of 73

How does it work?

59 of 73

GeoServer

Wicket

GeoTools

geowebcache

Web Administration

BlobStore

OpenLayers

core

Catalog

application server

Jetty

Spring

JAI

Spring MVC

REST-API

Data Directory

Resource Pool

WMS

Dispatcher

WFS

WCS

TMS

WMTS

GeoWebCache

Java Runtime Environment

OpenJDK

wms

wfs

wcs

60 of 73

GeoServer Internals

  • Java Web Application
    • Spring Framework - powerful framework for wiring together application out of components
    • Apache Wicket User Interface - framework only a java developer could love
  • Modular Architecture
    • Enables the community to build extensions�(a key success factor for open source projects)
  • GeoTools Library
    • Handles the data access, reprojection, and rendering
    • Try and keep GeoServer “light” and focused on sharing by moving heavy lifting here
  • Java Advanced Imaging (and JAI-ExT)
    • Image processing library offering on-demand processing model
    • JAI-EXT teaching the image processing engine new tricks (“no-data”, “foot-prints”, …)

61 of 73

Doing more

62 of 73

Extensions

We saw a lot of effort devoted to keeping GeoServer modular.

  • Official GeoServer plugins are called extensions
  • Extensions are formally “part of GeoServer”
    • Must meet the same quality assurance and documentation requirements as core
    • Included in the release process, they version numbers match!

63 of 73

Check out some extensions - data sources

  • Oracle DataStore, SQLServer, DB2
    • Specific technology required for data management policies? You can still use open standards.
  • MySQL, H2
  • AppSchema
    • Is a standard output schema required? map your data to meet your requirement
  • Pregernalized Features
    • change datasource based on scale
  • GeoMesa, MongoDB, Terradata
    • Cloud database are supported also!
    • GeoMesa offers both a DataStore for data access, and also WPS Processes to better summarize and work with massive cloud data volumes

64 of 73

Check out some extensions - output formats

  • Vector Tiles
    • Generate pre-processed tiles of vector content ready for client-side rendering
  • GeoPackage Output
    • Download GeoPackage from as results from WFS GetFeatures request
  • MapML
  • Excel
  • JPEG Turbo

65 of 73

Check out some extensions - new capabilities

  • Resource browser
    • remotely manage files in data directory
  • Importer
    • automated configuration, supports ETL into PostGIS and a REST API
  • WPS Extension
    • Providing an entirely new services, in this case one used for processing and analysis
  • CSW
    • Provide catalog records for your published data products
    • Intended for other catalogs to "harvest"
  • GeoFence
    • Integrates “GeoFence” security model, for “edit permission” with a specific operating area

66 of 73

Community Modules (for RnD)

Community modules started as a way to help developers share RnD ideas.

  • Very helpful when working with grad students
  • Also used by consulting teams take on specific challenges for their customers
  • Ideally we want these to attract funding and become extensions

These are very much “use at your own risk”:

  • These are not released as part of GeoServer
  • You are expected to compile these yourself
  • Not subject to any quality assurance or IP check

67 of 73

Check out some community modules

  • JDBC Config / JDBC Store
    • Replace the entire catalog (config) and data directory (store)
    • Use with AWS to “carefully” manage a cloud cluster
  • Backup and Restore
    • Transport configuration settings from test to production
  • SOLR datastore
  • Dynamic colormap generation
  • SAP Hana
  • OGC API Features

68 of 73

Brought to you by

69 of 73

Project Steering Committee

GeoServer is setup as an “Open Source Geospatial Foundation” project. With a core “project steering committee” and notes on how to keep everything running in a fair and consistent manner.

Steering committee members vote on change proposals, that come from a wide range of organizations participating in RND.

We try and have a mix of skills, with developers, users, managers, and designer joining the team as required to help out.

PSC Members:

  • Alessio Fabiani
  • Andrea Aime
  • Ian Turton
  • Jody Garnett
  • Jukka Rahkonen
  • Kevin Smith
  • Nuno Oliveira ← new!
  • Simone Giannecchini
  • Torben Barsballe ← new!

70 of 73

Strong history of collaboration

Being “vendor-neutral” has allowed GeoServer to weather the success and failures of participating organizations.

In addition to an open source license we make use of the OSGeo Contributor License agreement to help in this respect.

This also has allowed the PSC to contribute code “up-stream” to more permissive projects.

Collaboration happens at the personal level, and also across organizations.

The OpenPlannng Project started GeoServer to support community mapping activities. Early collaborations with GeoSolutions, Refractions Research helped establish procedures to make this an open project.

GeoServer supports an active RnD scene with research labs, consulting companies and others joining to add new features.

71 of 73

Thanks

Questions welcome!

72 of 73

Mini production check-list

  • Please change the default�user name and password
  • Also change the master password�(used to encrypt on disk)
  • Update contact information�(See “Claudius Ptolomaeus”)

GeoServer 1.0

GeoServer 2.16.2

73 of 73

GeoServer at a Glance

Java Web Application to share and edit geospatial data.

Publish data from any major spatial data source using open standards.

Core Protocols

WMS – maps�WFS – vector �WFS-T – editing �WCS – coverage�WMTS – tiles�TMS – tiles�WMS-C – tiles

Extension/community protocols�WPS – process�CSW – search�OpenSearch for Earth Observation – search�OGC API - prototype json + rest standards