geographika

Developing geo-technologies

Archive for the ‘mapserver’ tag

MapServer+Windows 64 bit+Apache=Crash?

with one comment

I developed my MapServer application on Windows 2003 (a virtual 64 bit server running), using MS4W (MapServer for Windows), and had set up TileCache, and some Python scripts to run through Apache. I had managed to crash the set up numerous times in development, but I hadn’t come across any errors not of my own making.

The installation went well  on the production server which was also a 64 bit machine, but was using Windows Server 2008. The site had an unpublicised release as it is still in beta, and from this was getting about 60 – 70 visitors a day.

I use host-tracker.com – a web site monitoring service which lets me know if a site is down, and I was soon made aware that it was.. There were no responses at all coming from Apache, even though the Apache service was still running. Not even HTML pages were returned. Restarting Apache returned the service to normal, but this was happening every other day.

Read the rest of this entry »

Written by geographika

March 11th, 2010 at 3:38 pm

Posted in bugs,mapserver

Tagged with , , ,

Automated WMS Reports

without comments

This post details how the WMS GetCapabilities request can be used to create an automated report listing all the map layers available from a WMS server. The final sample page can be seen here.

The GetCapabilities Request

Web Mapping Services (WMS) is an open standard that all major GIS vendors implement in their server software (for example see the ESRI documentation). As a result applications built on these services are able to easily switch from one software package to another – allowing separation of code that allows for easier maintenance and reuse.

The GetCapabilities is one of three requests in the WMS specification. It “returns service-level metadata, which is a description of the service’s information content and acceptable request parameters.”

After eventually being able to see the results of a GetCapabilities request my aim was to generate a report listing the available map layers, and to check I had enetered all the required metadata. I had a look on the web to see if there were any stylesheets that would nicely format the data.

Read the rest of this entry »

Written by geographika

January 26th, 2010 at 8:11 pm

WMS GetCapabilities

with 2 comments

Yes, I’d like to see the map layers and capabilities available from my MapServer MAP file, and no I don’t want to download mapserv.exe..

Messing with Headers

I had the same problem with both Firefox and Internet Explorer 7 each time I issues a request such as:

http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/my.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

The browser tried to download mapserv.exe. The “exe” did actually contain the GetCapabilities XML, but it is very annoying to have to manually open it in another program each time.

This is a FAQ on the MapServer site which suggested that a program needs to be manually associated with the MIME type returned by the requests – application/vnd.ogc.wms_xml.

Read the rest of this entry »

Written by geographika

January 16th, 2010 at 3:38 pm

Quantum GIS and MapServer

with 2 comments

One of the main barriers I had to using MapServer as a web GIS server was that layers had to be symbolised iqgisn a text editor, using a MAPFILE. It was cumbersome to keep editing and refreshing a browser, there was no easy way to check for errors, and you have to learn the syntax and keywords.

Whilst this is ok for smaller projects where I could make these myself, larger projects require non-programmers to gather data, symbolise it, and handle the map layouts and creation.

I’ve just discovered that another of the OSGeo‘s projects, Quantum GIS (often abbreviated to QGIS) has a tool that can take a map project created and symbolised in the desktop application, and export it to a MAPFILE which can be read by MapServer. This seems to be the missing link in a complete Open Source GIS stack.

Read the rest of this entry »

Written by geographika

October 12th, 2009 at 3:02 pm