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

Understanding coordinate systems


You learned about Earth's shape and projection. Coordinate systems use these concepts to build a frame of reference to place objects on the Earth's surface. There are two types of coordinate systems: projected coordinate systems and geographic coordinate systems. Let's understand these as follows:

  • Geographic coordinate systems: These use latitude and longitude as angles measured from the Earth's center, as we saw previously. A geographic coordinate system is substantially defined by the ellipsoid used to model the Earth, and the position of the ellipsoid positioned relative to the center of the Earth called the datum.
  • Projected coordinate systems: These are defined on a flat two-dimensional surface. A projected coordinate system is always based on a geographic coordinate system; hence, it uses an ellipsoid and a datum. Besides, a projected coordinate system includes a projection method to project coordinates from the Earth's spherical surface onto a two-dimensional Cartesian coordinate plane.

Commonly used coordinate systems

Although there are hundreds of different projections, you can limit your knowledge to some that are widely used.

Universal Transverse Mercator system

Commonly known as UTM, this is not really a projection. It is a system based on the Transverse Mercator projection. This projection uses a cylinder tangent to a meridian to unwrap the Earth's surface. A maximum of 5° of distortion from the central meridian is acceptable. The UTM splits the world into a series of 6° of longitudinal-wide zones. As you may guess, there are 60 zones numbered from Longitude 180W toward the east. Note that you cannot have a map representing more than one UTM zone. Indeed, UTM is well suited for large-scale maps. Consider the following image:

Web Mercator

Web Mercator is a projection derived from Transverse Mercator. It maps ellipsoidal latitude and longitude coordinates onto a plane using Spherical Mercator equations. This projection was popularized by Google in Google Maps, and it is now widely used in online mapping systems. It stretches areas in a north-south direction and, unlike the Transverse Mercator, it is not conformal. Consider the following image:

Spatial Reference Identifier (SRID)

A spatial reference system identifier is a code to easily reference a spatial reference system (SRS). An SRS contains parameters about projection, ellipsoid, and datum. It can be defined using the Open Geospatial Consortium's (OGC) well-known text (WKT) representation. The SRS for the geographic WGS84 reference system is as follows:

    GEOGCS["WGS 84", 
    DATUM["WGS_1984", 
    SPHEROID["WGS 84",6378137,298.257223563, 
            AUTHORITY["EPSG","7030"]], 
            AUTHORITY["EPSG","6326"]], 
    PRIMEM["Greenwich",0, 
            AUTHORITY["EPSG","8901"]], 
    UNIT["degree",0.01745329251994328, 
            AUTHORITY["EPSG","9122"]], 
            AUTHORITY["EPSG","4326"]] 

The last line contains the number 4326; this is the SRID uniquely identifying this SRS. The long form should also contain the authority, that is EPSG:4326, but you will often find it indicated only by the number.

Note

EPSG is the acronym for European Petroleum Survey Group. Several European Oil companies founded it in 1986 to collect and maintain geodetic information. In 2005, EPSG was absorbed by OGP (an international forum for Oil and Gas producers) that formed the OGP Geomatics Committee. The committee maintains the registry and publishes it as a public web interface or a downloadable database.

It is very important that you know what SRID your data is in. Without it, you can't represent data on a map without the risk of great errors.

Exploring the EPSG registry

We described a couple of common and widely used SRSs, but there are a lot of them. There are several archives on the internet where you can find detailed information about SRSs and their elements, that is ellipsoids, datums, unit of measurements, projected, or geographic reference systems. One of the most authoritative and complete data sets is the EPSG Geodetic Parameter Registry. If you are curious about it, you can open your browser and point it to http://epsg-registry.org. Then, try a simple search by inserting a location name in the Area textbox as shown in the following screenshot: