|
From: Jeff W. <js...@fa...> - 2006-04-20 19:26:17
|
Lionel Roubeyrie wrote: > Hi all, > I try to play with the Basemap module, but I'm starting with two problems: > 1- All my datas are in Lambert coordonates, and Basemap want geographic > coords. Is there a way to automatically transforms the coords? > 2- Trying to set a shapefile in the plot, I get: > ValueError: shapefile must have lat/lon vertices - it looks like this one has > vertices in map projection coordinates > Is the first question can be apply to shapefile? > Thanks > > Lionel: Regarding the last point - there is an easy-to-use utility called shpproj that can convert shp files from projection to geographic coordinates (http://shapelib.maptools.org/shapelib-tools.html). Once it is converted to geographic coordinates, you can use the Basemap to read the shapefile and plot the data. The fillstates.py and hurrtracks.py examples show how to plot data from shapefiles. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |