GIS for Dummies (written by a dummy)

From OpenStreetMap Wiki
Jump to navigation Jump to search

This page is meant as an introduction to some concepts of GIS/Geography for people like me, who are not geograph nor GIS specialist and came to OSM for a variety of reasons.

All that is written below I learned while developing Merkaartor. Feel free to rectify any stupid thing I might say ;-)

Datums, or what is this WGS84 thingy

Everybody knows that the Earth is round, right? Well, as you might already know, it is not. Due to various forces, the Earth is actually flattened at the poles and thus looks like an ellipsoid. More than that, it's shape is actually constantly changing!

As you know, any point on earth can be referenced by longitude(E-W) and latitude(N-S). Problem is that those coordinates are defined from a (0,0)° point, which is constantly moving! To be able to have a common reference system, we have to have a precise definition of the metrics of the earth and that is what the datums describe.

The most recent standard (and the one used by both GPS'es and OSM) is WGS 84.

  • A good collection of background articles and terminology regarding Datums and Map Projections can be found on the GRASS Wiki's Basic GIS concepts page. Exhaustive mathematical documentation can be found on the PROJ.4 website.

Projections, or what is Mercator

Mercator = Cylinder
World in Mercator

As the Earth is round (well, not so round but let's assume it is), we have to find a way to display our 3D globe on our 2D screens (or 2D printed maps). That's where projections come into play. By simple or very complicated maths depending on the projection, the Earth globe is projected on a 2D surface.

There are a myriad of different projections, each one used for different purpose. For OSM, the most important are Mercator and Platte Carrée for reasons you'll learn later, but really any projection can be applied to the OSM data.

For your general knowledge, Gerardus Mercator was a belgian flemish cartographer of the 16th century.


Main page: TMS

TMS is a standard for the tile-based delivery of map images through the internet. While the actual details of the implementation may vary, let's say that the common denominator is that a map is pre-rendered at various zoom levels, spliced into tiles (generally 256x256 pixels) and served via a simple web server.

The projection commonly used for generating the maps is Mercator, or rather a special case of Mercator we'll call the "Google projection". The particularity of this projection is that it is capped in latitude at about 85° north and south and that, when the whole world is displayed, the full map is a square. The projection is generally only useful for visual maps.


Main page: WMS

WMS (Web Map Service) is another standard for delivering maps images. It is quite different from TMS in that what is delivered to the client is rendered on the spot, depending on numerous parameters specified in the URL. Basically, you specify what you want to see (layers), the area you want to be displayed (bounding box) and the format of the returning image (encoding and size).

The "projection" commonly used with WMS is epsg:4326. I put projection into quotes, because epsg:4326 is not really a projection, it just says that we will be using longitude/latitude with the WGS84 datum. The equivalent projection is called "Platte Carrée", which is a nice name to plainly say that, without taking the scale into account, 1° = 1 pixel. As a result, longitude going from -180° to +180° and latitude from -90° to + 90°, a full Earth projection is a rectangle with a scale of 2:1.

Ways, Points and Polygons

Here, OSM differs from most established GIS-Software and data-formats. OSM represents most of its map data with two simple element types: nodes and ways. Most other formats have "polygons" and which represent two-dimensional areas (In OSM, closed ways are used for that).

File Formats - What is a "Shape"?

The most common file format to exchange GIS-data is the .shp format also known as Shapefile. It was introduced by ESRI (the company that brings you the infamous ArcGIS) and today is the de-facto standard in the business. Many GIS-Programs can work with Shapefiles or can at least convert data from shapefile into another format that works for them. A Shapefile always consists of multiple "real" files, so it is easy to destroy, if you copy / paste it a lot.

Layers - are we in GIMP or what?

Most GIS-Programs feature something called "layers" - a concept that many people may know from editors like Photoshop or GIMP. The general idea is relatively simple: Instead of putting all data on the same plate, you stack different types of data over one another. This can make things easier or more powerful for certain types of data use/handling/analysis. To use an example from the GIS-world:

Some scientist has a satellite image from the Sahel. For his work, he wants to use this to identify a) important roads and b) waterholes. Therefore, he uses the image as his baselayer and creates two more above that: One layer for ways (the roads), one for points (the waterholes).This is necessary for two reasons:

  1. To keep the data organized: Roads and Waterholes are two different aspects, so putting them into one layer would not be very tidy
  2. Because many formats to store georeferenced data (.shp being the most common) can only handle one type of data per file

In OpenStreetMap we keep it simple. It's a crucial aspect of the project, that new editors can get to grips with the editing software and as quickly and easily as possible. The map data is generally regarded as being lumped together all on one layer. Some editors support separate layers, but this is generally for use as a datasource handling/merging mechanism. This is not really a limitation! It's just a different way of thinking about building a map. OSM-based map displays often pick out certain OSM tags to show as separate layers (e.g. web map displays with click-able markers). Likewise any process of converting OSM data to Shapefiles will involve splitting the data out by tags.

Note: Here we talk about layers as seen GIS software. The word "Layer" is used in several other contexts.