Search icon CANCEL
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 geospatial data using Open Source standards

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781788297370
Length 384 pages
Edition 2nd Edition
Arrow right icon
Author (1):
Arrow left icon
Stefano Iacovella Stefano Iacovella
Author Profile Icon Stefano Iacovella
Stefano Iacovella
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. GIS Fundamentals FREE CHAPTER 2. Getting Started with GeoServer 3. Exploring the Administrative Interface 4. Adding Your Data 5. Accessing Layers 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

Measuring the world

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 east or west angle from a reference meridian (for example, the one passing through Greenwich observatory) to another meridian that passes through that point. Angular measures can be expressed in decimal degrees or in degrees, minutes, and seconds.

If you want to store the location of the Statue of Liberty, you can express it in the decimal degree form, as shown here:

40.689167, -74.044444

Alternatively, you can use the degrees, minutes, and seconds form as follows:

Lat. 40° 41′ 21″ N, Long. 74° 2′ 40″ W

In the decimal degrees form, you don't need to indicate the North, South, West, or East direction; this is represented from the plus/minus sign (+/-). The positive latitude is for the North direction and the positive longitude is for the East direction.

Consider the image of the model of the Earth given as follows:

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

Moving on to the planet with decimal degree coordinates

Does it sound a little bit complicated? Do not be afraid and explore locations on Earth with latitude and longitude 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 shift to the location.

Google Maps enables you to query for coordinates of any place on Earth; find that function and look for some great places.

Latitude Longitude Place
41.890 12.492 Rome, Italy
36.055 -112.122 Colorado Grand Canyon, USA
48.858 2.294 Paris, France
-25.688 -54.442 Iguazú National Park, Argentina
-25.345 131.036 Ayers Rock, Australia

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 about cartographic projection and used an orange as a model of the Earth. If you think of the orange's peel as the Earth's surface, it is suddenly clear why you can't have a planar representation of 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 plane? This is done by means of a mathematical operation called projection. Consider the following image:

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, as shown here:

  • 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 refer to 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 - Second Edition
Published in: Oct 2017
Publisher: Packt
ISBN-13: 9781788297370
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 ₹800/month. Cancel anytime