You are previewing Mastering GeoServer.
O'Reilly logo
Mastering GeoServer

Book Description

A holistic guide to implementing a robust, scalable, and secure Enterprise Geospatial Data Hosting System by leveraging the power of GeoServer

In Detail

Whether you have used GeoServer before or are just starting out with it, this book will give you the skills and knowledge to unlock the value of your spatial information and deliver great looking maps.

This book will take you on a journey from installing GeoServer in a production environment through to securing and optimizing it so it's ready for use. Along the way, you will learn how to optimize your raster data for efficient delivery, exploit data stored in a spatial database, style data to create great looking maps, use GeoServer as a proxy, create scripts to perform spatial analysis, and monitor the health of your server.

Consequently, if you are looking to unlock the potential of GeoServer to deliver powerful desktop and mobile web mapping solutions that exploit spatial and location-based data, the tutorials inside this book will meet your needs for a detailed solution.

What You Will Learn

  • Install GeoServer in a production environment to make it robust and scalable
  • Optimize and exploit your vector and raster datasets from a range of data storage options
  • Serve data that conforms to complex schemas
  • Utilize proxy data requests to enhance server capabilities or secure data services
  • Create great looking maps through alternative approaches for styling and web printing services
  • Exploit the spatial analysis capabilities of GeoServer through scripting
  • Integrate GeoServer in your corporate security mechanisms
  • Monitor the performance and health of your GeoServer instance and optimize it for the production phase
  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.

    Table of Contents

    1. Mastering GeoServer
      1. Table of Contents
      2. Mastering GeoServer
      3. Credits
      4. About the Author
      5. About the Reviewers
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Installing GeoServer for Production
        1. Java requirements
          1. Installing Java on CentOS 6.3
          2. Installing Java on Windows Server 2008 R2 SP1
        2. Installing Apache Tomcat
          1. Installing Apache Tomcat 7 on CentOS 6.3
            1. Running Apache Tomcat as a service
            2. Securing Apache Tomcat
          2. Installing Apache Tomcat 7 on Windows Server 2008 R2 SP1
            1. Controlling the Tomcat service
            2. Configuring the Tomcat service
        3. Deploying GeoServer to Apache Tomcat
          1. Deploying on CentOS 6.3
          2. Deploying on Windows Server 2008 R2 SP1
          3. Checking GeoServer deployment
        4. Configuring GeoServer for maximum performance and availability
          1. Scaling vertically
          2. Scaling horizontally
          3. Getting the best of both
        5. Configuring multiple GeoServer instances on a single server
          1. Configuring on CentOS 6.3
          2. Configuring on Windows Server 2008 R2 SP1
        6. Summary
      9. 2. Working with Raster Data
        1. Increasing the raster formats supported by GeoServer
          1. Installing the GDAL binary libraries
            1. Installing on CentOS Linux 6.3
            2. Installing on Windows Server 2008 R2 SP1
              1. Setting environment variables
          2. Installing the GeoServer GDAL plugin
        2. How to optimize raster data for better performance
          1. Understanding your source data
          2. Single file versus multifile
          3. GeoTIFF overviews and tiling
            1. GeoTIFF overviews
            2. GeoTIFF tiles
            3. Converting raster formats to GeoTIFF
        3. How to serve very large raster datasets
          1. Using the ImageMosaic format
            1. Creating ImageMosaic automatically
            2. Creating ImageMosaic manually
          2. How to use the ImageMosaic JDBC extension
            1. Installing the extension
            2. Configuring the extension
              1. Preparing and loading raster data
              2. Creating the metadata table
              3. Creating the extension configuration files
              4. Creating the GeoServer data store
        4. Summary
      10. 3. Working with Vector Data in Spatial Databases
        1. Database connection pooling
          1. Understanding database connection pools
          2. Configuring a database connection pool
        2. JNDI connection or JDBC
          1. Configuring JNDI at the servlet container
        3. General database connection parameters
          1. The primary key metadata table
          2. The database session startup SQL
          3. The database session close-up SQL
          4. The geometry metadata table
        4. Serving data from PostGIS
          1. Publishing a PostGIS table as a layer
        5. Serving data from Oracle
          1. Installing the Oracle extension
            1. Validating the installation
          2. Publishing an Oracle table as a layer
        6. Serving data from Microsoft SQL Server and SQL Azure
          1. Installing the Microsoft SQL Server extension
            1. Installing Microsoft JDBC drivers on Linux
            2. Installing Microsoft JDBC drivers on Windows Server 2008 R2
            3. Validating the installation
          2. Publishing a Microsoft SQL Server table as a layer
        7. Creating SQL View layers
          1. GeoServer SQL Views versus database views
          2. Creating a SQL View layer
        8. Summary
      11. 4. Using GeoServer to Serve Complex Features
        1. The difference between simple and complex features
          1. Simple features – GeoServer's default
          2. Complex features
        2. Using GeoServer application schemas
          1. Installing and configuring the extension
            1. Configuring the WFS service
          2. Application schema mapping file
        3. Publishing data with an application schema
          1. Source data preparation
          2. The application schema mapping file
          3. Data store and feature type configuration
        4. Summary
      12. 5. Using GeoServer as a Proxy
        1. Defining cascaded services
        2. Using cascaded services
          1. Extending the capabilities of another WMS server
          2. WMS enabling a WFS-only server
          3. Using GeoServer as a reverse proxy
        3. Creating a cascaded WMS connection
          1. Creating the data store
          2. Publishing a cascaded WMS layer
        4. Connecting to a cascaded WFS
          1. Creating the data store
          2. Connecting through a proxy
        5. Extending server capabilities
        6. Summary
      13. 6. Controlling the Output of GeoServer
        1. Styling data with Styled Layer Descriptor
          1. Creating SLDs visually
          2. Taking SLD further – render transformations
        2. Styling data using Cascaded Style Sheets
          1. Installing the extension
          2. The basics of CSS styles
          3. Putting it all together
        3. Per-request styling of map features
        4. Per-request filtering of data
        5. Using Freemarker templates to change WMS responses
        6. Summary
      14. 7. Using GeoServer to Print Maps
        1. The GeoServer print extension
        2. Installing the print extension
          1. Verifying the print extension installed
        3. Configuring the print extension
          1. The dpis section
          2. The formats section
          3. The scales section
          4. The fonts section
          5. The hosts whitelist section
          6. The layouts section
        4. Defining print layouts
          1. Defining the layout metaData element
          2. Defining layout pages
        5. Making print requests
          1. The REST API
            1. Getting the print server capabilities
            2. Specifying print requests
        6. An example OpenLayers application
          1. Initializing the application
          2. Generating the print SPEC to POST
          3. Sending the print request
        7. Summary
      15. 8. Integrating GeoServer in a Spatial Data Infrastructure
        1. Definition of a spatial data infrastructure
          1. The technology platform of a spatial data infrastructure
        2. User perspective – editing data through WFS-T
          1. Using a Desktop GIS
            1. Connecting QGIS to GeoServer's WFS-T service
            2. Using the QGIS Topology Checker tool
            3. Using the WFS-T service to save results
        3. User perspective – consuming data
          1. Launching Google Earth from GeoServer
          2. Using the KML reflector to load data
          3. Using Google Earth network links
        4. Summary
      16. 9. GeoServer as a Spatial Analysis Platform
        1. Understanding Web Processing Services
          1. A WPS process
          2. WPS process chaining
        2. Installing the WPS extension
          1. Checking whether the extension is installed correctly
          2. Configuring the extension
            1. The workspace configuration section
            2. The Service Metadata configuration section
            3. The Execution Settings configuration section
            4. The Process groups configuration section
        3. Using WPS to perform spatial analysis
          1. Executing a WPS process
          2. Executing chained WPS processes
            1. Selecting the crime type
            2. Selecting the Police Force territory
            3. Executing the WPS process chain
        4. Understanding GeoScript
          1. GeoScript integration with GeoServer
        5. Installing the GeoScript extension
          1. Checking whether the extension has been installed correctly
        6. Scripting GeoServer
          1. Creating a WPS process
            1. Defining the WPS process
            2. Creating the WPS process run method
            3. Testing the Python WPS process
          2. Creating a RESTful service
        7. Summary
      17. 10. Enterprise Security and GeoServer
        1. Authentication and authorization
          1. User authentication methods
          2. User authorization methods
        2. Using Active Directory for user authentication and authorization
          1. Configuring Active Directory for authentication
          2. Configuring Active Directory for authorization
        3. Using Digest for user authentication
          1. Setting up an HTTP Digest authentication
          2. Testing an HTTP Digest authentication
        4. Using HTTP Header for user authentication
          1. Setting up an HTTP Header authentication
          2. Testing the HTTP Header authentication
        5. Summary
      18. 11. Monitoring the Performance and Health of GeoServer
        1. The importance of monitoring GeoServer
        2. The GeoServer monitor extension
          1. Installing the monitor extension
          2. Configuring the monitor extension
            1. The file
            2. The file
            3. The file
            4. The file
          3. Checking whether the monitor extension is installed correctly
          4. Viewing the monitor extension activity and reports
          5. Going further with the request data
        3. Stress testing GeoServer
          1. Generating test WMS bounding boxes
          2. Creating an Apache JMeter™ test workbench
          3. Choosing where to execute tests
          4. Executing the test profile
        4. Analyzing the results of the stress test
        5. Summary
      19. 12. Optimizing GeoServer for Production
        1. Deploying GeoServer in a cluster
          1. Sharing a data directory in Windows 2008 R2
        2. Optimizing GeoServer
          1. Native JAI and JAI image I/O extensions
          2. Optimizing Java Virtual Machine
          3. Disabling unused GeoServer services
          4. Managing request handling with the control-flow extension
            1. Installing the control flow module
            2. The control-flow module rules configuration
        3. Automatic recovery from service failures
          1. Creating a Windows Watchdog script
            1. Scheduling the Watchdog script
          2. Creating a Linux Watchdog script
            1. Scheduling the Watchdog script using cron
        4. Summary
      20. Index