28,14 €
A fast-paced guide to putting your GeoServer-based application into fast, user-friendly, and secure production
Key Features
Book Description
GeoServer is open source, server-side software written in Java that allows users to share and edit geospatial data. In this book, you'll start by learning how to develop a spatial analysis platform with web processing services. Then you'll see how to develop an algorithm by chaining together geospatial analysis processes, which you can share with anyone in the world.
Next you'll delve into a very important technique to improve the speed of your map application—tile caching. Here, you'll understand how tile caching works, how to develop an effective tile cache-supported web service, and how to leverage tile caching in your OpenLayers web application.
Further on, you'll explore important tweaks to produce a performant GeoServer-backed web mapping application. Moving on, you'll enable authentication on the frontend and backend to protect sensitive map data, and deliver sensitive data to your end user. Finally, you'll see how to put your web application into production in a secure and user-friendly way. You'll go beyond traditional web hosting to explore the full range of hosting options in the cloud, and maintain a reliable server instance.
What you will learn
Who this book is for
This book is for anyone who wants to learn about advanced interfaces, security, and troubleshooting techniques in GeoServer. A basic understanding of GeoServer is required
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 117
Veröffentlichungsjahr: 2018
Copyright © 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Richa TripathiAcquisition Editor: Denim PintoContent Development Editor: Nikhil BorkarTechnical Editor: Subhalaxmi NadarCopy Editor: Safis EditingProject Coordinator: Ulhas KambaliProofreader: Safis EditingIndexer: Aishwarya GangawaneGraphics: Tom ScariaProduction Coordinator: Arvindkumar Gupta
First published: July 2018
Production reference: 1300718
Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.
ISBN 978-1-78953-860-1
www.packtpub.com
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Ben Mearns was previously the Lead Geospatial Information Consultant at the University of Delaware, where he was the senior GIS professional charged with leading, developing, and advising on GIS solutions. He developed the GeoServer-based campus mapping system. He has held GIS and data positions at the University of Pennsylvania Cartographic Modeling Lab, Princeton University Department of Sociology, and Macalester College Department of Geography.
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Title Page
Copyright and Credits
Expert GeoServer
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Developing a Spatial Analysis Platform with WPS
Installing and learning the basics of WPS
WPS request builder
Process chaining
OpenLayers integration
Summary
Speed Up Your App with Tile Caching
Tile caching basics
Configuring tile caching in GeoServer
Creating a tile-backed OL app
Using the tile cache
Resolving problems with tile caching
Summary
Optimizing GeoServer
Resolving bottlenecks
Optimizing vector data stores
Vector data formats
Optimizing raster data stores
WCS 
Clustered deployment
Summary
Secure Authentication
Configuring the proxy
HTTPS with TLS and certificates
GeoServer authentication
Secure login from OL
Summary
Putting it into Production
Hosting your GeoServer instance and app
Monitoring the GeoServer instance
Backup and recovery
Production checklist
References and credentials
Locking down
Regular maintenance
Tuning
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
This book will cover web-processing services, speeding up your app with tile caching, optimizing GeoServer to get the best and most stable performance, and putting your GeoServer-backed app into production.
By the end of the book, you will understand how to put a GeoServer-backed app into production on a host infrastructure with the best performance and reliability.
The target audience for this book should have a good understanding of GeoServer use and web hosting.
Chapter 1, Developing a Spatial Analysis Platform with WPS, will teach you how to create web-processing services to expose your data for live geospatial processing by your end user.
Chapter 2, Speeding Up Your App with Tile Caching, will explain tile caching and how to use it to create an app, and will help you to resolve any issues that may occur in the process.
Chapter 3, Optimizing GeoServer, will consist of techniques for getting the best performance out of GeoServer through the use of data formats and clustering, and will help you to ensure reliable performance for your end user.
Chapter 4, Secure Authentication, will teach you how to add secure authentication to your GeoServer resources with TLS and GeoServer's authentication management system.
Chapter 5, Putting it into Production, will consist of the final steps in putting your app into production, including hosting options and management tasks.
The main technical requirement is a PC running Windows, Linux, or macOS. Your PC should be running an OS from the last 5 years. The emphasis is on Windows with coverage of Linux, but Mac users will find the GUI approach in Windows most applicable to their own environment.
You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
Log in or register at
www.packtpub.com
.
Select the
SUPPORT
tab.
Click on
Code Downloads & Errata
.
Enter the name of the book in the
Search
box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR/7-Zip for Windows
Zipeg/iZip/UnRarX for Mac
7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Expert-GeoServer. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/ExpertGeoServer_ColorImages.pdf.
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "The httpd file includes some conditional directives for loading modules."
A block of code is set as follows:
<wps:Data> <wps:LiteralData>Min</wps:LiteralData></wps:Data>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
projection: new ol.proj.Projection({
code: 'EPSG:4326',
units: 'degrees', axisOrientation: 'neu', global: true})
Any command-line input or output is written as follows:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout C:\Apache24\conf\ssl\geoserver-demo.key -out C:\Apache24\conf\ssl\geoserver-demo.crt
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select the Execute process button, and you can see a successful output."
Feedback from our readers is always welcome.
General feedback: Email [email protected] and mention the book title in the subject of your message. If you have questions about any aspect of this book, please email us at [email protected].
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packtpub.com.
In this chapter, you'll learn how to use the Web Processing Service (WPS) to run geospatial processing on your data and return the results to your web app. We'll start out by installing the WPS plugin on your GeoServer instance, and you'll learn how it works. Then you'll use the WPS request builder to create some simple WPS requests. You'll explore the process chaining technique with a more complex example, and finally, we'll integrate the complex WPS request into OpenLayers.
In this chapter, we will cover the following topics:
Installing and learning the basics of WPS
WPS request builder
Process chaining
OpenLayers integration
Let's get started by installing and learning the basics of WPS. We'll start by installing the plugin and noticing changes in the web administration interface within GeoServer. You'll learn about the WPS standard and basic structure, and finally, we'll look at a simple WPS request.
WPS is an interface standard, similar to WMS and WFS; however, the data output by WPS is dynamically created by a process or set of processes run by the WPS server; in our case, GeoServer. Like WFS, a request can be sent synchronously or asynchronously via HTTP POST or HTTP GET. The WPS standard defines the format of the expected input and output of the processes it interfaces with, so the data that you send in needs to match the expected data format of the service.
An example of this could be a buffer process that takes, as an input, a geographical coordinate expressed as JSON, and produces a polygon overlay that is perhaps produced as GML, and then that is displayed on a map in a web app, as shown in the following diagram:
First we need to install the WPS plugin with GeoServer, as this capability is not available in GeoServer without the plugin. The way that you do that is the same as for other plugins and GeoServer. You go to the released download page (http://geoserver.org/release/stable/), and the Extensions section is at the bottom. You download the WPS services zip archive, and expand it, and then pull it into the WEB-INF plugins directory. WPS can be used with HTTP GET and HTTP POST.
The following is an HTTP GET WPS request:
http://localhost:8080/geoserver/ows?service=wps&version=1.0.0&request=GetCapabilities
After we've installed the WPS plugin, we can now send a WPS request to GeoServer, and, through this URL, we're using the get capabilities operation within WPS which, like WFS or WMS, just gives us an XML representation of all of the processes that the WPS server supports.
And you can see, here we have many processes, such as this envelope process, which you may recognize from other GIS packages you might have used, as shown in the following code snippet:
<wps:Process wps:processVersion="1.0.0"> <ows:Identifier>geo:envelope</ows:Identifier> <ows:Title>Envelope</ows:Title> <ows:Abstract> Returns the smallest bounding box polygon that contains a geometry. For a point geometry, returns the same point. </ows:Abstract></wps:Process>
Here's a polygon extraction process, as shown in the following code snippet, and these are namespaces that correspond to the underlying code that's used to create the WPS service:
<wps:Process wps:processVersion="1.0.0"> <ows:Identifier>ras:PolygonExtraction</ows:Identifier> <ows:Title>Polygon Extraction</ows:Title> <ows:Abstract> Extracts vector polygons from a raster, based on regions which are equal or in given ranges </ows:Abstract></wps:Process>
