imageThe MapFish print module used by both MapFish and GeoExt generates PDF maps that can be saved to clients machines. Over time you can acquire hundreds of different PDFs, but unfortunately Windows XP does not generate thumbnail previews to help find them again later.

The script below solves this problem by generating a PNG image of all the PDFs in a folder. The image to the left shows the results of the script when run on a series of UN Mission Maps.

This relies on two programs to be installed. ImageMagick – a free image conversion software package, and GhostScript another free program that can be used to access, read, and create PDF files. You may have to reboot your machine after installing these programs for the script to run successfully.

The script uses a convert utility program which comes with ImageMagick. Continue reading »

Proxy ServerDue to the same origin policy any data from a remote server cannot be (easily) added to a web application on your own server. This issue also applies to WFS (Web Feature Services) and OpenLayers. There is a Python script that can be used to get round this issue, but I preferred to have a native .NET equivalent.

On the OpenLayers Mailing List Diego Guidi pointed to an opensource .NET proxy. A proxy makes a request to a remote URL, reads the response, and then sends it to the client so it appears all data comes from the same server.

The .NET proxy is written by Paul Johnston, and can be found at http://code.google.com/p/iisproxy/. I made a few minor changes as follows:

  • increased the byte size for reading responses to resolve this issue
  • added support for PUT requests
  • temporarily removed GZIP compression due to invalid responses and a possible bug in .NET

The proxy can be used for any requests and is not limited to just OpenLayers. My source files can be found at http://bitbucket.org/geographika/openlayers/src/bfeab6a9971a/iisproxy/

I’d recommend reading the original project’s README file which goes through compilation and installation, but I’ve added my own notes below. Continue reading »

Nov 102010

image

The next post will be written by Adrià Mercader who has been working on configuring the MapFish print server to be used on IIS. This fits in perfectly with the recent Window / open source hybrid web-mapping solutions I have been working on.

Adrià is also the author of the WMS Inspector a FireFox plug-in that allows you to view and analyse WMS requests for a web-page. This was recently presented at FOSS4G in Barcelona, near Adrià’s hometown. He has recently moved to Newcastle in the UK, clearly for both better weather and football.

imageThe following is the first in a series of posts related to configuring a 64-bit Windows server as a GIS server  using MapServer and Python.

Why move to 64-bit?

If a server’s operating system and hardware are 64-bit it seems a waste not to take advantage of them. It may be better to look at the question why move to 64-bit software, as why wouldn’t you move to 64-bit software?

Its nice to be able to claim one-upmanship over commercial GIS products who are only now bringing out 64 bit versions. However having gone through the pain of setting up Open Source GIS applications on Windows I’m not surprised companies took the time to simplify the process (and wait for Microsoft to do some of the legwork) rather than dealing with all the 32/64 bit support issues too early.

Putting code under source control is on most checklists for modern software development. Even small side projects, scripts, and code snippets can benefit from being under source control. For example:

  • When you improve the code others can see the changes and get the benefits
  • If someone else improves the code those improvements can be passed back to you via an automated process

BitBucket is a hosting service for the code-source control system Mercurial. Mecurial is part of a new-wave of distributed source control systems that have the following advantages and disadvantages over regular non-distributed source control:

Continue reading »

Jun 062010

image Everyone loves aerial photography. Some of its early pioneers were the James Bonds of their era. Twenty years ago people could go round neighbourhoods in England and sell people frames photographs of their houses from the air.

Today people spend hours looking at the aerial photography layer on Google Maps wondering why so many people have outdoor swimming pools in the UK..

People also like free data. And companies like data free from the Google Terms of Service even more. The successful OpenStreetMap wiki refers to what seems to be the perfect datasource – the OpenAerialMap (OAM) project, however it starts with the rather ominous opening statement:

It was available at http://openaerialmap.org/ but…

I recently read Mark Forster’s time management book Do It Tomorrow. In summary it suggests creating a task list on a daily basis, and not doing anything other than from items in that list. Only real emergencies should be dealt with.

If emails arrive that have to be dealt with then add them to tomorrow’s list – that way you have a chance of completing your tasks for a day, and can switch off the computer feeling that you’re finished for the day.

There is also a chapter at the end of the book that says anytime invested in improving systems and processes is time gained. This fits in with the ethos of many programming books – to automate things as much as possible.

As I work on a number of different client projects I use a time tracking database to enter hours worked on a daily basis. It is fairly trivial to get a summary of hours for a month, but what I needed to provide (for invoicing) was a full list of days in a month and hours worked – whether there were values or not.

Continue reading »