Book Image

GeoServer Beginner's Guide - Second Edition

By : Stefano Iacovella
Book Image

GeoServer Beginner's Guide - Second Edition

By: Stefano Iacovella

Overview of this book

GeoServer is an opensource server written in Java that allows users to share, process, and edit geospatial data. This book will guide you through the new features and improvements of GeoServer and will help you get started with it. GeoServer Beginner's Guide gives you the impetus to build custom maps using your data without the need for costly commercial software licenses and restrictions. Even if you do not have prior GIS knowledge, you will be able to make interactive maps after reading this book. You will install GeoServer, access your data from a database, and apply style points, lines, polygons, and labels to impress site visitors with real-time maps. Then you follow a step-by-step guide that installs GeoServer in minutes. You will explore the web-based administrative interface to connect to backend data stores such as PostGIS, and Oracle. Going ahead, you can display your data on web-based interactive maps, use style lines, points, polygons, and embed images to visualize this data for your web visitors. You will walk away from this book with a working application ready for production. After reading GeoServer Beginner's Guide, you will be able to build beautiful custom maps on your website using your geospatial data.
Table of Contents (20 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Index

LineString symbols


Lines are other simple features you can draw on your map. Inside a rule for lines, you have the <LineSymbolizer> element where you define color, thickness, and the type of line to draw (for example, a continuous or a dashed line). As for points, we will start with a simple symbol and then move to examples that are more complex.

Creating a simple line style

We will use a rivers and lake centerlines shapefile from Natural Earth to create a map of the rivers of the world with a light sky blue color:

  1. Take the PopulatedPlaces.xml file, make a copy to Rivers.xml, and then edit the new file in your text editor. Find the text inside the <Name> element and replace it with the following line of code:
 <Name>Rivers</Name> 
  1. Replace the text inside the <Title> element with the following lines of code:
 <Title> Geoserver Beginners Guide: Rivers simple stroke </Title> 
  1. Now replace the <FeatureTypeStyle> code with the following piece of code. We...