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

Representing geometrical shapes


You learned how to calculate coordinates on the earth's surface. But how can you represent a real object, for example, a river, in a convenient way for a GIS?

There are two main approaches when building a spatial database, modeling vector data or raster data. Vector data uses a set of discrete locations to build basic geometrical shapes, such as points, polylines, and polygons.

Of course real objects are neither a point, nor a polyline or a polygon. In your model you have to decide which basic shape better suits the real object. For example, a town can be represented as a point if you are going to draw a map of the world with the countries' capitals shown. On the other hand, if you are going to publish a counties map, a polygon will enable you to draw the city boundaries to give a more realistic representation.

The simpler geometric object is a point. Points are defined as single coordinate pairs (x,y) when we work in two-dimensional space or coordinate triplets (x,y,z) if you want to take account of the eight coordinates. In the following examples, we use point features to store the location of active volcanoes:

Etna; 37.763; 14.993
Krakatoa; -6.102; 105.423
Aconcagua; -32.653; -70.011
Kilimanjaro; -3.065; 37.358

Did you guess the units and projections used? The coordinates are in decimal degrees and SRS is WGS84 geographic, that is EPSG:4326.

Points are simple to understand but don't give you many details about the spatial extent of an object. If you want to store rivers you need more than a coordinate pair. Indeed, you have to memorize an array of coordinate pairs for each feature in a structure called polyline:

Colorado; (40.472 -105.826, … , 31.901 -114.951)
Nile; (-2.282 29.331, … , 30.167 31.101)
Danube; (48.096 8.155, … ,45.218 29.761)

If you need to model an areal feature such as an island, you can extend the polyline object adding the constraint that it must be closed; that is the first and the last coordinate pairs must be coincident:

Ellis Island; (-74.043 40.699, -74.041 40.700, -74.040 40.700, -74.040 40.701, -74.037 40.699, -74.038 40.699, -74.038 40.698, -74.039 40.698, -74.041 40.700, -74.042 40.699, -74.040 40.698, -74.042 40.696, -74.044 40.698, -74.043 40.699)

Note

The feature model used in GIS is a little bit more complex than what we have discussed. There are some more constraints regarding vertex ordering, line intersections, and areal shapes with holes. Different GIS specified several different set of rules, often in proprietary formats. Open Geospatial Consortium (OGC) defined a standard for simple features, and lately most systems, open source in primis, are compliant with it. If you are curious about it, you can point your browser at http://www.opengeospatial.org/standards/is and look for The OpenGIS® Simple Features Interface Standard.

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