MapServer 4.8 Beta 2

Is up on the MapServer download page. Includes fixes for another bunch of bugs.

  • Dynamic allocation for ellipse symbol's style array, avoiding the static limitation on the STYLE argument values (bug 1539).

  • Fix bug in mapproject.c when splitting over the horizon lines.

  • Fix Tcl mapscript's getBytes method (bug 1533).

  • Use mapscript.i in-place when building Ruby mapscript, copying not necessary (bug 1528).

  • Expose maximum lengths of layer, class, and style arrays in mapscript (bug 1522).

  • correct msGetVersion to indicate if mapserver was build with MYGIS support.

  • Fixed hang in msProjectRect() for very small rectangles due to round off problems (bug 1526).

Colorado Consultant Convergence

Here's a little pungent, zesty, tart relish for your otherwise bland holiday blog reading. The plan to consolidate USGS mapping operations in Denver, alledgedly to facilitate the wholesale outsourcing of labor and technology, isn't going very smoothly. Luckily for Siderelis and Garie, expert fubar consultancy is coming back to the Colorado Front Range in the person of Michael Brown. Welcome home, 'Brownie'!

Now, back to Football. I haven't watched a Turkeyday game in years, but today it's the Broncos in Dallas, featuring the QB we got from James Fee's hometown team. Plummer had worn out his welcome in Tempe, no doubt, but he's playing some good ball here.

FlightAware: The Return of Tcl MapScript

It had been a long time since I've seen any sign of life from MapServer's Tcl bindings, but recently I've been corresponding with a developer of the FlightAware site about enhancements to mapscript for use with their live flight tracking application. See the page for KDEN, and click on the map in the right hand pane to see Tcl and MapServer in action. That's a great looking map; I love the nocturnal blue background with lighter blue and green vectors and annotation. You just can't do this kind of unique, old-school, presentation with the Google or Yahoo map APIs.

Also created with Tcl and mapscript are frames of this animation. I lost count of how many different holding patterns this plane was given.

Yet Another Python Projection Package

The new PCL 0.9.1 source release contains a cartography.referencing module that can be built, installed, and used independently of the rest of the library. It requires only that PROJ.4 is installed on your system, and that you have a C compiler to compile the extension module. I've been itching for something that fits in the gap between Thuban's Projection (too limited) and OGR's spatial referencing (too intricate), and this is my swipe at that itch.

Cartography.referencing uses PROJ.4's pj_transform(), and is a bit like using the cs2cs utility program. Here's a usage example from the how-to:

from cartography.referencing.srs import SpatialReference
from cartography.referencing.transform.proj4 import ProjTransform
utm13 = SpatialReference(epsg=26913)
wgs84 = SpatialReference(epsg=4326)
t = ProjTransform(utm13, wgs84)
transformed_coords = t.transform([(-105, 39), (-106, 40)])

# transformed_coords is
# [(499999.99999999889, 4316776.5830979366),
#  (414639.53815663763, 4428236.0645195534)]

There are unit tests and coverage measures:

[sean@lenny referencing]$ ./runcoverage
running coverage tests ...
Ran 15 tests in 0.068s

Name    Stmts   Exec  Cover
srs        19     18    94%
proj4       7      7   100%
TOTAL      26     25    96%

and the tests run leak-free under valgrind:

[sean@lenny referencing]$ ./rungrind
==18242== Memcheck, a memory error detector for x86-linux.
==18242== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==18242== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==18242== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==18242== For more details, rerun with: -v
Ran 15 tests in 3.586s

==18242== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1208 from 7)
==18242== malloc/free: in use at exit: 681366 bytes in 119 blocks.
==18242== malloc/free: 2822 allocs, 2703 frees, 1599734 bytes allocated.
==18242== For counts of detected errors, rerun with: -v
==18242== searching for pointers to 119 not-freed blocks.
==18242== checked 4106828 bytes.
==18242== LEAK SUMMARY:
==18242==    definitely lost: 0 bytes in 0 blocks.
==18242==    possibly lost:   0 bytes in 0 blocks.
==18242==    still reachable: 681166 bytes in 118 blocks.
==18242==         suppressed: 200 bytes in 1 blocks.
==18242== Reachable blocks (those to which a pointer was found) are not shown.
==18242== To see them, rerun with: --show-reachable=yes

The code we use in PrimaGIS and ZCO to transform between spatial and image coordinates might well be moved to cartography.referencing.transform in the future.


Re: Yet Another Python Projection Package

Author: Mateusz Łoskot

Hi, I tried to build YAPPP on my Windows box using VC+ 7.1 but I got a message saying that I have to use VC++ 6.0 because Python was build with this compiler. I have no VC++ 6.0 :-( Do you know any trick how to get around this problem? Cheers

Re: Yet Another Python Projection Package

Author: Sean Gillies

Windows binaries for Python 2.3.x, whether they are from or ActiveState, were compiled with VC6, and so must be extension modules for them. The only way around this is to re-compile Python 2.3 from source using VC7. Instead of doing that, how about giving my new binary package a try? There is an announcement about this package archived at

Monkeying with Planet Geospatial

I really dig James Fee's Planet Geospatial, just one of the many great things he's doing for the geo blogosphere. That said, in his effort to be all-inclusive he's subscribing to blogs that don't interest me, and it's likely that he's subscribing to another set of blogs that don't interest you. To customize my Planet Geospatial experience, I've written a simple Greasemonkey user script: pgscrubber.user.js.

If you're unfamiliar with Greasemonkey, I recommend It allows Mozilla and Firefox users to re-skin practically any website. A small sci-fi aside: I'm reading Vernor Vinge's Synthetic Serendipity right now, and love his extrapolation of the skin concept. Sort like Greasemonkey meets a totally immersive internet.

Pgeofilter will scrub the Planet Geospatial front page of entries from a single blog. You will need to make one edit to the code to specify that blog. Note that with a little cut and paste you could hack this script to filter several blogs. This script is aimed at the mid-November incarnation of Planet Geospatial. Any change to the site is likely to break my fragile code.

I'm using it to filter out the echoes on Planet Geospatial; the blogs which simply link to each other without providing any original content. Some of you may want to use it to filter out a particularly annoying voice from the FOSS/MapServer/Python corner of the blogosphere.

James, if you're reading this and like the idea, it would be great if you could alter your HTML to put a div around each entire entry, including the headers, and set the id to the blog's URL. And you can thank the Mozilla and Firefox projects: thanks to Greasemonkey I'll never bug you about Planet Geospatial's content or formatting again!

Update: Broken already! James, put down the <font> element, it's all about CSS these days. I'll have a fix for my script soon.

Update: James came through with the <div> I was asking for, and version 0.2 of the script is working again.

New PCL/PrimaGIS Project Infrastructure

Continuing the project work of last week, Kai and I have largely completed an overhaul of our joint projects' infrastructures. Our bugs have been moved to their luxurious new homes, repositories ported, and user list subscribers migrated to the new community list.

Here's how to get involved.

Where are we going with this site? Howard asked this question the other day, and particularly wanted to know if it might be a new home for pyTerra. We don't intend to be a home for all open source Python GIS software, only for a particular set of harmoniously interlocking components. A SciPy for GIS is what I'm aiming for. For now, is the home for the Python Cartographic Library, Cartographic Objects for Zope, PrimaGIS, and GeoAwareObjects for Plone. Joining them soon will be a replacement for the old PyOGCLib.

Update: After some discussion with Hobu, I need to clarify that I'm aiming for something more coherent than SciPy. GeoTools is probably a better example.

Inside the USGS Struggle

They like my bashing of GOS over at the Topo Employees blog, and are generous enough to overlook the part of my post where I carelessly write about turning off the utilities at a center, and where I fail to note that this really means the premature end of long careers.

I'm following the Topo Employees blog closely. Coming out of Missouri, home of the Blunt political family, these folks definitely should know corruption and cronyism when they see it.

MapServer 4.8 Beta 1 snuck out the other night.

Lots of bug fixes in the new version. The major new features are

  • Bilinear and averaging raster resampling options

  • Better transformation of vectors at the horizon for orthographic projections

  • New layer plugin architecture that allows dynamic loading of custom data drivers

For Python users, this last one implies the option of custom data sources implemented entirely in Python. I'll be working on this very soon.