From: ringobelingo <rin...@gm...> - 2009-09-30 23:00:43
|
Hi, I would like to add coastlines to a map but do not want interior 'coastlines'. At present, without them my continents are not distinct enough from the data I am plotting in the background. But, when I draw them using drawcoastlines(), I also get e.g. the great lakes showing up, and this just makes my world maps look messy and distracts from my data which should be the main focus. Does anyone know of a way to force this to happen, or is it something that might be added, i.e. splitting the function into drawcoastlines() and drawicoastlines() ... ? Many thanks. Ringo -- View this message in context: http://www.nabble.com/Basemap-drawcoastlines-issue-tp25690572p25690572.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Scott S. <sco...@gm...> - 2009-10-05 06:58:33
|
>2009/10/1 ringobelingo <rin...@gm...>: > I would like to add coastlines to a map but do not want interior > 'coastlines'. At present, without them my continents are not distinct enough > from the data I am plotting in the background. But, when I draw them using > drawcoastlines(), I also get e.g. the great lakes showing up, and this just > makes my world maps look messy and distracts from my data which should be > the main focus. Does anyone know of a way to force this to happen, or is it > something that might be added, i.e. splitting the function into > drawcoastlines() and drawicoastlines() ... ? The easiest way to address this is to obtain (or make) a GIS shapefile that has the coastlines you'd like to see. Then use the readshapefile() method on your Basemap object instead of the drawcoastlines() method. my_map = Basemap(...) my_map.readshapefile(my_shpfile_name) Cheers, Scott |
From: ringobelingo <rin...@gm...> - 2009-10-06 14:14:55
|
Hi Scott, thanks for your response. This seems like the way to go! Ringo Scott Sinclair-4 wrote: > >>2009/10/1 ringobelingo <rin...@gm...>: >> I would like to add coastlines to a map but do not want interior >> 'coastlines'. At present, without them my continents are not distinct >> enough >> from the data I am plotting in the background. But, when I draw them >> using >> drawcoastlines(), I also get e.g. the great lakes showing up, and this >> just >> makes my world maps look messy and distracts from my data which should be >> the main focus. Does anyone know of a way to force this to happen, or is >> it >> something that might be added, i.e. splitting the function into >> drawcoastlines() and drawicoastlines() ... ? > > The easiest way to address this is to obtain (or make) a GIS shapefile > that has the coastlines you'd like to see. Then use the > readshapefile() method on your Basemap object instead of the > drawcoastlines() method. > > my_map = Basemap(...) > my_map.readshapefile(my_shpfile_name) > > Cheers, > Scott > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/Basemap-drawcoastlines-issue-tp25690572p25769546.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Jeff W. <js...@fa...> - 2009-10-05 09:33:34
|
Scott Sinclair wrote: >> 2009/10/1 ringobelingo <rin...@gm...>: >> I would like to add coastlines to a map but do not want interior >> 'coastlines'. At present, without them my continents are not distinct enough >> from the data I am plotting in the background. But, when I draw them using >> drawcoastlines(), I also get e.g. the great lakes showing up, and this just >> makes my world maps look messy and distracts from my data which should be >> the main focus. Does anyone know of a way to force this to happen, or is it >> something that might be added, i.e. splitting the function into >> drawcoastlines() and drawicoastlines() ... ? >> > > The easiest way to address this is to obtain (or make) a GIS shapefile > that has the coastlines you'd like to see. Then use the > readshapefile() method on your Basemap object instead of the > drawcoastlines() method. > > my_map = Basemap(...) > my_map.readshapefile(my_shpfile_name) > > Cheers, > Scott > > You can also use the 'area_thresh' keyword to control the minimum size of coastline features that are drawn. area_thresh=1000000 makes the Great Lakes disappear, at the expense of making all the islands except Greenland disappear too. If that's unacceptable, you'll have to do as Scott suggests and create a shapfile without the lakes. -Jeff |
From: ringobelingo <rin...@gm...> - 2009-10-06 14:17:31
|
Hi Jeff, I had already tried area_thresh, but suffered from the limitation that you pointed out, namely that although the inland waterways disappear, it is at the expense of a lot of land. That's why I wondered if the function might be splittable to avoid such issues. But thanks anyway. Ringo Jeff Whitaker wrote: > > Scott Sinclair wrote: >>> 2009/10/1 ringobelingo <rin...@gm...>: >>> I would like to add coastlines to a map but do not want interior >>> 'coastlines'. At present, without them my continents are not distinct >>> enough >>> from the data I am plotting in the background. But, when I draw them >>> using >>> drawcoastlines(), I also get e.g. the great lakes showing up, and this >>> just >>> makes my world maps look messy and distracts from my data which should >>> be >>> the main focus. Does anyone know of a way to force this to happen, or is >>> it >>> something that might be added, i.e. splitting the function into >>> drawcoastlines() and drawicoastlines() ... ? >>> >> >> The easiest way to address this is to obtain (or make) a GIS shapefile >> that has the coastlines you'd like to see. Then use the >> readshapefile() method on your Basemap object instead of the >> drawcoastlines() method. >> >> my_map = Basemap(...) >> my_map.readshapefile(my_shpfile_name) >> >> Cheers, >> Scott >> >> > > You can also use the 'area_thresh' keyword to control the minimum size > of coastline features that are drawn. area_thresh=1000000 makes the > Great Lakes disappear, at the expense of making all the islands except > Greenland disappear too. If that's unacceptable, you'll have to do as > Scott suggests and create a shapfile without the lakes. > > -Jeff > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/Basemap-drawcoastlines-issue-tp25690572p25769595.html Sent from the matplotlib - users mailing list archive at Nabble.com. |