Category Archives: gis

Beginner to GIS and web mapping

Recently, I’ve taken an interest in GIS and OpenStreetMap, this blog post serves as a quick guide and reminder to myself of what I’ve found.

OpenStreetMap or OSM, is the wikipedia equivalent for mapping. It already has quite extensive details of streets at least for Australia partially aided by the use of nearmap and yahoo. The only detail missing from it is street address numbers, which makes it less useful for searching addresses and routing. It does have a increasing number of POIs including restaurants, shopping centres and schools.

One of the first things you will find out is that longitude and latitude for a particular point on earth can differ depending on the Spatial Reference/datum you’re using. This blog post explains it perfectly. The most popular datum would probably be WGS84, which is the one used by GPSes. In Australia, many maps use GDA94, which is roughly equivalent to WGS84. The difference between WGS84 and GDA94 is that the continental plate of Australia moves north easterly around 7cm per year, and in GDA94 coordinates, all points in Australia will not change, whereas in WGS84 terms, every point in Australia will be offset due to the drift. In 2000, the difference between GDA94 and WGS84 is 45cm. By extrapolation, in 2010, it would be around 1 meter, which is still less than the error for standard consumer GPSes of 20 meters. For the most part, you can consider WGS84 and GDA94 the same.

There are many more spatial references defined and collected by various groups, the most popular being EPSG. You can find an extensive list of spatial references at Here are some notable references:

There seems to be two types of coordinate systems – projection and geographic. Geographic is the actual system with a datum used to describe location in the 3D world, where as projection is the system used to display the 3D world in 2D, converting a sphere or ellipsoid into a flat map. Three popular projections are Plate Carree, Mercator and UTM. Plate Carree simple maps lon/lat to X and Y, while Mercator progressively scales the map toward the poles, stretching Greenland north and Antarctica south, eventually placing the poles theoretically at infinity. You can find more projections at ESRI’s arcgis documentation.

Once you’ve learnt about what these geographic coordinate systems are, you might want to manipulate them. On the website is sample code to convert between different spatial references or coordinate systems this code. Also on the same site is also code to calculate distance and bearing between two lon/lats points.

There are extensive open source tools available for GIS in the form of the OSGeo collection of tools.

Storage of map objects are available for postgresql (PostGIS) and sqlite (SpatiaLite), both adds OpenGIS standards to database.

The Javascript web map control used by OSM is OpenLayers, which supports multiple layer sources including google maps, yahoo and WMS. Another map display control is MapBuilder, but it seems it has reached its end of life, with the creators recommending OpenLayers. Both are open source.

That should mostly cover what I’ve learnt thus far.