1

I've recently been tasked with making a custom written WMS server be usable with newer clients and apps such as QGis.

The original server was written years ago by a consultancy firm in C++ and who are now no longer in business.

My client, the owners of said custom server at the time it was written never got the source code for the product, and it's quite a specialist application (It connects to custom knowledge base systems throughout their systems) so a simple re-write is out the question.

The biggest issue is that at the time it was built to use a very, very early version of OpenLayers (or similar) and deliver the map imagery into a fairly simple browser based user interface.

Beacuse of the custom nature of everything, all the creators ever implemented was the "GetMap" service call, and not the "GetCapabilities" call.

Beacuse of this, apps like QGis and Esri refuse to talk to the server, and many of the tool kits I'm familiar with such as SharpMap and MapWindow won't allow me to use it as a WMS source either.

I've been looking at using MapProxy to potentially act as a go between that will provide a caps document, but get it's tiles via normal WMS calls to the custom server, but I've no experience with MapProxy so I don't know if that would solve my problem.

Right now, I'm going to have a play with "MapServer" and see if I might be able to construct a custom map file to use for pass through, failing that I'm thinking I might have to build a stand alone server that looks like a regular WMS service to the client apps, but behind the scenes provides essentially a made up on the spot caps doc and uses direct HTTP requests to get tiles to pass through.

Can MapProxy be set up to use WMS as a source, but get by without a capabilities document?

I've been reading the MapProxy docs, and there's nothing in the WMS section that addresses this question.

Update

All great answers so far, I tried the MapProxy approach, and while it worked, it was a bit heavy going on the VM it was running out of.

The proxy is being implemented as a virtual instance sat between the real server and the newer clients.

Installing Java apps on the real server as I've found out is a no/no, so anything Java has to be in a VM, which leaves me with a standard Apache2 and already installed MapServer binary on the real server, so my current approach is to actually leverage MapServer-cgi to talk to the custom service on the same box.

I did actually wonder if I could just get mapserver to deliver the imagery that the custom server was delivering, but no such look as the original developers have encoded the graphics in some weird way.

The old server was definitely a case of, if you want anything doing to this in future, your gonna have to call us to do it type of implementation :-(

I'm still testing different approaches however, so there may still be a few more updates to come.

Final Update

So I actually ended up having to go the custom MapFIle with MapServer route, it's a bit slow, but it works and it works well, at least for the time being, until we can build a completley new server to replace it.

Given that I initially asked this question

"Can MapProxy be set up to use WMS as a source, but get by without a capabilities document?"

I'm going to mark @jgrocha's answer as the answer to the question, as he answered the Q directly, and as I've tested it since, and it would have worked for me had I been allowed to use Java, then I would have most likley gone with that reply.

2
  • If you want to run OSGeo MapServer or MapCache on Apache they should both be able to cascade WMS without knowing anything about the cababilities.
    – user30184
    Commented Oct 10, 2018 at 15:46
  • That's the approach I'm currently experimenting with. Initially when I wrote this question, I hadn't quite formulated my plan of attack, nor did I have much of the information I now have.
    – shawty
    Commented Oct 10, 2018 at 16:37

3 Answers 3

2

You can use MapProxy for that. I do use MapProxy to provide proper Capabilities documents to clients (like OpenLayers or QGIS). I also use it to reproject tile services (like OpenStreetMap tile server).

Use http://yourserver/mapproxy/demo url for testing and check the Capabilities document.

Configure you MapProxy with something like:

services: demo: wms: srs: ['EPSG:900913','EPSG:3857','EPSG:4326','EPSG:3763'] image_formats: ['image/png'] md: title: MapProxy WMS Proxy abstract: Minimal MapProxy example. layers: - name: caop title: Caop DGT sources: [caop] sources: caop: type: wms wms_opts: featureinfo: true version: 1.3.0 legendgraphic: true legendurl:file://legend.png req: url: http://mapas.dgterritorio.pt/ows/caop/continente layers: Freguesias-2016 transparent: true

0
2

The easiest way I can imagine is to write a static XML file that has a valid GetCapabilities structure and access that static capabilities with any WMS client.

GetCapabilies response contains also the URL to use for GetMap requests. See for example https://demo.geo-solutions.it/geoserver/wms?service=wms&version=1.3.0&request=GetCapabilities

For example the server above adverised this as GetMap url.

<OnlineResource xlink:type="simple" xlink:href="https://demo.geo-solutions.it:443/geoserver/ows?SERVICE=WMS&"/>

Use the address of the old only-GetMap-capable server as GetMap OnlineResource and it should work right away. Any standard compliant WMS client should follow the GetMap link automatically. In real life some clients do not do that but they use the GetCapabilities address also for GetMaps. QGIS users can choose and in this case they need to leave the "Ignore GetMap/GetTile URI reported in capablities" selection unchecked, which is also the default.

enter image description here

1
  • This actually ties in better with the approach I started to take. As I mentioned in my Q, I was also experimenting with mapserver, and I've managed to get that working in a fashion too.
    – shawty
    Commented Oct 10, 2018 at 13:20
2

Standalone GeoWebCache http://geowebcache.org/docs/current/index.html does not try to read GetCapabilities. All it requires in the configuration is the GetMap url and the name of the WMS layer that should be cached

http://geowebcache.org/docs/current/configuration/layers/examples.html#minimal-configuration

It is not possible to add layers to integrated GeoWebCache that is installed with GeoServer with the graphical administration application if the server does not support GetCapabilities. It is still possible to find the XML file that contains the configuration of GeoWebCache layers file and make the edits manually.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.