Book Image

Mastering Geoserver

By : Colin Henderson
Book Image

Mastering Geoserver

By: Colin Henderson

Overview of this book

Table of Contents (19 chapters)
Mastering GeoServer
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Since its release in March 2002, GeoServer continued to mature and develop into a sophisticated open source web mapping server. It has a feature set that puts it on par with (some will argue that it even beats) the most popular commercial off-the-shelf web mapping servers. The key to a successful open source software project is to have a strong and talented group of developers and a vibrant community of active and engaged users. GeoServer has both of these key ingredients, which is why it is one of the most popular open source web mapping solutions available today. From large organizations such as Great Britain's national mapping agency (Ordnance Survey) handling large volumes of data to simple small-scale community websites, GeoServer can handle it all.

This book is intended as a natural follow-on from GeoServer Beginner's Guide by Stefano Lacovella and Brian Youngblood, also published by Packt Publishing. It is meant as an advanced guide to GeoServer, and is ideal for when you want to take GeoServer beyond the simple delivery of web maps into advanced uses such as spatial analysis. The book covers a variety of concepts such as installing production-ready and optimized servers, loading and managing spatial data, running complex spatial analysis, and manipulating the output.

What this book covers

Chapter 1, Installing GeoServer for Production, examines how GeoServer can be deployed in a production environment. Installation of GeoServer in Apache Tomcat on both Windows and Linux platforms is covered. The chapter ends by looking at different production-deployment architectures for failover and high availability.

Chapter 2, Working with Raster Data, addresses the different types of raster data that can be served by GeoServer and how to optimize them to serve at performance. Increasing the number of raster formats that can be served by implementing the GDAL extension is covered along with an approach to storing and serving very large coverage.

Chapter 3, Working with Vector Data in Spatial Databases, concentrates on storage and serving of vector data from spatial databases. PostGIS, Oracle, and Microsoft SQL Server databases are covered along with the use of SQL Views as layers.

Chapter 4, Using GeoServer to Serve Complex Features, describes how GeoServer can be used to deliver complex-featured schemas as a WFS service. In this chapter, we take a look at the concepts involved in complex schemas, discussing the difference between simple and complex features. To illustrate the concepts, we will take the Open Street Map data and publish it as an INSPIRE Annex I Road Transport Network schema.

Chapter 5, Using GeoServer as a Proxy, takes a look at using GeoServer's cascaded services to act as a proxy to another WMS and/or WFS server. This capability is a little gem and often underutilized in production. We take a closer look and explore the different reasons why we might like to do it.

Chapter 6, Controlling the Output of GeoServer, takes a closer look at the technologies available to allow us to set styling for our layers. The chapter introduces us to the CSS styling extension that allows people familiar with this standard web technology to create gorgeous-looking maps. In addition to looking at how layers can be styled, we will also explore other areas where we can control GeoServer's output, such as responses to WMS GetFeatureInformation requests.

Chapter 7, Using GeoServer to Print Maps, tells us that no web mapping server will be complete without the capability to generate printed output. In this chapter, we take a look at the community print extension that adds the capability to generate output to print through a flexible and powerful template capability. We learn how to install and configure the extension as well as create a print template and exploit the capability with an example using OpenLayers.

Chapter 8, Integrating GeoServer in a Spatial Data Infrastructure, explores the concepts behind SDI. This chapter shows us how GeoServer can be integrated within a complete production system to provide more than just a means of delivering styled maps for a web application.

Chapter 9, GeoServer as a Spatial Analysis Platform, explores the technologies available in GeoServer that allow us to perform server-side spatial analysis. GeoServer, in production, does not have to simply deliver maps for use in web applications. It is a powerful spatial analysis platform in its own right. First, the chapter explores the use of Web Processing Services (WPS), and it then moves on to show us how we can create our own services using GeoScript.

Chapter 10, Enterprise Security and GeoServer, demonstrates how GeoServer can be secured within a corporate environment utilizing standard corporate security technologies such as LDAP and Active Directory. Other options to secure GeoServer are also covered to show us how easy it is to lock down our web mapping servers.

Chapter 11, Monitoring the Performance and Health of GeoServer, is an important chapter because it shows us the tools available to monitor the health of our GeoServer instances. Maintaining a healthy GeoServer instance is crucial for a good user experience of applications using maps and the data served. This chapter will help us to understand when our servers perform sub optimally.

Chapter 12, Optimizing GeoServer for Production, is the final chapter of the book, and this is where we take a last look at the configuration of our server. The chapter goes about providing strategies and options to optimize the configuration of our servers. It also introduces us to some special considerations when running a cluster of GeoServers.

What you need for this book

In order to implement what you will be learning in this book, you just need the following:

  • Java 1.7

  • GeoServer

Who this book is for

This book is for a GIS professional who intends to explore advanced techniques and get more out of GeoServer deployment other than simply delivering good-looking maps. This book will teach you advanced topics to enable you to provide a platform for server-side spatial analysis and deploy GeoServer in enterprise deployments. Familiarity with GIS and concepts of web mapping servers will be helpful, but is not essential.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Our crime_type parameter has been recognized and added to the table."

A block of code is set as follows:

SELECT 
    ID, 
    REPORTED_BY, 
    CRIME_TYPE, 
    LAST_OUTCOME_CATEGORY, 
    GEOM 
FROM 
    STREET_LEVEL_CRIME 
WHERE 
    CRIME_TYPE = '%crime_type%' 
    AND 
    LAST_OUTCOME_CATEGORY = 'Under investigation'

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

- !columns
    widths: [709, 113]
    width: 822
    absoluteX: 10
    absoluteY: 585
    items:
      - !text
        text: '${mapTitle}'
        font: Arial Bold
        fontSize: 28
        vertAlign: middle
      - !image

Any command-line input or output is written as follows:

$ sudo service tomcat-1 restart
$ sudo service tomcat-2 restart

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "To the right of the map, there is a Print Settings box that contains controls that can be used to set the content for print."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.