Basemap drawcoastlines issue

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.

2009/10/1 ringobelingo <ringobelingo@...287...>:
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

Scott Sinclair wrote:

2009/10/1 ringobelingo <ringobelingo@...287...>:
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

Hi Scott,

thanks for your response. This seems like the way to go!

Ringo

Scott Sinclair-4 wrote:

···

2009/10/1 ringobelingo <ringobelingo@...287...>:
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&reg; 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&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
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.

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 <ringobelingo@...287...>:
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&reg; 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&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
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.