Example: Import GML / OS Open Map Local

eg_import_gml_su01_00.pngIn 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.

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.  




In the illustration above we have created a map, dragged and dropped a Bing Streets image server layer into it and then we have dropped the Building Drawing layer into it from the Building folder.    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.




The Open Map series provides spectacular, professional data for the UK, but it does have some odd omissions.  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 Stonehenge, seen at right within the half-circle, walking area set aside for viewing.




In the above we have zoomed much further into the view near Salisbury.  We have used Style to color the building areas a yellow color and the Layers panel to make the Building Drawing layer partially transparent.  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 / JSON File topic.



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









Web Servers


File - Import


File - Create - New Data Source




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.