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
>
>    
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

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to