Thursday, September 2, 2010

Expanding Beyond the Point - Geo Geometries and Features

When adding "geo data" to your content, it is tempting to think you just need to add a latitude and longitude and you're done.  After all, this allows you to plot your data on a map, by applying a push pin or the like.
what's the point?

However, that lat+long pair may indicate the centre of a location in your content, but it doesn't reveal anything about the scale or type of the location.  There are two ways you can do this.  One is to make use of a geometry, the other is to identify the feature type.  And you can use both together.

Geo Geometries

Geometry at the National Mosque
If you look at the various geo standards, you'll see that it is common to use different types of geometry for geographic data.  For example, if you look at you'll see


The polygon, box and circle all express areas.  The needs of your application will likely drive which one might be most appropriate.  For example, if you want to display a map at the right "zoom level", it is likely that a point (aka the centroid) and a box (aka the bounding box) are enough.  (In which case, you'll need three points to express them - one for the centroid, two for the corners of the bounding box.  Obviously, the other geometries have different characteristics - you only need the centroid and a radius to express a circle, whereas a polygon must have at least three points, but can have many more).

Geo Features

Pigeon Point / Sky Whale...
On the other hand, it could be that what you're aiming to do is to describe what is known as the "geo feature", rather than or in addition to the geometry of an area.  In other words, how is the area classified - is it a city, a country, a park, a farm, a forest, a lake ...?  If so, then there are some geo ontologies that might help.  A popular one is the geonames ontology, which breaks down geo features into subtypes of administrative boundaries, hydrographic, area, populated place, road / railroad, spot, hypsographic, undersea and vegetation