Example: Import GML / OS Open Map Local

In this example we use Manifold's GML dataport to import an Ordnance Survey, UK, vector map in GML format from the OS Open Map - Local series.    In this example we download the data in GML format.   GML is a text format that is remarkably inefficient:  the 125 MB zip file downloaded for this topic unzips into over a gigabyte of GML text.  Importing that GML, as fast as Manifold is, takes almost eight minutes.    

 

The Ordnance Survey (OS) is the UK's state cartographic bureau, selling most of its cartographic products for a fee.  The OS Open Map series is free to download, available in both shapefile and GML format.   The Open Map - Local series of maps provides the most detailed vector data available from the OS at no charge.  

 

To acquire an OS Open Map we visit the OS Open Map - Local web site and click on the Free download link.  We choose GML as the supply format and click the National Grid Reference square of interest.   

 

The OS provides maps based on a grid system that codes each square with two letters.  In this example we choose the SU square, which covers the region that includes Stonehenge.   We follow instructions on the OS web page to Continue, and eventually we receive an email with a download link.

 

To fit into this documentation, illustrations show an artificially small Manifold desktop, with only a few panes, docked to the right side.   In real life we use a much larger Manifold desktop, and all panes would be turned on, with some panes docked to the left and others docked to the right.

Import GML File

The downloaded file is called opmplc_gml3_su.zip.  We unzip the file into a folder called OS OpenMap Local (GML) SU, which in turn contains a subfolder called data that contains the SU.gml file.

 

 

In Manifold, we launch File - Import, navigate to the data subfolder, and double-click on the SU.gml file to import it.

 

 

 

 

The GML imports as many drawings, providing layers that each contain areas, lines or points.  

 

 

 

 

To create the illustration above we create a map using a Bing streets image server as a base layer with the Building Drawing as a layer above.  

 

The buildings drawing contains areas that show the outlines of building footprints.  When zoomed far out they appear to be points.   We have also saved the project as SU.map, so that the next time we want to use this data it will open instantly.   We have also used the Layers pane to set opacity for the Building Drawing layer to 50%, so the background labels from the Bing street map layer better can be seen.

 

 

 

 

In the above we have zoomed much further into a view near Salisbury, showing the secret UK chemical and biological weapons laboratory at Porton Down, near Salisbury. We have used Style to color the building areas a yellow color.  The building outlines are a very close match to the satellite view of buildings, providing a much more accurate set of vector building footprints than those created automatically as seen in the Example: Import GeoJSON File topic.

 

 

 

 

The Open Map series provides spectacular, professional data for the UK, but it does have some odd omissions. as we can see by adding the NamedPlace Drawing as a layer to the map.  We have also added a Bing satellite layer.

 

For example, the famous Neolithic cromlech at Stonehenge is not found in the list of named places.  The nearest named place is Stonehenge Down, the field nearby.    In the illustration above we have added a Bing satellite layer and have zoomed into a view that shows Stonehenge, seen at right within the half-circle, walking area set aside for viewing.    We have Alt-clicked the yellow point in the field nearby to pick it for display in the Info pane.  

 

Notes

3D conversions - Geometry values with mixed 2Dand 3Dcoordinates in GML, GeoJSON, and TopoJSON are automatically converted to 3D with 2D coordinates padded with zeros.

 

See Also

Drawings

 

Tables

 

Maps

 

Style

 

Web Servers

 

Info Pane

 

File - Import

 

File - Create - New Data Source

 

GML

 

Example: An Imageserver Tutorial - An extensive tutorial showing step by step how to add new data sources that are image servers, how to show them as layers in a map, how to create a new drawing that matches the projection of the map and how to trace over what is seen in an image server layer to create an area object in the drawing.