These tools enable you to build dynamic maps for your web site and other applications.
Although the OSGB Web Map Tools project does not provide free access to Ordnance Survey data sets, it has been designed specifically to work with Ordnance Survey data. To use Ordnance Survey data you will need a data licence. Ordnance Survey has a wide range of data licences available for businesses and other commercial requirements.
For more information see: http://ordnancesurvey.co.uk/oswebsite/business/
The OSGB Web Map Tools API comprises the following:
The OSGB Web Map Tools project is released subject to a BSD licence as set out below.
This open source project should not be confused with OS OpenSpace® which does allow access to some Ordnance Survey data sets by signing up to the Ordnance Survey OpenSpace Developer Agreement where there are terms and conditions and usage limits that apply. The Ordnance Survey OpenSpace Developer Agreement can be found at http://openspace.ordnancesurvey.co.uk/openspace/.
Crown Copyright (c) 2009, Secretary of State for Communities and Local Government, acting through Ordnance Survey. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Secretary of State for Communities and Local Government, acting through Ordnance Survey nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The tile mosaic batch process takes standard Ordnance Survey raster TIFF image files and converts them into GeoTIFF format ready to be served as a coverage from GeoServer (using the ImageMosaic plugin). Some of the raster data sets are resampled to provide suitable intermediate steps when zooming the map in and out. This process will normally be run once when the server is setup, but can be run anytime the Ordnance Survey raster data is updated.
The GeoServer ImageMosaic plugin allows the creation of a mosaic from a number of georeferenced rasters. The following files are provided by this installation in order to configure a new coverage with this plugin:
This set of instructions will install OSGBWebMapTools onto a Windows platform and requires administrator rights to the machine.
OSGBWebMapTools 2.0
Project home: http://sourceforge.net/projects/osgbwebmaptools/
Download link: http://sourceforge.net/projects/osgbwebmaptools/files/osgbwebmaptools/osgbwebmaptools-2.0/OSGBWebMapTools-2.0.zip/download
GDAL 1.6.2 release (Minimalist Windows Executables)
Project home: http://www.gdal.org
Download link: http://download.osgeo.org/gdal/win32/1.6/gdalwin32exe160.zip
Ordnance Survey raster map image data in TIFF format, along with the corresponding TIFF World files.
NOTE: You must already have access to this data, no Ordnance Survey raster data is included with this installation.
GeoServer is an open source software server written in Java that allows users to share
and edit geospatial data. Designed for interoperability, it publishes data from any major
spatial data source using open standards.
This server component enables the serving of the Ordnance Survey raster map tiles.
Java SE Development Kit 1.6 (JDK)
Project home: http://java.sun.com
Project home: http://tomcat.apache.org
Download link for Windows: http://mirror.public-internet.co.uk/ftp/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.exe
Binary core Windows Service Installer version.
Change port 8080 to port 80 in Tomcat's conf/server.xml file if you are intending to run an externally accessable website.
Install the Tomcat manager http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html
GeoServer 1.7.6
Project home: http://geoserver.org
Installation instructions are at: http://docs.geoserver.org/1.7.6/user/installation/index.html
This installation uses the GeoServer Web Archive (WAR) mode which runs inside of an
external Tomcat servlet container.
Download link: http://downloads.sourceforge.net/geoserver/geoserver-1.7.6-war.zip
Follow the web archive installation instructions at http://docs.geoserver.org/1.7.6/user/installation/geoserver-install.html#war-install
Install the GeoServer WAR file through the Tomcat manager interface http://localhost/manager/html.
<namespaces>
<namespace prefix = "cite" uri = "http://www.opengeospatial.net/cite" />
<namespace prefix = "it.geosolutions" uri = "http://www.geo-solutions.it" />
<namespace prefix = "tiger" uri = "http://www.census.gov" />
<namespace prefix = "sde" uri = "http://geoserver.sf.net" />
<namespace default = "true" prefix = "topp" uri = "http://www.openplans.org/topp" />
<namespace prefix = "sf" uri = "http://www.openplans.org/spearfish" />
<namespace prefix = "nurc" uri = "http://www.nurc.nato.int" />
<namespace prefix = "osgb" uri = "http://www.ordnancesurvey.co.uk/xml/namespaces/osgb" />
</namespaces>
<formats>
<!--
a format configuration element serves as a common data source
parameters repository for all coverages it holds.
-->
<format id = "arcGridSample" enabled = "true" namespace = "nurc" >
<title>arcGridSample</title>
<type>ArcGrid</type>
<url>file:coverages/arc_sample/precip30min.asc</url>
</format>
...
...
...
<format id = "25k" enabled = "true" namespace = "osgb" >
<title>25k</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\25k\25k.shp</url>
</format>
<format id = "50k" enabled = "true" namespace = "osgb" >
<title>50k</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\50k\50k.shp</url>
</format>
<format id = "50kResampled" enabled = "true" namespace = "osgb" >
<title>50kResampled</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\50kResampled\50kResampled.shp</url>
</format>
<format id = "250k" enabled = "true" namespace = "osgb" >
<title>250k</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\250k\250k.shp</url>
</format>
<format id = "250kResampled" enabled = "true" namespace = "osgb" >
<title>250kResampled</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\250kResampled\250kResampled.shp</url>
</format>
<format id = "MiniScale" enabled = "true" namespace = "osgb" >
<title>MiniScale</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\MiniScale\MiniScale.shp</url>
</format>
<format id = "MiniScaleResampled" enabled = "true" namespace = "osgb" >
<title>MiniScaleResampled</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\MiniScaleResampled\MiniScaleResampled.shp</url>
</format>
<format id = "Overview1" enabled = "true" namespace = "osgb" >
<title>Overview1</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\Overview1\Overview1.shp</url>
</format>
<format id = "Overview2" enabled = "true" namespace = "osgb" >
<title>Overview2</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\Overview2\Overview2.shp</url>
</format>
<format id = "Overview2Resampled" enabled = "true" namespace = "osgb" >
<title>Overview2Resampled</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\Overview2Resampled\Overview2Resampled.shp</url>
</format>
<format id = "StreetView" enabled = "true" namespace = "osgb" >
<title>StreetView</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\StreetView\StreetView.shp</url>
</format>
<format id = "StreetViewResampled" enabled = "true" namespace = "osgb" >
<title>StreetViewResampled</title>
<type>ImageMosaic</type>
<url>file:C:\OSGBWebMapTools\Data\Tiles\StreetViewResampled\StreetViewResampled.shp</url>
</format>
</formats>
{return"http://###INSERT_YOUR_SERVER_DOMAIN_NAME_HERE###/geoserver/wms";},getApiKey:function()
{return"http://www.mydomain.com/geoserver/wms";},getApiKey:function()
The installation can be checked by running the basic map demo.
Type in http://###INSERT_YOUR_SERVER_DOMAIN_NAME_HERE###/OSGBWebMapTools/BasicMap.html
to the location in a web browser and a basic map window should appear.
Sometimes it can be useful to stop and restart Tomcat and look in the Tomcat and GeoServer logfiles for any errors.
This step is only needed if you wish to build the OSGB Web Map Tools API from the source files.
Project home: http://www.python.org
Download link for Windows: http://www.python.org/ftp/python/2.6/python-2.6.msi
Project home: http://openlayers.org
Download link: http://openlayers.org/download/OpenLayers-2.8.zip
The logo that appears at the bottom left of the map window can be changed or customised by editing the file c:\OSGBWebMapTools-2.0\OSGBWebMapTools\img\OS\OSGBWebMapTools.png in an image editor.
GeoWebCache is a cache for speeding up the serving of map tiles from GeoServer. It can be run as a separate web application in the Tomcat server container.
Project home: http://geowebcache.org/trac
Download link for Windows: http://etch.opengeo.org/geowebcache-1.2.0-beta-WAR.zip
getTileServerPath:function() {return"/geowebcache/service/wms";},
Sometimes Tomcat will throw an exception "java.lang.OutOfMemoryError: PermGen space"
This happens when you have too many classes loaded in the JVM, and GeoServer in combination with GeoWebCache uses a lot.
Trying adding this parameter to the java options of your Tomcat JVM configuration (tomcatw.exe):
-XX:MaxPermSize=128m
(or a bigger value depending on how many GeoServers/GeoWebCache instances
are running in parallel in your JVM).
You can also adjust the maximum JVM memory to something bigger, like:
-Xms48m -Xmx256M