擅长:python、mysql、java
<p><code>mpl_toolkits.basemap</code>可能会有所帮助。在</p>
<pre><code>from mpl_toolkits.basemap import Basemap
bm = Basemap() # default: projection='cyl'
print(bm.is_land(99.0, 13.0)) #True
print(bm.is_land(0.0, 0.0)) # False
</code></pre>
<p>文件:<a href="https://matplotlib.org/basemap/api/basemap_api.html#module-mpl_toolkits.basemap" rel="nofollow noreferrer">here</a>及以下相关方法:</p>
<blockquote>
<p><strong>is_land(xpt, ypt)</strong>
Returns True if the given x,y point (in projection coordinates) is over land, False otherwise. The definition of land is based upon the GSHHS coastline polygons associated with the class instance. Points over lakes inside land regions are not counted as land points.</p>
</blockquote>
<p><strong>注意:</strong>您可能需要小心使用Basemap对象的投影。在</p>