Adding Streets to a Basemap

Hi,

I have a cylindrical projection that I would like to add some streets on. I only need major highways in southern Ontario, Canada. Is this functionality included in the Basemap package, or would I have to find a customized package/shape file (Openstreet?) ?

Thanks,
Aman

Aman: Basemap does not include a streets database (only coastlines, rivers, lakes and political boundaries). Shouldn't be too hard to find a shapefile that fits your needs though.

-Jeff

···

On 7/6/10 7:07 AM, Aman Thakral wrote:

Hi,

I have a cylindrical projection that I would like to add some streets on. I only need major highways in southern Ontario, Canada. Is this functionality included in the Basemap package, or would I have to find a customized package/shape file (Openstreet?) ?

Thanks,
Aman

Hi Jeff,

Thanks for your help.

The shapefile works great, but I cannot see the labels. The “DESCRIP” attribute in the shapefile has the labels, but I’m not sure how to apply them to the map.

Thanks,
Aman

···

On Tue, Jul 6, 2010 at 9:27 AM, Jeff Whitaker <jswhit@…146…> wrote:

On 7/6/10 7:07 AM, Aman Thakral wrote:

Hi,

I have a cylindrical projection that I would like to add some streets on. I only need major highways in southern Ontario, Canada. Is this functionality included in the Basemap package, or would I have to find a customized package/shape file (Openstreet?) ?

Thanks,

Aman

Aman: Basemap does not include a streets database (only coastlines, rivers, lakes and political boundaries). Shouldn’t be too hard to find a shapefile that fits your needs though.

-Jeff


Aman Thakral
B.Eng & Biosci, M.Eng Design

Hi Jeff,

  Thanks for your help.



  The shapefile works great, but I cannot see the labels.  The

“DESCRIP” attribute in the shapefile has the labels, but I’m not
sure how to apply them to the map.

  Thanks,

  Aman
Aman:  The shapefile support in Basemap is quite rudimentary (it's

an area that’s waiting for a motivated volunteer to refactor and
improve). You should have access to all the data in the shapefile,
but there is no special API for plotting them. See the fillstates.py
example for how to access the dictionary of attributes associated
with each “shape”. One you have the names, you’ll have to plot the
text using matplotlib’s text handling functions.

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

Jeffrey.S.Whitaker@…259…http://tinyurl.com/5telg