Components of GeoServer

Krishna G. Lodha

Introduction to GeoServer

What is GeoServer?

  • Open-source server for sharing geospatial data.
  • Supports OGC standards (WMS, WFS, WCS, WMTS, WPS).

GeoServer

Key features and benefits.

  • Cross-platform compatibility.
    • Tomcat .war file
    • Platform independent binary .zip is available
    • Docker Image available
  • High scalability and flexibility for enterprise GIS applications.

How GeoServer fits into the GIS ecosystem

  • Integration with QGIS for desktop GIS.

QGIS Stores

  • Compatibility with web mapping libraries like OpenLayers and Leaflet. Openlayers WMS

Checkout code at Openlayers Example

Core Structure of GeoServer

Setting up GeoServer

Workspaces

  • Logical grouping of layers and styles for better data management.
  • Useful for organizing data by projects, clients, or themes.
  • Restricting access to layers and services within specific workspaces. Workspaces

Data Stores

  • What are Data Stores? Connecting to data sources.
  • Supported databases: PostGIS, Oracle Spatial, MySQL, SQL Server.
  • Supported Files : Shapefile, GeoPackages
  • Supported Rasters : GeoTiff, COGs, ECW, Image Mosaics etc.

Store

Layers

  • Creating Vector and Raster Layers from Data Stores.
  • Configuring Layer Properties: Bounding Box, Coordinate Reference System (CRS).

Layers

Styles

  • SLD (Styled Layer Descriptor):
    • XML-based styling for complex cartography.
  • GeoServer CSS:
    • Using CSS-like syntax for simpler styling.
  • Advanced Styling Techniques:
    • Labeling, custom symbols, and dynamic filters.
    • Using external graphic symbols in SLD.
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0" 
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" 
xmlns="http://www.opengis.net/sld" 
xmlns:ogc="http://www.opengis.net/ogc" 
xmlns:xlink="http://www.w3.org/1999/xlink" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <NamedLayer>
    <Name>generic</Name>
    <UserStyle>
      <Title>Generic</Title>
      <Abstract>Generic style</Abstract>
      <FeatureTypeStyle>
        <Rule>
          <Name>raster</Name>
          <Title>Opaque Raster</Title>
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:Function name="isCoverage"/>
              <ogc:Literal>true</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>
          <RasterSymbolizer>
            <Opacity>1.0</Opacity>
          </RasterSymbolizer>
        </Rule>
        <Rule>
          <Name>Polygon</Name>
          <Title>Grey Polygon</Title>
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:Function name="dimension">
                <ogc:Function name="geometry"/>
              </ogc:Function>
              <ogc:Literal>2</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#AAAAAA</CssParameter>
            </Fill>
            <Stroke>
              <CssParameter name="stroke">#000000</CssParameter>
              <CssParameter name="stroke-width">1</CssParameter>
            </Stroke>
          </PolygonSymbolizer>
        </Rule>
        <Rule>
          <Name>Line</Name>
          <Title>Blue Line</Title>
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:Function name="dimension">
                <ogc:Function name="geometry"/>
              </ogc:Function>
              <ogc:Literal>1</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>
          <LineSymbolizer>
            <Stroke>
              <CssParameter name="stroke">#0000FF</CssParameter>
              <CssParameter name="stroke-opacity">1</CssParameter>
            </Stroke>
          </LineSymbolizer>
        </Rule>
        <Rule>
          <Name>point</Name>
          <Title>Red Square Point</Title>
          <ElseFilter/>
          <PointSymbolizer>
            <Graphic>
              <Mark>
                <WellKnownName>square</WellKnownName>
                <Fill>
                  <CssParameter name="fill">#FF0000</CssParameter>
                </Fill>
              </Mark>
              <Size>6</Size>
            </Graphic>
          </PointSymbolizer>
        </Rule>
        <VendorOption name="ruleEvaluation">first</VendorOption>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Layer groups

  • Combining multiple layers for better visualization and management.
  • Setting opacity, order, and visibility for Layer Groups. Layer Groups

OGC Web Services Overview

Supported Formats

WMS (Web Map Service):

  • Publishing maps as images with various styles.
  • Supports GetMap, GetCapabilities, and GetFeatureInfo requests.

WMS

WFS (Web Feature Service):

  • Serving vector data with options for querying and editing.
  • WFS versions: WFS 1.0.0 (GML2), WFS 1.1.0 (GML3), WFS 2.0.0 (GML3.2).

WFS

WCS (Web Coverage Service):

  • Serving raster data for scientific analysis (e.g., satellite imagery, DEMs).
  • Supports GetCoverage requests for downloading raster data.
  • It’s similar to a Web Feature Service (WFS) , but for raster data. Instead of retrieving raw vector features, it provides the source code of the map as raw imagery.

WMTS (Web Map Tile Service):

  • Tiled map services for faster rendering.
  • Serving pre-rendered map tiles for faster loading and zooming.
  • Comparison with WMS: Better performance but less flexibility.
  • This can be done using GeoWebCache.

WPS (Web Processing Service)

  • Performing spatial analysis on the server (e.g., buffer, intersection).
  • Supports custom processes using JTS Topology Suite. WPS

GeoWebCache

GWC

  • Caches map tiles for faster rendering and reduced server load. Load tiles
  • Tile Caching Mechanism
    • How tiles are generated and stored.
    • Configuring tile layers, gridsets, and caching strategies.

GWC tile setup

  • Cache Management and Clearing
    • Clearing cache for updated layers.
    • Configuring expiration policies for cache invalidation.

GWC tile quota

Security and User Management

  • Authentication and Authorization:
    • Securing GeoServer with basic authentication, LDAP, and OAuth.

Authorization Type

  • Role-based Access Control:
    • Creating user roles (Admin, Editor, Viewer).
    • Controlling layer visibility and access based on roles.

Data Security

Extensions

  • What are GeoServer Extensions?
    • Plugins that extend the core functionality of GeoServer.
    • Examples: WPS, CSW, GeoFence, and ImageMosaic.
  • Installing and Managing Extensions:
    • Downloading extensions from the GeoServer website.
    • Placing extension JAR files in the GeoServer WEB-INF/lib directory.
    • Restarting GeoServer to activate extensions.
  • Popular Extensions and Use Cases:
    • WPS (Web Processing Service): Spatial analysis and geoprocessing.
    • GeoFence: Advanced security and role-based access control.
    • ImageMosaic: Efficiently handling large raster datasets.

Q&A Session

Email : office@rottengrapes.tech

Website : rottengrapes.tech