en
de

GIS: web map services (Part 2)

4 June 2014
| |
Reading time: 2 minutes

When I started working with GIS, I thought I knew what geometry is and what a feature is. Geometry was familiar from the math lessons and feature from scrum and specification documents. After some time, both terms had a different meaning.

That’s why I give you an introduction in a few important terms from the world of GIS.

In the previous post I gave a short introduction to the GIS.

Geometry

One of the core elements of spatial data is geometry. The most used types are points, lines and polygons. Here a few examples:

  • bus stops can be represented as points
  • streets can be represented as lines
  • forests can be represented as polygons

In some systems, data can also have an elevation or it can be stored as arcs. Open street map uses nodes and ways instead of points and lines to store the geometries. Common Geometry Formats include KLM and WKT, both standards originated from OGC.

Feature

A feature is like a single database row or a business object. In addition to attributes like name and status it also stores geometry. A Feature layer is a collection of features. It is like a database table extended with spatial information, for example a coordinate system. Other types of layers include raster layer, which contains cached map images or a graphics layer, which allows sketching geometries.

Map Service

A Map service provides a collection of layers as a service. It has the information, how the layers can be visualized and has an access to the features or images on the layer.

Wikipedia has a good comparison of web map services. Most of the providers support creating and publishing user owned maps and collaborating data to the maps. OpenStreetMap is fully based own user created data, others relay on official data providers like Navteq. A collection of diverse geographical data can also be found in ArcGIS Online.

Layers from the map services can be used in map controls. Now, I will give you a few examples of using the map services.

How to get started?

Web map services are usually used via Rest/json interface and with Javascript libraries. Some providers have their own additional Java Script libraries, like Google Maps Api. Usually libraries from the provider can also read layers from other providers. Some libraries have also support for commonly used JavaScript libraries like for AngularJS, bootstrap and jquery for mobile.

I have used map services in two ways: for querying and map interaction. Some map services provide rest interface for querying data, clipping map images or getting directions. Then you don’t need your own map control, just call the rest request for wanted map service or layer.

Here are a few examples from a rest service interfaces:

Rest interface from Bing maps

Sample request from Esri, based on wms standard.

For using a map control and interacting with it, I have usually used the following approach:

  • Define a map control
  • Define layers
  • Add layers to maps in a suitable order
  • React to map events like select feature or click on the map. Different map providers provide a good sample library of using their service interfaces. Here are a few samples from Open layer and Google Maps Api.

My next article will make a deeper excursion to the world of map providers and compare the ease of usage and provided features from the developer’s point of view of a few map providers. Let me know which topic interests you; it might become a topic of one of the coming articles.

GIS: Introduction to Geographical Information System (Part 1)

Comments (1)

×

Sign up for our Updates

Sign up now for our updates.

This field is required
This field is required
This field is required

I'm interested in:

Select at least one category
You were signed up successfully.

Receive regular updates from our blog

Subscribe

Or would you like to discuss a potential project with us? Contact us »