basemap border coordintes

I want to write a script that can check whether a given coordinate is within
a given country

I now have:
import matplotlib.nxutils as nx
test = nx.points_inside_poly(points, country)
where country is a polygon of longitude latitude pairs and points is a
number of coordinates to be tested.

This works for manually entered coordinates but now I would like to have a
country border (see and land) as a polygon (low resolution). Is there a
simple way to extract that from the basemap data?
Tanks, Janwillem

···

--
View this message in context: http://old.nabble.com/basemap-border-coordintes-tp29503827p29503827.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Janwillem: Unfortunately, the answer is no. The country data basemap uses are lines, not polygons. You will have to find another (shapefile?) dataset that provides country polygons for the countries you are interested in.

-Jeff

···

On 8/22/10 3:14 AM, Janwillem wrote:

I want to write a script that can check whether a given coordinate is within
a given country

I now have:
import matplotlib.nxutils as nx
test = nx.points_inside_poly(points, country)
where country is a polygon of longitude latitude pairs and points is a
number of coordinates to be tested.

This works for manually entered coordinates but now I would like to have a
country border (see and land) as a polygon (low resolution). Is there a
simple way to extract that from the basemap data?
Tanks, Janwillem