Plotting shapefiles

Hi!
I don't know whether it is easy to produce a plot of a shapefile (a
geographical information systems vector file format, with an attached
database) using MPL: An example would be to have the a map with the
mean temperature for every country in the month of august mapped to a
colour. The shapefile has a "dbf" database with the temperature, and
the polygons making up the country boundaries can be extracted with
GDAL/OGR.

Has anyone done anything like this? I guess that for very detailed
shapes (lots of polygons with loads of vertexes), it might be slow,
and of course, we need to get the data into Python first, but any
pointers would be very welcomed!

Cheers!
Jose

Jose Gomez-Dans wrote:

Hi!
I don't know whether it is easy to produce a plot of a shapefile (a
geographical information systems vector file format, with an attached
database) using MPL: An example would be to have the a map with the
mean temperature for every country in the month of august mapped to a
colour. The shapefile has a "dbf" database with the temperature, and
the polygons making up the country boundaries can be extracted with
GDAL/OGR.

Has anyone done anything like this? I guess that for very detailed
shapes (lots of polygons with loads of vertexes), it might be slow,
and of course, we need to get the data into Python first, but any
pointers would be very welcomed!

Cheers!
Jose
  
Jose: You can do this with the basemap toolkit (which can read simple shapefiles). See the 'fillstates.py' example in the examples directory.

-Jeff

ยทยทยท

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory