Mapping in python? Transforming shapefile so that basemap can read them?

Andrew MacIntyre andymac at
Sat Sep 12 11:39:20 CEST 2009

C Barr Leigh wrote:
> I'm trying to get started with plotting maps in python. I need to read
> "shape files" (.shp) and make maps. There seem to be many efforts but
> none is complete? I'm looking for suggestions and troubleshooting.
> The basemap package is obviously at an impressive stage and comes with
> some data:
> but it cannot read shapefiles when their coordinates are not in
> geographic projection. min are in a lambert, so the readshapefile
> fails.
> Apparently there is a utility that can convert a .shp file to lat/lon
> coordinates, but it fails for me. “You can convert the shapefile to
> geographic - coordinates using the shpproj utility from the shapelib
> tools - ("
>  For me, this gives:
> “unable to process projection, exiting...”

Someone else has already mentioned GDAL which is actually the raster
part of the GDAL/OGR duo; OGR is the vector toolset which understands
shapefiles.  There are a couple of other packages possibly worth exploring:
- Thuban   (
- GRASS    (
- Shapelib (
- FWTools  (

Shapefiles, except for the coordinate system support included in ESRI's
more recent products, are documented in a publicly accessible PDF which
googling for "ESRI shapefile" should find.

Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at  (pref) | Snail: PO Box 370
        andymac at             (alt) |        Belconnen ACT 2616
Web:               |        Australia

More information about the Python-list mailing list