Book Image

GeoServer Beginner's Guide

Book Image

GeoServer Beginner's Guide

Overview of this book

GeoServer is an open source server-side software written in Java that allows users to share and edit geospatial data. Designed for interoperability, it publishes data from any major spatial data source using open standards. GeoServer allows you to display your spatial information to the world. Implementing the Web Map Service (WMS) standard, GeoServer can create maps in a variety of output formats. OpenLayers, a free mapping library, is integrated into GeoServer, making map generation quick and easy. GeoServer is built on Geotools, an open source Java GIS toolkit.GeoServer Beginner's Guide gives you a kick start 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, style points, lines, polygons, and labels to impress site visitors with real-time maps.Follow along through a step-by-step guide that installs GeoServer in minutes. Explore the web-based administrative interface to connect to backend data stores such as MySQL, PostGIS, MSSQL, and Oracle. Display your data on web-based interactive maps, style lines, points, polygons, and embed images to visualize this data for your web visitors. Walk away from this book with a working application ready for production.After reading the GeoServer Beginner's Guide, you will have beautiful, custom maps on your website built using your geospatial data.
Table of Contents (20 chapters)
GeoServer Beginner's Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding coordinate systems


You learned about the earth's shape and about 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.

  • Geographic coordinate systems use latitude and longitude as angles measured from the earth's centre, 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 relatively to the centre of the earth (called datum).

  • A projected coordinate system is 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 corporate systems 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 which are widely used.

Universal Transverse Mercator system

Commonly knwn as UTM, this is not really a projection. It is a system based on Transverse Mercator projection. This projection uses a cylinder tangent to a meridian to unwarp 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 Long. 180W towards the east. Please note that you can't have a map representing more than one UTM zone. Indeed, UTM is well suited for big-scale maps.

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 on online mapping systems. It stretches areas in a north-south direction and, unlike the Transverse Mercator, it is not conformal.

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 OGC's 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. It was founded in 1986 by several European Oil companies to collect and maintain geodetic information. In 2005, EPSG was absorbed by OGP (an international forum of Oil and Gas producers) which 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 which is your data's SRID. Without it you can't represent data on a map without the risk of great errors.

Have a go hero – explore 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: