Excellent! this worked out perfectly...
thank you so much for your help.

Perhaps these shapefiles should be published somewhere, since it really is useful to have.
I wasnt able to find it anywhere on the web.

anyway, problem solved; you saved my day.
thanks again,

Date: Wed, 30 Jun 2010 22:00:15 -0500
Subject: Re: [Matplotlib-users] extract country borders data & convert to shapefile

Ah, sorry I misunderstood.

You can get them by using GMT's gshhs tool (or just using pscoast with the right options) to dump out the political borders in GMT format and then convert them to a shapefile using ogr2org (or whichever tool you find easiest... Personally I use the python wrappers around ogr for more control.)

To save you a bit of trouble, I zipped political boundary shapefiles (from GSHHS version 2.0, so they'll coincide perfectly with the GSHHS coastline data) and put them here:

There's probably a way to do it using basemap, as well, but I don't know it off the top of my head.

Hope that helps,

On Wed, Jun 30, 2010 at 9:33 PM, P. R.M. <> wrote:
thanks for the response.

I already have & know how to use the GSHHS coastline data; what I need is political boundaries (country borders) data that will coincide with the GSHHS coastline data. In other words, I can't simply use any political boundaries shapefile, since the coastlines will not line up with the various resolutions of the GSHHS coastline data. I hope this makes it a little more clear...

So, I'd like to source the country border data from matplotlib/basemap's GSHHS dataset, and convert it to shapefile format.
can anyone please provide some guidance on how to achieve this?

thanks again,

Date: Wed, 30 Jun 2010 19:43:34 -0500
Subject: Re: [Matplotlib-users] extract country borders data & convert to shapefile

If you just need the GSHHS data in shapefile format, it's available on the NOAA GSHHS website.

If you prefer a direct link [96MB zip file]:

Hope that helps,

On Wed, Jun 30, 2010 at 6:34 PM, P. R.M. <> wrote:
I have a non-matplotlib related project that requires usage of GSHHS dataset shapefiles.
The regular GSHHS dataset doesnt appear to include political boundaries, however the GSHHS dataset used by matplotlib/basemap does include country/border data. I'd like to extract matplotlib/basemap GSHHS country data & convert it to shapefile format.

specifically, the following files that are included with matplotlib/basemap:

how can I convert these files to shapefile format, or where can I get shapefiles that already include this data & that are based on the GSHHS coastline data?

please help,

The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. Get busy.

This email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit --

Matplotlib-users mailing list

Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. See how.

Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. Learn more.