 <?xml-stylesheet type="text/css" href="https://www.esdm.co.uk/Data/style/rss1.css" ?> <?xml-stylesheet type="text/xsl" href="https://www.esdm.co.uk/Data/style/rss1.xsl" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
  <channel>
    <title>The knowledge base blog</title>
    <link>https://www.esdm.co.uk/knowledge</link>
    <description />
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>mojoPortal Blog Module</generator>
    <language>en-GB</language>
    <ttl>120</ttl>
    <atom:link href="https://www.esdm.co.uk/Blog/RSS.aspx?p=138~108~44" rel="self" type="application/rss+xml" />
    <itunes:owner />
    <itunes:explicit>no</itunes:explicit>
    <item>
      <title>When GeoServer SQL Server stores won’t load on a new server</title>
      <description><![CDATA[<p>We’ve been migrating a large GeoServer instance onto a new Windows 2019 server. The old GeoServer instance was running version 2.7, the new one version 2.15.1. Nearly everything “just worked” after copying the old data directory into the new location, however several SQL Server stores didn’t appear.</p>

<p>This kind of thing was seen for each store in the GeoServer logs:</p>

<p><code>2020-06-01 13:26:43,677 WARN [org.geoserver] - Failed to load data store 'MyStoreName'<br />
com.thoughtworks.xstream.converters.ConversionException:<br />
---- Debugging information ----<br />
cause-exception&nbsp;&nbsp;&nbsp;&nbsp; : org.jasypt.exceptions.EncryptionOperationNotPossibleException<br />
cause-message&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : null<br />
class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : org.geoserver.catalog.impl.DataStoreInfoImpl<br />
required-type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : org.geoserver.catalog.impl.DataStoreInfoImpl<br />
converter-type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : org.geoserver.config.util.XStreamPersister$StoreInfoConverter<br />
line number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 31<br />
version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 2.15.1<br />
-------------------------------</code></p>

<p>First we verified that we could create a new SQL Server store using the GeoServer administrative interfaces – this proved that the plugin for SQL Server and the various driver files were installed and working correctly.</p>

<p>So why were the old stores not working? The store database connection for each store is defined in a file like this:</p>

<p>"D:\Geoserver_data_dir\workspaces\MyStoreName\MyStoreName\datastore.xml"</p>

<p>and in this file we find a line like this:</p>

<p><code>&lt;entry key="passwd"&gt;crypt1:ywSBY9D+HjlxxL/SuRwBPVmT8P98f47M&lt;/entry&gt;</code></p>

<p>The solution is to delete that line in the definition file for each store, then restart GeoServer. The stores then appear in the GeoServer admin pages, and you can edit each one to re-enter the password, after which any layers should be operational.</p>
<br /><a href='https://www.esdm.co.uk/when-geoserver-sql-server-stores-won’t-load-on-a-new-server'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/when-geoserver-sql-server-stores-won’t-load-on-a-new-server'>...</a>]]></description>
      <link>https://www.esdm.co.uk/when-geoserver-sql-server-stores-won’t-load-on-a-new-server</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/when-geoserver-sql-server-stores-won’t-load-on-a-new-server</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/when-geoserver-sql-server-stores-won’t-load-on-a-new-server</guid>
      <pubDate>Mon, 01 Jun 2020 13:25:00 GMT</pubDate>
    </item>
    <item>
      <title>How to remove .png files recursively from a folder tree without removing .png8 files too</title>
      <description><![CDATA[<p>We have some large GeoWebCache caches of Ordnance Survey map tiles in .png8 format. Unfortunately a few million .png files have crept into the caches too (accidental bad config at some point), duplicating the .png8 tiles and using up a lot more space. I wanted to delete these.</p>

<p>At first I thought "simple:-&nbsp;do a search in Windows Explorer for .png and delete". Ah no, that selects all the .png8 files as well, plus my number of folders and files were far too large.</p>

<p>Then I thought... <code>del /S *.png</code></p>

<p>But no, this deletes the .png8 files as well, grrr.</p>

<p>So I wrote a simple python script, that I will lodge here for future reference. It's Python 2.7, but I imagine would work in 3.* with little or no change. The final print statement probably slows things down, but I wanted to be able to see what was going on.</p>

<pre>
import os
indir = 'M:\\MyVeryLargeCachePath'
for root, dirs, filenames in os.walk(indir):
    for f in filenames:
        if os.path.splitext(f)[1] == '.png':
            os.remove(os.path.join(root, f))
            print('deleted ' + os.path.join(root, f))</pre>

<p>Assuming you have Python installed, simply save this as a file with a .py extension, modify the path and the file extensions to suit, then run it.</p>

<p>This same technique would work for other combinations of file extensions, e.g. to remove *.doc but not *.docx, or to remove *.xls while retaining *.xslx</p>
<br /><a href='https://www.esdm.co.uk/how-to-remove-png-files-recursively-from-a-folder-tree-without-removing-png8-files-too'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/how-to-remove-png-files-recursively-from-a-folder-tree-without-removing-png8-files-too'>...</a>]]></description>
      <link>https://www.esdm.co.uk/how-to-remove-png-files-recursively-from-a-folder-tree-without-removing-png8-files-too</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/how-to-remove-png-files-recursively-from-a-folder-tree-without-removing-png8-files-too</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/how-to-remove-png-files-recursively-from-a-folder-tree-without-removing-png8-files-too</guid>
      <pubDate>Wed, 27 May 2020 09:09:00 GMT</pubDate>
    </item>
    <item>
      <title>Configuring Geoserver with Geo web cache (GWC)</title>
      <description><![CDATA[<p>The aim of this is to improve the performance of our mapping (obvious really I hope) both in terms of the speeds a user experiences and in terms of the number of users our server can support.</p>

<p>In this post we are assuming we are looking at WMS – so image caching.</p>

<p>There are a couple of pre-requisites to get caching to work:</p>

<ul>
	<li>Your WMS requests must be using a recognised tiling system in the same coordinate system as you build your cache.</li>
	<li>You must be requesting your WMS as tiles</li>
</ul>

<h1>Consider your data</h1>

<p>Before launching into building tile caches its a good idea to stop and think about your data.&nbsp;</p>

<h2>Is the resolution of my data appropriate</h2>

<p>If its vector data for example can you simplify it at all (e.g. run <strong>.Reduce</strong> in SQL server or <strong>ST_Simplify</strong> in Postgres).&nbsp; We have seen numerous datasets where there are many nodes per metre and this is just extra load if the data is simply going to be displayed against a tiled map so its worth considering if its worth creating&nbsp;&nbsp; simplified version of your data.</p>

<h2>What is the maximum zoom I want users to see my data</h2>

<p>Its pointless to allow users to zoom in past the appropriate resolution for your data, and as you will see when we build the cache each extra step requires 4 times the storage of the previous level. <a href="http://bboxfinder.com" title="http://bboxfinder.com">http://bboxfinder.com</a> provides an easy way to check which tile step you are viewing the map at – and decide what is appropriate for your data.&nbsp;&nbsp; Tile steps run from 0 to 19 normally.</p>

<h2>What is the update frequency / churn of my data</h2>

<p>Caching is relatively easy if the data is unchanging.&nbsp; If it changes frequently you need to think about how to manage cache refreshing and what is the maximum time that users can wait to see refreshed data.&nbsp; As always there is a trade off with performance here.</p>

<h2>Do users filter my data</h2>

<p>If users filter your data to display you have to decide if you will cache every possible permutation (which may well not be practical unless the filters are very limited) or just cache the base layer and accept users will hit the source for filtered views.</p>

<h1>Deciding what to cache</h1>

<p>Once you have decided you want to cache your layer you then need to decide if you are going to cache every zoom level you are displaying the data at – or perhaps just the lower zoom levels and let users hit the source for detailed views (which will reduce your cache storage significantly in some cases)</p>

<h1>Enabling caching in geoserver</h1>

<p>The easiest way to enable caching (in that you can just request your WMS as normal) is to <em>enable direct integration with Geoserver WMS</em>&nbsp; on the <strong>Tile Caching, Caching defaults</strong> menu.&nbsp; This is not set on a default install.</p>

<p><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_153.png"><img alt="image" border="0" height="106" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_124.png" style="margin: 0px; display: inline; background-image: none;" title="image" width="244" /></a></p>

<h1>Setting up disk quota</h1>

<p>This is an important setting.&nbsp; A pre-seeded cache will take up a lot of disk space and you want to make sure you have enough space set aside.&nbsp; By default the cache will go in your \geoserver\gwc folder</p>

<p>If you do not have limitless disk space its probably worth setting a quota appropriate to your infrastructure.</p>

<p><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_154.png"><img alt="image" border="0" height="219" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_125.png" style="margin: 0px; display: inline; background-image: none;" title="image" width="244" /></a></p>

<h1>Setting up caching on individual layers</h1>

<p>You must then enable caching on the layer that you want to cache using the <strong>Tile caching, Tile Layers</strong> menu.</p>

<p>Pick the layers that you want to cache and then click <strong>Configure selected layers with caching defaults</strong></p>

<p>There are a few settings we need to consider in here:</p>

<h2>Data tab</h2>

<h3>Bounding boxes</h3>

<p>If these are computed from the SRS bounds make sure they cover no more than the area you want cached. <a href="http://bboxfinder.com" title="http://bboxfinder.com">http://bboxfinder.com</a> provides an easy way do get coordinates for a custom bounding box.</p>

<h2>Publishing tab</h2>

<h3>HTTP Settings</h3>

<p>This allows you to set the headers in the response to the client browser and control how long the browser itself should cache the tile – so not needing to request even the server cached tile again.</p>

<p><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_155.png"><img alt="image" border="0" height="72" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_126.png" style="margin: 0px; display: inline; background-image: none;" title="image" width="244" /></a></p>

<h2>Tile caching tab</h2>

<h2>&nbsp;</h2>

<h3>Tile image formats</h3>

<p>Correct setting here can make massive difference to your cache size.&nbsp; If you are in control of the client you might want to restrict caching to just one file format.&nbsp; We tend to use png8 which is normally 25% of the size of png and allows transparency.</p>

<h3>Metatiling factors</h3>

<p>By default this is 4 x 4 which means when building the cache it will request a tile 4 times the size you actually want – this helps with avoiding chopped labels on the edge etc</p>

<h3>Cache expiry</h3>

<p>0 means use the server default (which is normally off I think).</p>

<p>-1 means switch off (i.e. never), any other value is the number of seconds till the cache expires</p>

<p><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_156.png"><img alt="image" border="0" height="65" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_127.png" style="margin: 0px; display: inline; background-image: none;" title="image" width="244" /></a></p>

<p>The server cache setting determines how old a cached tile can be before it needs to be regenerated from source.&nbsp; If your data is static you can leave this setting off.&nbsp; If it changes you will need to put some thought into how old its acceptable for data to appear to clients.</p>

<p>The client cache is a little less clear it seems to overlap with the HTTP settings (above) though has been reported to not always work.&nbsp; It may not be needed if you have set the HTTP header response.</p>

<h3>Zoom levels</h3>

<p>You need to decide what zoom levels are appropriate for your data and whether you want them all cached.&nbsp; Sometimes we don’t cache the most detailed layer as that significantly reduces the cache size.</p>

<p><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_157.png"><img alt="image" border="0" height="31" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_128.png" style="margin: 0px; display: inline; background-image: none;" title="image" width="244" /></a></p>

<h2>Seeding the cache</h2>

<p>By default having made all the settings above your cache will start to be built.&nbsp; Every time a WMS request is received by GWC the cache will be checked first, it it doesn’t exist in there the tile will be generated and saved in the cache for subsequent requests.&nbsp; As you can imagine the performance of your service will be variable as the cache is randomly built up over time.</p>

<p>Alternatively you can go to <a href="https://mygeoserverurl/geoserver/gwc/demo">https://<em>mygeoserverurl</em>/geoserver/gwc/demo</a> and seed the cache.</p>

<p>Select your layer and decide how many tasks you want to run, the zoom levels you want to seed and the bounding box you want to seed within.&nbsp; Then set it running.</p>

<p>Note:&nbsp; For detailed zoom levels this will take many hours / days and use potentially TB of disk space</p>

<h1>Testing your cache</h1>

<p>Hopefully you will see a noticeable performance gain when the cache is being hit, but there are a couple of checks you can do in a client browser.</p>

<p>First of all though – remember you cache will only be used if:</p>

<ul>
	<li>Your application is requesting WMS tiles</li>
	<li>The call includes &amp;TILES=True as part of the call</li>
</ul>

<p>If you open the dev tools in your browser (we are using chrome here – but firefox and IE have similar) and inspect a call you are making to geoserver</p>

<p><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_158.png"><img alt="image" border="0" height="185" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_129.png" style="display: inline; background-image: none;" title="image" width="244" /></a></p>

<p>There are several things you can see from the headers:</p>

<ul>
	<li><strong>Status code 200</strong> – this means that the call was made (as opposed to locally cached)</li>
	<li><strong>geowebcache-cache-result: HIT</strong> – this tells you that your tile was found in the cache.</li>
</ul>

<p><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_159.png"><img alt="image" border="0" height="147" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_130.png" style="margin: 0px; display: inline; background-image: none;" title="image" width="244" /></a></p>

<p>If you refresh the page you case see:</p>

<ul>
	<li><strong>Status code 304</strong> – this shows that the tile was retrieved from your local browser cache.</li>
	<li>Because it came from your local cache there is no geowebcache value.</li>
</ul>
<br /><a href='https://www.esdm.co.uk/configuring-geoserver-with-geo-web-cache-gwc'></a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/configuring-geoserver-with-geo-web-cache-gwc'>...</a>]]></description>
      <link>https://www.esdm.co.uk/configuring-geoserver-with-geo-web-cache-gwc</link>
      <author>()</author>
      <comments>https://www.esdm.co.uk/configuring-geoserver-with-geo-web-cache-gwc</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/configuring-geoserver-with-geo-web-cache-gwc</guid>
      <pubDate>Thu, 21 Feb 2019 17:46:00 GMT</pubDate>
    </item>
    <item>
      <title>GeoServer WFS fails on SQL Server tables/views with GUID data type</title>
      <description><![CDATA[<p>Just a quick note that might be useful to some.</p>

<h4>The problem...</h4>

<p>If you publish a SQL Server (in this case 2014) table or view with a GUID field using GeoServer (version&nbsp;2.10), it will fail to make&nbsp; a valid WFS because the &amp;request=DescribeFeatureType response <em>will not include these layers</em>.</p>

<p>This manifests itself in various ways depending on the client, but in QGIS on trying to load the layer into the map we get this in the "Log Messages Panel":</p>

<blockquote>
<p>Analysis of DescribeFeatureType response failed for url&nbsp; srsname='EPSG:27700' typename=xxx:yyyurl='https://mysite.com/myworkspace/wfs' version='1.0.0' table="" sql=: it is probably a schema for Complex Features</p>
</blockquote>

<p>which had me puzzled for quite some time!</p>

<h4>The solution...</h4>

<p>Changing the data source view to include this field with</p>

<p>CAST(myGUID AS varchar(36)) AS myGUID</p>

<p>then hitting "Reload feature type" in the GeoServer layer configuration screen fixes it. This changes the field data type from "UUID" to "string" in that screen. Or just omit the field entirely.</p>

<p>My guess is this will not help transactional WFS, but I have not tested this. Overall, GUIDs are still best avoided in GIS-land as they are so poorly supported by the database drivers.</p>
<br /><a href='https://www.esdm.co.uk/geoserver-wfs-fails-on-sql-server-tablesviews-with-guid-data-type'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/geoserver-wfs-fails-on-sql-server-tablesviews-with-guid-data-type'>...</a>]]></description>
      <link>https://www.esdm.co.uk/geoserver-wfs-fails-on-sql-server-tablesviews-with-guid-data-type</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/geoserver-wfs-fails-on-sql-server-tablesviews-with-guid-data-type</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/geoserver-wfs-fails-on-sql-server-tablesviews-with-guid-data-type</guid>
      <pubDate>Wed, 11 Jan 2017 22:23:00 GMT</pubDate>
    </item>
    <item>
      <title>How to change the port for GeoServer on Windows with Jetty</title>
      <description><![CDATA[<p>Faced with the task of upgrading a production GeoServer under heavy constant use, I decided to install the newer version alongside first, migrate the content, then make the switch when I was happy everything was working. I installed the new GeoServer 2.7.0 using the Windows installer, choosing port 8081 (the old version was running on port 8080), and electing to run it as a service. I cloned the data directory and pointed the new version at the new copy. Once the SQL Server extension was installed, everything appeared to be working fine – all layers working well. The only problem I could see was the the disk quota functionality was failing with visible warning messages in the GeoServer admin interface, and I guessed that this was probably because two different versions could not use the same disk quota database (this turned out to be correct).</p>

<p>The next step was to switch off the old version of GeoServer and present the new version on its address, minimising transition time. This required changing the port of the new version from 8081 to 8080, so I scoured the internet on how to do this. I found a few threads out there, but none gave me the right answer. They specifically mentioned \etc\jetty.xml and GeoServer’s startup.bat, neither of which configured the port for my installation. In fact the configuration is to be found against the Windows service:</p>

<p><img alt="GeoServer Windows service" border="0" height="427" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_143.png" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" title="GeoServer Windows service" width="644" /></p>

<p>Opening this service reveals the port specified in the command line (here showing after I had changed it):</p>

<p><img alt="GeoServer service commandline" border="0" height="465" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_144.png" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" title="GeoServer service commandline" width="414" /></p>

<p style="width:100%; white-space: pre-wrap;">Changing this command required editing the registry, with these settings found under HKEY_LOCAL_MACHINE\SYSTEM\ ControlSet001\services\GeoServer 2.7.0:</p>

<p><img alt="GeoServer service registry settings" border="0" height="272" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_145.png" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" title="GeoServer service registry settings" width="644" /></p>

<p>Edit the command-line as follows:</p>

<p><img alt="GeoServer service command" border="0" height="166" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_146.png" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" title="GeoServer service command" width="388" /></p>

<p>I also edited the previous version to start on port 8081 (in case I needed to run both), then stopped the older version’s service and restarted the new version’s service. Everything worked fine, with an imperceptible transition. And as predicted, the disk quota thing started working too.</p>

<p>So that’s how to change the port for GeoServer running on Windows with Jetty!</p>
<br /><a href='https://www.esdm.co.uk/how-to-change-the-port-for-geoserver-on-windows-with-jetty'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/how-to-change-the-port-for-geoserver-on-windows-with-jetty'>...</a>]]></description>
      <link>https://www.esdm.co.uk/how-to-change-the-port-for-geoserver-on-windows-with-jetty</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/how-to-change-the-port-for-geoserver-on-windows-with-jetty</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/how-to-change-the-port-for-geoserver-on-windows-with-jetty</guid>
      <pubDate>Sun, 19 Apr 2015 13:23:00 GMT</pubDate>
    </item>
    <item>
      <title>WMS/WFS down when a GeoServer store is disabled after Windows updates</title>
      <description><![CDATA[<p>Last night some of our servers restarted after scheduled updates, and we awoke to warning emails that some of our GIS web services were down. The affected WMS/WFS services were from <a href="http://geoserver.org/" target="_blank" title="GeoServer web site">GeoServer</a>, so we knew immediately what to look for as this has happened before… the “Store” representing the connection to the GIS data repository – in this case a PostGIS database - had switched itself off, or become disabled:</p>

<p><img alt="GeoServer store disabled after server restart" border="0" height="480" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_139.png" style="border: 0px currentColor; border-image: none; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="GeoServer store disabled after server restart" width="469" /></p>

<p>Ticking the box and saving the Store fixed the problem.</p>

<p>Our hypothesis is that if the GeoServer service is re-started when the database server is not yet available, GeoServer automatically disables the affected Stores. [I later found <a href="http://osgeo-org.1560.x6.nabble.com/PostGIS-Store-disabled-on-server-reboot-td3789469.html" target="_blank">this discussion</a> in which one of the GroServer developers confirms that "the startup code checks if the stores are available, and if not, it<br />
disables them".</p>

<p>We will try to prevent this happening again by ensuring that the GIS server is restarted well after the database servers, but we’d welcome any other ideas.</p>
<br /><a href='https://www.esdm.co.uk/wmswfs-down-when-a-geoserver-store-is-disabled-after-windows-updates'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/wmswfs-down-when-a-geoserver-store-is-disabled-after-windows-updates'>...</a>]]></description>
      <link>https://www.esdm.co.uk/wmswfs-down-when-a-geoserver-store-is-disabled-after-windows-updates</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/wmswfs-down-when-a-geoserver-store-is-disabled-after-windows-updates</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/wmswfs-down-when-a-geoserver-store-is-disabled-after-windows-updates</guid>
      <pubDate>Thu, 13 Nov 2014 09:31:00 GMT</pubDate>
    </item>
    <item>
      <title>Presenting GeoServer on port 80 on a Windows IIS Server</title>
      <description><![CDATA[<p>We run several instances of <a href="http://geoserver.org" target="_blank">GeoServer</a> on Windows servers, using the Jetty web server included in the GeoServer for Windows installer. By default this results in a service running on an address like http://123.345.67.321:8080/geoserver </p> <p>Recently we have found that some external users cannot see the mapping, and it appears something at their end is blocking requests to our address. We are not sure exactly what is being blocked, but a solution was needed. We need to run these services over port 80, and with a friendly domain name instead of an i.p. address.</p> <p>However we also run IIS web sites on the same servers, and while it is possible to reconfigure the port used for Jetty, I’m pretty sure it would not be possible to have both IIS and Jetty handling requests on the same port.</p> <p>The solution was to configure an IIS web site to route traffic through to GeoServer on its old address. I thought it worth making some notes of the procedure.</p> <ol> <li>This required installing two extensions to IIS 7.5:<br>URL Rewrite: <a href="http://www.iis.net/download/URLRewrite" target="_blank">http://www.iis.net/download/URLRewrite</a><br>Application Request Routing: <a href="http://www.iis.net/download/ApplicationRequestRouting">http://www.iis.net/download/ApplicationRequestRouting</a></li> <li>I created a new web site in IIS, on the same server as the GeoServer instance. I added a new subdomain, that I had created earlier, as a binding (host header) for the site; this will be the new external address for our GeoServer service. Let’s say it’s mygeoserver.exegesis.com or something.</li> <li>In IIS, select the site, and double-click the “URL Rewrite” icon which should be visible in the IIS section of the Features View.</li> <li>Right-click in the “Inbound rules” area, and “Add Rule(s)…”. </li> <li>Choose “Reverse Proxy” and click OK.</li> <li>Enter the address of the GeoServer instance. Using my hypothetical server above, I would enter 123.345.67.321:8080/geoserver. Click OK.&nbsp; The “geoserver” bit was not strictly necessary, but including this shortens the final addresses a bit.</li> <li>Test.&nbsp; For any original request to GeoServer, simply replace http://123.345.67.321:8080/geoserver with mygeoserver.exegesis.com (or whatever), and you should get the same response. For external users, traffic is now going over port 80, and there are no server i.p. addresses to get grumpy about.</li></ol> <p>For us, it means our clients can now see their map of fly-tipping incidents in the Valleys again:</p> <p><img title="fly tipping incidents in the Welsh Valleys" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="fly tipping incidents in the Welsh Valleys" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_48.png" width="640" height="360"></p> <p>This also has a number of other benefits that I’ve not fully thought through yet… for example, it means we can use IIS i.p. filtering to restrict access to our GeoServer mapping where needed, we can analyze IIS logs, etc.</p><br /><a href='https://www.esdm.co.uk/presenting-geoserver-on-port-80-on-a-windows-iis-server'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/presenting-geoserver-on-port-80-on-a-windows-iis-server'>...</a>]]></description>
      <link>https://www.esdm.co.uk/presenting-geoserver-on-port-80-on-a-windows-iis-server</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/presenting-geoserver-on-port-80-on-a-windows-iis-server</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/presenting-geoserver-on-port-80-on-a-windows-iis-server</guid>
      <pubDate>Tue, 25 Jun 2013 13:18:07 GMT</pubDate>
    </item>
    <item>
      <title>Invalid column name problem with GeoServer 2.3 and SQL Server views</title>
      <description><![CDATA[<p>I have been getting this error with a WMS layer based on a SQL Server 2008 view, when using a GetFeatureInfo request:</p>

<pre>
<code><span style="font: small/normal Verdana, Geneva, Arial, Helvetica, sans-serif; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;">java.lang.RuntimeException: java.io.IOException java.io.IOException null Invalid column name 'VALI, ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) AS _GT_ROW_NUMBER DFROM'.</span></code></pre>

<p>I eventually discovered that the cause is having a field name containing the string "FROM". Specifically, I had</p>

<p><font size="2">...t3</font><font color="#808080" size="2"><font color="#808080" size="2">.</font></font><font size="2">VALID_FROM </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">AS</font></font><font size="2"> VALIDFROM </font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2"> t3</font><font color="#808080" size="2"><font color="#808080" size="2">.</font></font><font size="2">VALID_TO </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">AS</font></font><font size="2"> VALIDTO</font><font color="#808080" size="2"><font color="#808080" size="2">,...</font></font></p>

<p>This suggests some pretty sloppy SQL parsing in GeoServer, and for the moment I've resolved this by changing my alias to VALID_STARTDATE.</p>
<br /><a href='https://www.esdm.co.uk/invalid-column-name-problem-with-geoserver-23-and-sql-server-views'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/invalid-column-name-problem-with-geoserver-23-and-sql-server-views'>...</a>]]></description>
      <link>https://www.esdm.co.uk/invalid-column-name-problem-with-geoserver-23-and-sql-server-views</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/invalid-column-name-problem-with-geoserver-23-and-sql-server-views</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/invalid-column-name-problem-with-geoserver-23-and-sql-server-views</guid>
      <pubDate>Thu, 13 Jun 2013 16:01:00 GMT</pubDate>
    </item>
    <item>
      <title>When GeoServer forgets about GeoWebCache</title>
      <description><![CDATA[<p>I’ve been setting up some new mapping services (WMS) in GeoServer, with GeoWebCache allowing the map tiles to be cached for performance.&nbsp; For this to work, and for the WMS to use its cache of tiles, requires …</p> <ol> <li>the WMS request should include this on the KVP URL: &amp;tiled=true</li> <li>the client should construct its tile requests so that they match the server tiles – this is not the place for elaboration, but essentially this means getting the origin and tile size correct</li> <li>the GeoServer must have “Enable direct integration with GeoServer WMS” switched on. </li></ol> <p>The setting in #3 is found under Tile Caching &gt; Caching Defaults in the main GeoServer menu. Set it once, and forget it. Or so I thought.</p> <p>How do we know if the WMS is using its cache? Insect the http requests in Fiddler (or similar) and check the headers of the responses. </p> <p>If the WMS is using its cache you will see lines in the headers like this</p> <p><font face="Courier New">geowebcache-cache-result: HIT</font></p> <p>along with various other geowebcache-… values</p> <p>If it knows it has a cache, but something is wrong with the WMS requests (item #2 above), you might see headers like this:</p> <p><font face="Courier New">geowebcache-miss-reason: request does not align to grid(s) 'OSGB27700'<br>geowebcache-cache-result: MISS</font></p> <p>And if the WMS is unaware it even has a cache of tiles at all, you will see nothing about geowebcache at all in the headers. And of course, poor WMS performance may give you a clue something is not working as you hoped. </p> <p>Well I had set everything up lovely and my cache was working well, giving super fast performance of my Ordnance Survey mapping once the initial requests had populated the cache for an area.</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="fast Ordnance Survey maps" border="0" alt="fast Ordnance Survey maps" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_36.png" width="640" height="315"></p> <p>But the very next day… performance was rubbish, and on inspecting the http headers, it turned out the WMS had forgotten about its cache.</p> <p>In the GeoServer admin interface, the “Enable direct integration with GeoServer WMS” was now set to false. Grrr – I wondered how I could stupidly have switched that off again. Ah well, switch it on again and move on. </p> <p>A few hours later… same again. This time I started suspecting colleagues, but there was no evidence, or motive, yet…</p> <p>A couple more times, and I realised it was reverting after any re-start of GeoServer. I had been restarting every now and then, to make sure changed wrapper log settings etc. stuck, but it turned out this had been un-sticking my essential cache setting.</p> <p>The solution turned out to be to edit the gwc-gs.xml file, found in the GeoServer data directory, and set this:</p> <p><font face="Courier New">&nbsp; &lt;directWMSIntegrationEnabled&gt;true&lt;/directWMSIntegrationEnabled&gt;</font></p> <p>In my data dir, there was a gwc-gs.xml.tmp file, and I can only assume GeoServer had always failed to update the main XML file for some reason, used the .tmp version for the duration of the session, then reverted to the main one upon a re-start.</p> <p>Now my cached WMS layers run nice and fast, and GeoServer doesn’t forget the setting.</p><br /><a href='https://www.esdm.co.uk/when-geoserver-forgets-about-geowebcache'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/when-geoserver-forgets-about-geowebcache'>...</a>]]></description>
      <link>https://www.esdm.co.uk/when-geoserver-forgets-about-geowebcache</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/when-geoserver-forgets-about-geowebcache</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/when-geoserver-forgets-about-geowebcache</guid>
      <pubDate>Tue, 05 Mar 2013 20:12:27 GMT</pubDate>
    </item>
    <item>
      <title>Further load testing of GeoServer and MapServer (and tilecache)</title>
      <description><![CDATA[<p>My previous load testing of GeoServer and MapServer involved requesting just one 256x256 pixel map across all the virtual user sessions. In this test, GeoServer performed stunningly well so long as no re-projection was involved, when it performed terribly. This test may not be realistic, because this is not how a real interactive map would load the server when under load from many users. Also, we might have hit a sweetspot where GeoServer always caches in memory the last map (or something).</p> <p>To run a more realistic test I spread the virtual users across 10 different map requests in different parts of the country (i.e. on different underlying map image files).</p>Each test ran for 100 seconds, starting with 10 virtual users, increasing by 10 every 10 seconds. The tilecache image was of course cached and simply being retrieved from disk. All tests were using the same web server, with files on the same drive.  <p><em>Note: the vertical scale differs in each graph to fit the observed values.</em></p> <h3>With re-projection into Spherical Mercator, 100 virtual users</h3> <table border="1" cellspacing="0" cellpadding="2" width="600"> <tbody> <tr> <td valign="top" width="150">&nbsp;</td> <td valign="top" width="150"><strong>GeoServer</strong></td> <td valign="top" width="150"><strong>MapServer</strong></td> <td valign="top" width="150"><strong>Tilecache</strong></td></tr> <tr> <td valign="top" width="150">Transactions</td> <td valign="top" width="150">1283</td> <td valign="top" width="150">770</td> <td valign="top" width="150">2301</td></tr> <tr> <td valign="top" width="150">Errors</td> <td valign="top" width="150">0</td> <td valign="top" width="150">0</td> <td valign="top" width="150">0</td></tr> <tr> <td valign="top" width="150">Average response time (seconds)</td> <td valign="top" width="150">3.5</td> <td valign="top" width="150">6.7</td> <td valign="top" width="150">2.2</td></tr> <tr> <td valign="top" width="150">95% response time (seconds)</td> <td valign="top" width="150">15.9</td> <td valign="top" width="150">23.6</td> <td valign="top" width="150">8.7</td></tr> <tr> <td valign="top" width="150">Response graph</td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_9.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_9.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_10.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_10.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_11.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_11.png" width="244" height="103"></a></td></tr> <tr> <td valign="top" width="150">Transactions per second</td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_1.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_2.png" width="244" height="103"></a></td></tr> <tr> <td valign="top" width="150">Sample image</td> <td valign="top" width="150"><img src="http://62.197.41.154:8080/geoserver/ESDM_UK_BaseMaps/wms?LAYERS=ESDM_UK_BaseMaps%3A50KRasterColour&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;SRS=EPSG%3A900913&amp;BBOX=-374235.69121719,6787608.1097078,-371789.7063125,6790054.0946125&amp;WIDTH=256&amp;HEIGHT=256"></td> <td valign="top" width="150"><img src="http://www.esdmwms.no-ip.co.uk/scripts/mapserv.exe?map=D:\Websites\UKBaseMap\map\UKBaseMap.map&amp;LAYERS=OSLicensed&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;SRS=EPSG%3A900913&amp;BBOX=-374235.69121719,6787608.1097078,-371789.7063125,6790054.0946125&amp;WIDTH=256&amp;HEIGHT=256"></td> <td valign="top" width="150">Same as MapServer (because created with MapServer)</td></tr> <tr> <td valign="top" width="150">Comments</td> <td valign="top" width="150">Horrible image, but blistering performance until 70 users, then major outage for about 20 seconds, then resumed.</td> <td valign="top" width="150">Lovely image, moderate performance; also suffered a pause in service once usage went over 60 sessions.</td> <td valign="top" width="150">Reassuring performance</td></tr></tbody></table> <p>Note: sometimes GeoServer simply fails to re-project rasters correctly:</p> <p><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_5.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="GeoServer failing to re-project OS 50K rasters" border="0" alt="GeoServer failing to re-project OS 50K rasters" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_8.png" width="244" height="215"></a></p>         <h3>Without re-projection, 100 virtual users</h3> <table border="1" cellspacing="0" cellpadding="2" width="602"> <tbody> <tr> <td valign="top" width="150">&nbsp;</td> <td valign="top" width="150"><strong>GeoServer</strong></td> <td valign="top" width="150"><strong>MapServer</strong></td> <td valign="top" width="150"><strong>Tilecache</strong></td></tr> <tr> <td valign="top" width="150">Transactions</td> <td valign="top" width="150">2476</td> <td valign="top" width="150">554</td> <td valign="top" width="150">2877</td></tr> <tr> <td valign="top" width="150">Errors</td> <td valign="top" width="150">10</td> <td valign="top" width="150">0</td> <td valign="top" width="150">2</td></tr> <tr> <td valign="top" width="150">Average response time (seconds)</td> <td valign="top" width="150">2.0</td> <td valign="top" width="150">7.1</td> <td valign="top" width="150">1.8</td></tr> <tr> <td valign="top" width="150">95% response time (seconds)</td> <td valign="top" width="150">5.6</td> <td valign="top" width="150">18.9</td> <td valign="top" width="150">5.6</td></tr> <tr> <td valign="top" width="150">Response graph</td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_12.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_12.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_13.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_13.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_14.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_14.png" width="244" height="103"></a></td></tr> <tr> <td valign="top" width="150">Transactions per second</td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_3.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_4.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_4.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_5.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_5.png" width="244" height="103"></a></td></tr> <tr> <td valign="top" width="150">Sample image</td> <td valign="top" width="150"><img src="http://62.197.41.154:8080/geoserver/ESDM_UK_BaseMaps/wms?LAYERS=ESDM_UK_BaseMaps%3A50KRasterColour&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;SRS=EPSG%3A27700&amp;BBOX=330240,524800,331520,526080&amp;WIDTH=256&amp;HEIGHT=256"></td> <td valign="top" width="150"><img src="http://www.esdmwms.no-ip.co.uk/scripts/mapserv.exe?map=D:\Websites\UKBaseMap\map\UKBaseMap.map&amp;LAYERS=OSLicensed&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;SRS=EPSG%3A27700&amp;BBOX=330240,524800,331520,526080&amp;WIDTH=256&amp;HEIGHT=256"></td> <td valign="top" width="150">Same as MapServer (because created with MapServer)</td></tr> <tr> <td valign="top" width="150">Comments</td> <td valign="top" width="150">Image quality the same as MapServer. A few errors crept in when the number of virtual sessions hit 100. Apart from this, remarkable performance.</td> <td valign="top" width="150">Stuttering performance once loading goes beyond about 30 virtual users. No errors, but slow.</td> <td valign="top" width="150">Reassuring performance, but only a whisker faster than GeoServer.<br>Interesting that the tilecache is faster in 27700 than in 900913 – I think this is simply because the images on disk are larger (presumably because rotated and re-sampled from the originals).</td></tr></tbody></table>          <p>I then ran the tests again with less extreme loading, this time only 50 virtual users ramping up over 50 seconds.</p> <h3>With re-projection into Spherical Mercator, 50 virtual users</h3> <table border="1" cellspacing="0" cellpadding="2" width="600"> <tbody> <tr> <td valign="top" width="150">&nbsp;</td> <td valign="top" width="150"><strong>GeoServer</strong></td> <td valign="top" width="150"><strong>MapServer</strong></td> <td valign="top" width="150"><strong>Tilecache</strong></td></tr> <tr> <td valign="top" width="150">Transactions</td> <td valign="top" width="150">1033</td> <td valign="top" width="150">491</td> <td valign="top" width="150">1138</td></tr> <tr> <td valign="top" width="150">Errors</td> <td valign="top" width="150">0</td> <td valign="top" width="150">0</td> <td valign="top" width="150">0</td></tr> <tr> <td valign="top" width="150">Average response time (seconds)</td> <td valign="top" width="150">1.3</td> <td valign="top" width="150">2.8</td> <td valign="top" width="150">1.1</td></tr> <tr> <td valign="top" width="150">95% response time (seconds)</td> <td valign="top" width="150">2.7</td> <td valign="top" width="150">10.7</td> <td valign="top" width="150">3.5</td></tr> <tr> <td valign="top" width="150">Response graph</td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_15.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_15.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_16.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_16.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_17.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_17.png" width="244" height="103"></a></td></tr> <tr> <td valign="top" width="150">Transactions per second</td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_6.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_6.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_7.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_7.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_8.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_8.png" width="244" height="103"></a></td></tr> <tr> <td valign="top" width="150">Comments</td> <td valign="top" width="150">Impressive performance – but we need to find a way of making the image look less horrible</td> <td valign="top" width="150">Lovely image, moderate performance.</td> <td valign="top" width="150">Reassuring performance, though some very slow responses for a few tiles, and the 95% figure is worse than GeoServer.</td></tr></tbody></table> <p>&nbsp;</p>         <h3>Without re-projection, 50 virtual users</h3> <table border="1" cellspacing="0" cellpadding="2" width="602"> <tbody> <tr> <td valign="top" width="150">&nbsp;</td> <td valign="top" width="150"><strong>GeoServer</strong></td> <td valign="top" width="150"><strong>MapServer</strong></td> <td valign="top" width="150"><strong>Tilecache</strong></td></tr> <tr> <td valign="top" width="150">Transactions</td> <td valign="top" width="150">1152</td> <td valign="top" width="150">319</td> <td valign="top" width="150">1364</td></tr> <tr> <td valign="top" width="150">Errors</td> <td valign="top" width="150">0</td> <td valign="top" width="150">0</td> <td valign="top" width="150">&nbsp;</td></tr> <tr> <td valign="top" width="150">Average response time (seconds)</td> <td valign="top" width="150">1.2</td> <td valign="top" width="150">4.3</td> <td valign="top" width="150">1.0</td></tr> <tr> <td valign="top" width="150">95% response time (seconds)</td> <td valign="top" width="150">2.2</td> <td valign="top" width="150">15.2</td> <td valign="top" width="150">2.7</td></tr> <tr> <td valign="top" width="150">Response graph</td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_18.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_18.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_19.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_19.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_20.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times" border="0" alt="All_Transactions_response_times" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_20.png" width="244" height="103"></a></td></tr> <tr> <td valign="top" width="150">Transactions per second</td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_9.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_9.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_10.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_10.png" width="244" height="103"></a></td> <td valign="top" width="150"><a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_11.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="All_Transactions_response_times_intervals" border="0" alt="All_Transactions_response_times_intervals" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_intervals_thumb_11.png" width="244" height="103"></a></td></tr> <tr> <td valign="top" width="150">Comments</td> <td valign="top" width="150">Very impressive</td> <td valign="top" width="150">Very unimpressive. I don’t really understand how MapServer can be slower when not re-projecting than when it is, but this is a consistent pattern.</td> <td valign="top" width="150">Although the average response is faster than GeoServer, there were enough slow ones to make the overall 95% figure worse. i.e. for overall reliably fast performance, GeoServer beats a tilecache in this test.</td></tr></tbody></table>             <h3>Conclusions</h3> <p>These tests were a far more realistic simulation of real-world loading than the previous single-tile test. </p> <p>MapServer wins on image quality when re-projecting, but as before this probably means we have not found the way to make GeoServer re-sample nicely. </p> <p>Also MapServer was the only service to sail through all tests without any errors. Unfortunately previous tests showed that it can fail on some OS raster tiles though, regardless of load.</p> <p>For speed, GeoServer wins by a mile in these tests. In fact it is almost as fast as a tilecache when hit with up to around 70 concurrent virtual users. After that it start throwing errors and collapsing (so presumably needs more server power than we are giving it). But this does beg the question whether we really need to build a tilecache for rasters that are being served in their native projection – perhaps a GeoServer service would be adequate where the service is not expecting much usage.</p> <p>When I have time, I’ll repeat similar tests working against various vector data sources.</p><br /><a href='https://www.esdm.co.uk/further-load-testing-of-geoserver-and-mapserver-and-tilecache'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/further-load-testing-of-geoserver-and-mapserver-and-tilecache'>...</a>]]></description>
      <link>https://www.esdm.co.uk/further-load-testing-of-geoserver-and-mapserver-and-tilecache</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/further-load-testing-of-geoserver-and-mapserver-and-tilecache</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/further-load-testing-of-geoserver-and-mapserver-and-tilecache</guid>
      <pubDate>Sun, 29 Jan 2012 15:50:33 GMT</pubDate>
    </item>
    <item>
      <title>MapServer and GeoServer (and tilecache) comparison serving Ordnance Survey raster maps</title>
      <description><![CDATA[<p>
	With two WMS running off identical data on the same server, I thought it would be interesting to compare speeds and the map output. So I lined up a map request with identical parameters to both services and ran them through Fiddler a few times (to get an idea of the response times).</p>
<h3>
	Output quality and performance</h3>
<table border="1" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="200">
				&nbsp;</td>
			<td valign="top" width="200">
				<strong>GeoServer</strong></td>
			<td valign="top" width="200">
				<strong>MapServer</strong></td>
		</tr>
		<tr>
			<td valign="top" width="200">
				Response time</td>
			<td valign="top" width="200">
				0.8 to 1.0 seconds with USE_JAI_IMAGEREAD=true<br />
				0.6 to 1.3 seconds with<br />
				USE_JAI_IMAGEREAD=false</td>
			<td valign="top" width="200">
				0.4 to 0.6 seconds</td>
		</tr>
		<tr>
			<td valign="top" width="200">
				Image size</td>
			<td valign="top" width="200">
				63,574 bytes</td>
			<td valign="top" width="200">
				78,327 bytes</td>
		</tr>
		<tr>
			<td valign="top" width="200">
				The map</td>
			<td valign="top" width="200">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/esdm_uk_basemaps-50krastercolour%5B4%5D.png"><img alt="ESDM_UK_BaseMaps-50KRasterColour[4]" border="0" height="516" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/esdm_uk_basemaps-50krastercolour%5B4%5D_thumb.png" style="border-width: 0px; margin: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="ESDM_UK_BaseMaps-50KRasterColour[4]" width="276" /></a></td>
			<td valign="top" width="200">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/mapserv%5B4%5D.png"><img alt="mapserv[4]" border="0" height="516" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/mapserv%5B4%5D_thumb.png" style="border-width: 0px; margin: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="mapserv[4]" width="276" /></a></td>
		</tr>
		<tr>
			<td valign="top" width="200">
				Quality</td>
			<td valign="top" width="200">
				Adequate, but quite fractured</td>
			<td valign="top" width="200">
				Lovely</td>
		</tr>
		<tr>
			<td valign="top" width="200">
				Comments</td>
			<td valign="top" width="200">
				A significantly slower response than MapServer, and a worse image.<br />
				I couldn’t find any difference between the different re-sampling methods, perhaps suggesting that the settings were not taking effect (I’ve seen GeoServer GUI issues like this a couple of times now, requiring diving into the XML config files). Later – yes the settings were present in the XML config, but seem to make no difference to the output.</td>
			<td valign="top" width="200">
				Faster and much nicer image.<br />
				If we turn off bilinear re-sampling, then the response time improves to around 0.3 seconds and the image deteriorates slightly as shown below (becoming similar in quality to the GeoServer map).<br />
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/mapservca53l4zs_thumb%5B3%5D.png"><img alt="mapservCA53L4ZS_thumb[3]" border="0" height="516" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/mapservca53l4zs_thumb%5B3%5D_thumb.png" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="mapservCA53L4ZS_thumb[3]" width="276" /></a></td>
		</tr>
	</tbody>
</table>
<p>
	Oh dear this is not looking good for GeoServer. But is it the whole story? Next I compared them in a more realistic scenario, as base maps in OpenLayers, trying both single tile and multi-tile modes. I configured the map to view the 1:50,000 mapping at a scale where no re-sampling could occur.</p>
<table border="1" cellpadding="2" cellspacing="0" width="671">
	<tbody>
		<tr>
			<td valign="top" width="256">
				&nbsp;</td>
			<td valign="top" width="144">
				<strong>GeoServer</strong></td>
			<td valign="top" width="269">
				<strong>MapServer</strong></td>
		</tr>
		<tr>
			<td valign="top" width="256">
				Response time multi-tile (30 tiles each 256x256 pixels)</td>
			<td valign="top" width="144">
				0.2 to 1.2 seconds, but on average a shade faster</td>
			<td valign="top" width="269">
				0.3 to 0.7 seconds</td>
		</tr>
		<tr>
			<td valign="top" width="256">
				Response time single-tile (1725 x 1173 pixels)</td>
			<td valign="top" width="144">
				4 to 6 seconds</td>
			<td valign="top" width="269">
				3 to 5 seconds</td>
		</tr>
		<tr>
			<td valign="top" width="256">
				Image size (typical 256x256 tile)</td>
			<td valign="top" width="144">
				30,447 bytes</td>
			<td valign="top" width="269">
				22,674 seconds</td>
		</tr>
		<tr>
			<td valign="top" width="256">
				Image size (1725 x 1173 pixels)</td>
			<td valign="top" width="144">
				646,681 bytes</td>
			<td valign="top" width="269">
				690,494 bytes</td>
		</tr>
		<tr>
			<td valign="top" width="256">
				The map (256x256 tile)</td>
			<td valign="top" width="144">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/geoserv_256tile.png"><img alt="geoserv_256tile" border="0" height="260" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/geoserv_256tile_thumb.png" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="geoserv_256tile" width="260" /></a></td>
			<td valign="top" width="269">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/mapserv_256tile.png"><img alt="mapserv_256tile" border="0" height="260" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/mapserv_256tile_thumb.png" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="mapserv_256tile" width="260" /></a></td>
		</tr>
		<tr>
			<td valign="top" width="256">
				Quality</td>
			<td valign="top" width="144">
				Very good</td>
			<td valign="top" width="269">
				Very good (pretty much identical)</td>
		</tr>
	</tbody>
</table>
<p>
	OK so now it is looking better for GeoServer; when there is no re-sampling it can return identical images to MapServer, though slightly larger, and performance is pretty similar and possibly quicker.</p>
<h3>
	Output quality and performance when re-projecting</h3>
<p>
	Now time to see how they cope with serving the maps into a different coordinate system, and in particular the global spherical Mercator used in Google and Bing Maps.</p>
<table border="1" cellpadding="2" cellspacing="0" width="671">
	<tbody>
		<tr>
			<td valign="top" width="256">
				&nbsp;</td>
			<td valign="top" width="144">
				<strong>GeoServer</strong></td>
			<td valign="top" width="269">
				<strong>MapServer</strong></td>
		</tr>
		<tr>
			<td valign="top" width="256">
				Response time multi-tile (30 tiles each 256x256 pixels)</td>
			<td valign="top" width="144">
				0.2 to 1.2 seconds</td>
			<td valign="top" width="269">
				0.1 to 0.5 seconds</td>
		</tr>
		<tr>
			<td valign="top" width="256">
				Response time single-tile (1725 x 1173 pixels)</td>
			<td valign="top" width="144">
				10 seconds</td>
			<td valign="top" width="269">
				6 seconds</td>
		</tr>
		<tr>
			<td valign="top" width="256">
				Image size (typical 256x256 tile)</td>
			<td valign="top" width="144">
				29,169 bytes</td>
			<td valign="top" width="269">
				37,261 seconds</td>
		</tr>
		<tr>
			<td valign="top" width="256">
				Image size (1725 x 1173 pixels)</td>
			<td valign="top" width="144">
				1,041,098 bytes</td>
			<td valign="top" width="269">
				982,050 bytes</td>
		</tr>
		<tr>
			<td valign="top" width="256">
				The map (256x256 tile)</td>
			<td valign="top" width="144">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/geoserv_900913.png"><img alt="geoserv_900913" border="0" height="260" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/geoserv_900913_thumb.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="geoserv_900913" width="260" /></a></td>
			<td valign="top" width="269">
				<p>
					<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/mapserv_900913.png"><img alt="mapserv_900913" border="0" height="260" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/mapserv_900913_thumb.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="mapserv_900913" width="260" /></a></p>
			</td>
		</tr>
		<tr>
			<td valign="top" width="256">
				Quality</td>
			<td valign="top" width="144">
				Pretty horrible</td>
			<td valign="top" width="269">
				Very good</td>
		</tr>
	</tbody>
</table>
<p>
	With default settings, GeoServer produces horrible output when re-projecting the raster maps. But this does need more investigation when I found out how to make it use different re-sampling algorithms.</p>
<h3>
	Performance under load</h3>
<p>
	Now time to see how they perform under load using multi-mechanize. I chose to compare MapServer, GeoServer and a tilecache at returning a 256x256 tile in EPSG:900913 (i.e. re-projecting on-the-fly). Each test ran for 100 seconds, starting with 10 virtual users, increasing by 10 every 10 seconds. The tilecache image was of course cached and simply being retrieved from disk. All tests were using the same web server, with files on the same drive.</p>
<p>
	<em>Note: the vertical scale differs in each graph to fit the observed values.</em></p>
<table border="1" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="150">
				&nbsp;</td>
			<td valign="top" width="150">
				<strong>GeoServer</strong></td>
			<td valign="top" width="150">
				<strong>MapServer</strong></td>
			<td valign="top" width="150">
				<strong>Tilecache</strong></td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Transactions</td>
			<td valign="top" width="150">
				381</td>
			<td valign="top" width="150">
				556</td>
			<td valign="top" width="150">
				2188</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Errors</td>
			<td valign="top" width="150">
				57</td>
			<td valign="top" width="150">
				0</td>
			<td valign="top" width="150">
				0</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Average response time</td>
			<td valign="top" width="150">
				6.1</td>
			<td valign="top" width="150">
				6.5</td>
			<td valign="top" width="150">
				2.3</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				95% response time</td>
			<td valign="top" width="150">
				26.8</td>
			<td valign="top" width="150">
				17.6</td>
			<td valign="top" width="150">
				5.1</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Response graph</td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times.png"><img alt="All_Transactions_response_times" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_response_times" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_1.png"><img alt="All_Transactions_response_times" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_1.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_response_times" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_2.png"><img alt="All_Transactions_response_times" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_2.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_response_times" width="244" /></a></td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Transactions per second</td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput.png"><img alt="All_Transactions_throughput" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_thumb.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_throughput" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_1.png"><img alt="All_Transactions_throughput" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_thumb_1.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_throughput" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_2.png"><img alt="All_Transactions_throughput" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_thumb_2.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_throughput" width="244" /></a></td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Comments</td>
			<td valign="top" width="150">
				Completely broken after about 80 seconds – had to re-start GeoServer</td>
			<td valign="top" width="150">
				No errors, but significantly disrupted performance</td>
			<td valign="top" width="150">
				Slight slow-down under high load, but very reassuring performance</td>
		</tr>
	</tbody>
</table>
<p>
	GeoServer clearly could not stand up to more than about 30 virtual users when re-projecting the maps, and ultimately the service stalled completely requiring a re-start.</p>
<p>
	I tried the tests again requesting the maps in OSGB so that the service did not involve re-projection. I also reduced the number of virtual users to 50. The results were quite surprising…</p>
<table border="1" cellpadding="2" cellspacing="0" width="602">
	<tbody>
		<tr>
			<td valign="top" width="150">
				&nbsp;</td>
			<td valign="top" width="150">
				<strong>GeoServer</strong></td>
			<td valign="top" width="150">
				<strong>MapServer</strong></td>
			<td valign="top" width="150">
				<strong>Tilecache</strong></td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Transactions</td>
			<td valign="top" width="150">
				2018</td>
			<td valign="top" width="150">
				1114</td>
			<td valign="top" width="150">
				2197</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Errors</td>
			<td valign="top" width="150">
				0</td>
			<td valign="top" width="150">
				0</td>
			<td valign="top" width="150">
				0</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Average response time</td>
			<td valign="top" width="150">
				1.3</td>
			<td valign="top" width="150">
				2.4</td>
			<td valign="top" width="150">
				1.1</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				95% response time</td>
			<td valign="top" width="150">
				2.4</td>
			<td valign="top" width="150">
				9.1</td>
			<td valign="top" width="150">
				2.5</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Response graph</td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_3.png"><img alt="All_Transactions_response_times" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_3.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_response_times" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_4.png"><img alt="All_Transactions_response_times" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_4.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_response_times" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_5.png"><img alt="All_Transactions_response_times" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_5.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_response_times" width="244" /></a></td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Transactions per second</td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_3.png"><img alt="All_Transactions_throughput" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_thumb_3.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_throughput" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_4.png"><img alt="All_Transactions_throughput" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_thumb_4.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_throughput" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_5.png"><img alt="All_Transactions_throughput" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_thumb_5.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_throughput" width="244" /></a></td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Comments</td>
			<td valign="top" width="150">
				Impeccable!</td>
			<td valign="top" width="150">
				Much better than when re-projecting, but only half as good as GeoServer.</td>
			<td valign="top" width="150">
				Only fractionally better than GeoServer</td>
		</tr>
	</tbody>
</table>
<p>
	This is a hugely impressive result for GeoServer. My guess is that it is employing server-side in-memory caching, and because all my requests were identical the responses were very fast. MapServer on the other hand has to start a CGI process of each request and presumably cannot benefit from an in-memory cache.</p>
<p>
	When re-projecting on the other hand, perhaps it does not use a cache. And because all the GeoServer operations are running as one process, it is restricted to one virtual processor on our server whereas each MapServer exe can grab one for itself. Certainly when running these tests the server was running at about 40-80% CPU with MapServer, compared to 7% with GeoServer.</p>
<p>
	I ran this test again with the number of virtual users doubled back to 100, and GeoServer came through almost unscathed, this time processing 2072 transactions though with 3 errors.</p>
<table border="1" cellpadding="2" cellspacing="0" width="602">
	<tbody>
		<tr>
			<td valign="top" width="150">
				&nbsp;</td>
			<td valign="top" width="150">
				<strong>GeoServer</strong></td>
			<td valign="top" width="150">
				<strong>MapServer</strong></td>
			<td valign="top" width="150">
				<strong>Tilecache</strong></td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Transactions</td>
			<td valign="top" width="150">
				2072</td>
			<td valign="top" width="150">
				907</td>
			<td valign="top" width="150">
				2234</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Errors</td>
			<td valign="top" width="150">
				3</td>
			<td valign="top" width="150">
				0</td>
			<td valign="top" width="150">
				0</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Average response time</td>
			<td valign="top" width="150">
				2.4</td>
			<td valign="top" width="150">
				5.9</td>
			<td valign="top" width="150">
				2.3</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				95% response time</td>
			<td valign="top" width="150">
				5.9</td>
			<td valign="top" width="150">
				25.6</td>
			<td valign="top" width="150">
				4.8</td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Response graph</td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_6.png"><img alt="All_Transactions_response_times" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_6.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_response_times" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_7.png"><img alt="All_Transactions_response_times" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_7.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_response_times" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_8.png"><img alt="All_Transactions_response_times" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_response_times_thumb_8.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_response_times" width="244" /></a></td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Transactions per second</td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_6.png"><img alt="All_Transactions_throughput" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_thumb_6.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_throughput" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_7.png"><img alt="All_Transactions_throughput" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_thumb_7.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_throughput" width="244" /></a></td>
			<td valign="top" width="150">
				<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_8.png"><img alt="All_Transactions_throughput" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/all_transactions_throughput_thumb_8.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="All_Transactions_throughput" width="244" /></a></td>
		</tr>
		<tr>
			<td valign="top" width="150">
				Comments</td>
			<td valign="top" width="150">
				Wow</td>
			<td valign="top" width="150">
				Suffering, but no errors</td>
			<td valign="top" width="150">
				The best as expected</td>
		</tr>
	</tbody>
</table>
<p>
	I suspect this test may not predict real-world behaviour with lots of users requesting different WMS maps, where I suspect GeoServer would lose its advantage, but it is interesting anyway.</p>
<p>
	NB I had GeoServer running with AllowMultithreading=true</p>
<h3>
	Summary</h3>
<p>
	If the maps need to be re-projected then use MapServer – both performance and output quality are vastly superior. In a site that is going to get any significant load it is unwise to re-project raster mapping on-the-fly anyway, and it should definitely be cached. In this case the&nbsp;WMS performance doesn’t matter so much but output quality is paramount, so MapServer it is.&nbsp; If I find a way of making GeoServer produce nice looking output I’ll come back and revise this post!</p>
<p>
	If no re-projection is required, then simple observation has the two roughly equal under light load. The maps looked almost identical, and performance was close. GeoServer had the advantage for me in that it didn’t suffer from MapServer’s tendency to choke on some requests; in practice this meant I went over my entire OSGB cache again with a GeoServer WMS as the source, to plug the gaps left by the MapServer service.</p>
<p>
	Under heavy (albeit contrived) load, the crucial factor was whether or not there was any re-projection involved. Without re-projection GeoServer produced astonishing performance, thrashing MapServer and nearly matching a tilecache. Introduce re-projection however, and GeoServer collapses to the extent that it can crash entirely – not good when it is running all your mapping services. MapServer never broke, and despite some gaps and slow responses, it managed to struggle through all tests without a single error.</p>
<p>
	So out of this experience I think we need to be using both, depending on the purpose.</p>
<p>
	Next to test performance on vector layers, including file based GIS formats and spatial databases…</p>
<br /><a href='https://www.esdm.co.uk/mapserver-and-geoserver-and-tilecache-comparison-serving-ordnance-survey-raster-maps'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/mapserver-and-geoserver-and-tilecache-comparison-serving-ordnance-survey-raster-maps'>...</a>]]></description>
      <link>https://www.esdm.co.uk/mapserver-and-geoserver-and-tilecache-comparison-serving-ordnance-survey-raster-maps</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/mapserver-and-geoserver-and-tilecache-comparison-serving-ordnance-survey-raster-maps</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/mapserver-and-geoserver-and-tilecache-comparison-serving-ordnance-survey-raster-maps</guid>
      <pubDate>Sat, 21 Jan 2012 17:53:00 GMT</pubDate>
    </item>
    <item>
      <title>Serving Ordnance Survey rasters with GeoServer and MapServer - some irks and quirks</title>
      <description><![CDATA[<p>
	I’ve been preparing a <a href="http://tilecache.org/" target="_blank" title="http://tilecache.org/">tilecache</a> of UK Ordnance Survey mapping for a couple of big projects, combining Open Data with licensed Landranger (1:50,000) and Explorer (1:25,000) mapping. The tilecache utility consumes and generates its cache from a WMS of the mapping, and fir this I’ve done most of the work using MapServer. However I’ve hit some stubborn problems with a few areas of mapping, for example this area where I have a blank strip enclosing a tile boundary. The original tiles are fine, but for some reason when render by MapServer we get this blank area.</p>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_3.png"><img alt="Blank strip in Ordnance Survey 50K WMS from MapServer" border="0" height="204" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_4.png" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Blank strip in Ordnance Survey 50K WMS from MapServer" width="244" /></a></p>
<p>
	In another couple of areas, the WMS requests to MapServer simply failed with this error sequence:</p>
<p>
	<font face="Courier New" size="1">[Sat Jan 21 09:30:02 2012].785000 msDrawRasterLayerLow(OS50KColourRaster): entering.<br />
	[Sat Jan 21 09:30:02 2012].791000 msResampleGDALToMap in effect: cellsize = 5.000000<br />
	[Sat Jan 21 09:30:02 2012].792000 msDrawGDAL(OS50KColourRaster): using RAW_WINDOW=3509 0 491 652, dst=0,0,491,652<br />
	[Sat Jan 21 09:30:02 2012].792000 msDrawGDAL(): red,green,blue,alpha bands = 1,0,0,0<br />
	[Sat Jan 21 09:30:02 2012].891000 msResampleGDALToMap in effect: cellsize = 5.000000<br />
	[Sat Jan 21 09:30:02 2012].892000 msDrawGDAL(OS50KColourRaster): using RAW_WINDOW=3509 3348 491 652, dst=0,0,491,652<br />
	[Sat Jan 21 09:30:02 2012].892000 msDrawGDAL(): red,green,blue,alpha bands = 1,0,0,0<br />
	[Sat Jan 21 09:30:02 2012].998000 msResampleGDALToMap in effect: cellsize = 5.000000<br />
	[Sat Jan 21 09:30:02 2012].998000 msDrawGDAL(OS50KColourRaster): using RAW_WINDOW=0 0 812 652, dst=0,0,812,652<br />
	[Sat Jan 21 09:30:02 2012].998000 msDrawGDAL(): red,green,blue,alpha bands = 1,0,0,0<br />
	[Sat Jan 21 09:30:03 2012].122000 msResampleGDALToMap in effect: cellsize = 5.000000<br />
	[Sat Jan 21 09:30:03 2012].122000 msDrawGDAL(OS50KColourRaster): using RAW_WINDOW=0 3348 812 652, dst=0,0,812,652<br />
	[Sat Jan 21 09:30:03 2012].122000 msDrawGDAL(): red,green,blue,alpha bands = 1,0,0,0<br />
	[Sat Jan 21 09:30:03 2012].148000 GetBlockRef failed at X block offset 0, Y block offset 499: Unable to access file. GDALDatasetRasterIO() failed: drawGDAL()<br />
	[Sat Jan 21 09:30:03 2012].149000 msDrawMap(): Image handling error. Failed to draw layer named 'OS50KColourRaster'.<br />
	[Sat Jan 21 09:30:03 2012].149000 freeLayer(): freeing layer at 024265B0.</font></p>
<p>
	again the underlying images were apparently fine.</p>
<p>
	And of course this has left gaps in the tile cache.</p>
<p>
	So, in order to overcome these issues I am setting up the WMS using GeoServer to see if that can fill the gaps.</p>
<p>
	My starting point is a folder containing the TIFF images, each with a .TFW world file.</p>
<p>
	Gotchas:</p>
<p>
	There are <a href="http://docs.geoserver.org/stable/en/user/tutorials/image_mosaic_plugin/imagemosaic.html" target="_blank" title="instructions here">instructions for setting up a raster WMS in GeoServer here</a>, but here is my summary with details of where things can go wrong:</p>
<ul>
	<li>
		Create a workspace, in my case “ESDM_UK_BaseMaps” with a namespace of “<a href="https://www.ordnancesurvey.co.uk/" title="https://www.ordnancesurvey.co.uk/">https://www.ordnancesurvey.co.uk/</a>”</li>
	<li>
		Create a store – this will equate with one type of map, in this case the Landranger 1:50,000 colour raster.</li>
	<li>
		Choose ImageMosaic as the type of store</li>
	<li>
		Select the workspace, and give the store a name, in this case “OS50K”</li>
	<li>
		For the connection parameters, enter the folder that contains the images, in my case “file:D:\MapData\OrdnanceSurvey\50KRasterColour”</li>
	<li>
		GeoServer will then automatically scan the folder and create a shapefile index for the tiles (or “granules” as they bizarrely call them). At this point I was confronted with this error message “Could not list layers for this store, an error occurred retrieving them: Unable to acquire a reader for this coverage with format: ImageMosaic”.</li>
</ul>
<p>
	This is a commonly observed error by all accounts with lots of fairly grumpy exchanges among GeoServer users and developers about how to reproduce it and what might be the causes. It seems it can be raised by a raft of different issues. So I returned to a close reading of the instructions and also found <a href="http://www.adrianwalker.org/2010/08/using-ordnance-survey-open-data-street.html" target="_blank" title="Adrian Walker’s blog">Adrian Walker’s useful blog</a> post about configuring OS maps in GeoServer.</p>
<p>
	It turns out I had two problems:</p>
<p>
	First the .TFW extension must be lower case. So in a command prompt run</p>
<p>
	<font face="Courier New" size="2">ren *.TFW *.tfw</font></p>
<p>
	(note that the image file extension does not have to be lower case)</p>
<p>
	Second, GeoServer needs a .prj file for every image (not required by MapServer).</p>
<p>
	These can be generated using a python script (thanks to Adrian Walker again for this tip):</p>
<pre class="csharpcode">
import glob
content = <span class="str">'PROJCS["OSGB 1936 / British National Grid", GEOGCS["OSGB 1936", DATUM["OSGB_1936", SPHEROID["Airy 1830",6377563.396,299.3249646, AUTHORITY["EPSG","7001"]], AUTHORITY["EPSG","6277"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.01745329251994328, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4277"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",49], PARAMETER["central_meridian",-2], PARAMETER["scale_factor",0.9996012717], PARAMETER["false_easting",400000], PARAMETER["false_northing",-100000], AUTHORITY["EPSG","27700"], AXIS["Easting",EAST], AXIS["Northing",NORTH]]'</span>
tifs = glob.glob(<span class="str">'*.tif'</span>) 
<span class="kwrd">for</span> tif <span class="kwrd">in</span> tifs:  
    prj = tif.split(<span class="str">'.'</span>)[0] + <span class="str">'.prj'</span>  
    file = open(prj,<span class="str">'w'</span>)  
    file.writelines(content)  
    file.close()</pre>
<p>
	<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }	</style>
</p>
<p>
	After resolving these issues, it was necessary to return to step 2 above to create the store, but I got the error again! OK, GeoServer had created the index shapefile already, and it was bad due to the missing prj and tfw files; unfortunately GeoServer will not overwrite this file so I had to manually delete the files (the shapefile is named after the store, and comprises seven files with various extensions).&nbsp; After that, creating the store worked fine.</p>
<p>
	Hint: if you examine the .prj file in a text editor and it looks like this, then you need to bin it and start again:</p>
<p>
	<font face="Courier New" size="2">LOCAL_CS["Generic cartesian 2D",<br />
	LOCAL_DATUM["Unknow", 0],<br />
	UNIT["m", 1.0],<br />
	AXIS["x", EAST],<br />
	AXIS["y", NORTH]]</font></p>
<p>
	So on clicking “Save” for the new store, it showed a twirly for a couple of minutes while creating the index shapefile, and then transfers you to the New Layer page, showing the new layer that can be published (it names the layer after the folder containing the images). From there it is a simple matter to complete the configuration of the layer.</p>
<p>
	Note: I think I could have configured a single store one folder higher up, and this would have included each subfolder of TIFFs as a separate layer.</p>
<h3>
	Outcome</h3>
<p>
	Once I had finally got my GeoServer WMS up and running it was time to see whether could fills the gaps in my tilecache…. and I’m very pleased to say yes it could!</p>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_4.png"><img alt="1:50K OS map from GeoServer, with no gap" border="0" height="204" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_5.png" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="1:50K OS map from GeoServer, with no gap" width="244" /></a></p>
<p>
	I’ve posted separately about performance and image quality from the two servers.</p>
<br /><a href='https://www.esdm.co.uk/ordnance-survey-raster-with-geoserver-and-mapserver-some-irks-and-quirks'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/ordnance-survey-raster-with-geoserver-and-mapserver-some-irks-and-quirks'>...</a>]]></description>
      <link>https://www.esdm.co.uk/ordnance-survey-raster-with-geoserver-and-mapserver-some-irks-and-quirks</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/ordnance-survey-raster-with-geoserver-and-mapserver-some-irks-and-quirks</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/ordnance-survey-raster-with-geoserver-and-mapserver-some-irks-and-quirks</guid>
      <pubDate>Sat, 21 Jan 2012 09:46:00 GMT</pubDate>
    </item>
  </channel>
</rss>