Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
GeoServer Beginner's Guide

You're reading from   GeoServer Beginner's Guide Share and edit geospatial data with this open source software server

Arrow left icon
Product type Paperback
Published in Feb 2013
Publisher Packt
ISBN-13 9781849516686
Length 350 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (20) Chapters Close

GeoServer Beginner's Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. GIS Fundamentals FREE CHAPTER 2. Getting Started with GeoServer 3. Exploring the Administrative Interface 4. Accessing Layers 5. Adding Your Data 6. Styling Your Layers 7. Creating Simple Maps 8. Performance and Caching 9. Automating Tasks: GeoServer REST Interface 10. Securing GeoServer Before Production 11. Tuning GeoServer in a Production Environment 12. Going Further: Getting Help and Troubleshooting Pop Quiz Answers Index

The foundation of any GIS – spatial data


If you have ever built a simple map to annotate your hiking on mountains or to send driving directions to your girlfriend or boyfriend, you have dealt with spatial data.

Spatial data is the foundation of any GIS. You know that a building is likely to fall down unless it is sitting atop a strong foundation. So you need to understand spatial data or you will be producing poor map output.

But what is spatial data in simple words? From a general point of view you can consider a piece of spatial information. Each description of an object contains a reference to its position on the Earth's surface. Well, that is not a rigorous formal definition as there are a lot of objects below and over the earth's surface, but for now we are fine with this simplistic definition.

Think of some lists of familiar objects:

  • A list of bookshops with addresses

  • A list of places you visited during your trips

  • A list of points of interest, for example, restaurants, museums, and hotels, you collected with your mobile phone

  • An aerial photo with a view of a city, where you can recognize notable places

You can say where each element is located in a more or less precise way. They are real objects represented with spatial data. As you may have noted, the spatial information is represented in quite a heterogeneous way. Most people are able to recognize spatial information in any group from the previous list. Unfortunately, GIS software and GeoServer are an exception to this and tend to prefer a strong structured piece of information. If you are going to use your spatial data with GeoServer, you need to organize it more accurately. We will talk specifically about GeoServer's data connectors in Chapter 5, Adding Your Own DataStore, but for now it is important that you understand how spatial data is commonly organized and stored. As you keep on making maps, you will deal with lots of different spatial data.

Measuring the world

So spatial data are references for an object's position on the earth's surface. How can you measure and store them in a numeric format? An elementary model of the earth could be a sphere. On a sphere's surface, you can measure positions with angular units called latitude and longitude. Latitude (ϕ) measures the angle between the equatorial plane and a line that passes through that point and is normal to the surface; whereas longitude (λ) measures the angle east or west from a reference meridian (for example, that passing through Greenwich observatory) to another meridian that passes through that point. Angular measures can be expressed in digital degrees or in degrees, minutes, and seconds.

If you want to store the location of The Statue of Liberty, you can express it as Lat. 40° 41′ 21″ N, Long. 74° 2′ 40″ W with degrees, minutes, and seconds or as 40.689167, -74.044444 using decimal degrees.

Note

We normally think of earth as a sphere but this is not its real shape. Geodesy, the science of studying the earth's shape, defines earth as represented by a geoid, an ideal surface defined by the level of sea if oceans would cover the entire earth. For practical purposes, as in projections, geoid is too complicated to use and the earth's shape is defined by an ellipsoid. The ellipsoid is described by its semi-major axis (equatorial radius) and flattening.

Have a go hero – move around the planet with decimal degree coordinates

Does it sound a little bit complicated? Don't be afraid and explore locations on earth with Lat. Long. coordinates. In the following table, there are a few famous places with coordinates in decimal degrees. Point your browser to http://maps.google.com, insert coordinates in the search textbox, and then press Enter. Your map will be panned to the location. Google maps enable you to query for coordinates of any place on earth; find that function and look for some great places.

Rome, Italy

41.890, 12.492

Colorado Grand Canyon, USA

36.055, -112.122

Paris, France

48.858, 2.294

Iguazú National Park, Argentina

-25.688, -54.442

Ayers Rock, Australia

-25.345, 131.036

Projecting a sphere on a plane

Did you ever play with an orange peel? I did it a lot when I was a child, often pressing them in the hope to flatten it almost perfectly. It's a hopeless challenge, but kids are stubborn and ambitious. Many years later I found a similar analogy in a geography book. It was talking about cartographic projection and used an orange as a model of the earth. If you think of the orange's peel as the earth surface, it is suddenly clear why you can't have a planar representation of the earth's surface without a great amount of distortion.

All the maps you will ever find are on a plain paper sheet. Curved digital screens are quite uncommon in GeoGeek's nests. So how do cartographers represent a curved surface on a plain? This is done by means of a mathematical operation called projection.

Indeed, there are several different projections developed in the last few centuries by cartographers and mathematicians. There is no mathematical method to transfer a sphere or an ellipsoid to a two-dimensional space without distortion. Hence, projections modify the data and include some deformations about lengths, areas, or shapes you can observe and measure on maps.

We can classify projections according to the geographical features and properties they preserve:

  • Conformal projections preserve angles locally. Meridian and parallels intersect at 90-degree angles.

  • Equal Area projections preserve proportions between areas. In a map with equal area projections, each part has the same proportional area as the corresponding part of the earth.

  • Equidistant projections maintain a scale along one or more lines, or from one or two points to all other points on the map. Lines along which the scale (distance) is correct, are of the same proportional length as the lines they reference on the globe.

It is important that you understand there is no best projection; choosing one for your map is a trade-off. According to the portion of the earth's surface, the map that you are designing will contain and/or use the projections that suit best. Let's explore some widely-used projections.

You have been reading a chapter from
GeoServer Beginner's Guide
Published in: Feb 2013
Publisher: Packt
ISBN-13: 9781849516686
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime