# Basemap
Plot on map projections (with coastlines and political boundaries)
using matplotlib.
## Requirements
Basic requirements are the following:
* Python 2.6 (or higher)
* [matplotlib](https://github.com/matplotlib/matplotlib)
* [numpy](https://github.com/numpy/numpy)
* [pyproj](https://github.com/pyproj4/pyproj)
* [pyshp](https://github.com/GeospatialPython/pyshp)
Optional requirements include:
* [OWSLib](https://github.com/geopython/OWSLib). It is needed for the
`Basemap.wmsimage` function.
* [Pillow](https://github.com/python-pillow/Pillow). It is needed for
the methods `Basemap.bluemarble`, `Basemap.etopo`,
`Basemap.shadedrelief` and `Basemap.warpimage`.
## Installation
The `basemap-data` and `basemap-data-hires` packages are available in
PyPI and can be installed with [`pip`](https:/pip.pypa.io/):
```sh
python -m pip install basemap-data
python -m pip install basemap-data-hires
```
Precompiled `basemap` binary wheels for Windows and GNU/Linux are also
available in PyPI (architectures x86 and x64, Python 2.7 and 3.5+):
```sh
python -m pip install basemap
```
Otherwise, you will need to install `basemap` from source as follows:
1. Install pre-requisite Python modules:
- [cython](https://github.com/cython/cython)
- [numpy](https://github.com/numpy/numpy)
2. Download the `basemap` source code and move to the `packages/basemap`
folder:
```sh
git clone --depth 1 https://github.com/matplotlib/basemap.git
cd basemap/packages/basemap
```
3. Build the [GEOS](https://github.com/libgeos/geos) library. You may
use the helper provided in `utils`, i.e.
```sh
export GEOS_DIR=<your desired location>
python -c "import utils; utils.GeosLibrary('3.5.1').build(installdir='${GEOS_DIR}')"
```
or you can link directly to the system library if it is already
installed. `GEOS_DIR` must point to the GEOS installation prefix;
e.g. if `libgeos_c.so` is located in `/usr/lib` and `geos_c.h` is
located in `/usr/include`, then you must set `GEOS_DIR` to `/usr`.
4. Build and install the `basemap` binary wheel:
```sh
python -m pip install .
```
On Linux, if your Python was installed through a package management
system, make sure that you have the Python header `Python.h` required
to build Cython extensions (e.g. on Debian-like systems, you should
have the package `python-dev` installed).
5. Check that the package installed correctly by executing:
```sh
python -c "from mpl_toolkits.basemap import Basemap"
```
You can also test the examples available in the `examples` folder.
## License
The source code and data assets are under the following licenses:
* `basemap`: [MIT].
* GEOS bundled dynamic library is under the [LGPL-2.1-only] license.
* `basemap-data`: [LGPL-3.0-or-later].
* The EPSG file and the JPG images are also under the [MIT] license.
* `basemap-data-hires`: [LGPL-3.0-or-later].
For a full description, please visit the `README` and `LICENSE` files of
each package.
[MIT]:
https://spdx.org/licenses/MIT.html
[LGPL-2.1-only]:
https://spdx.org/licenses/LGPL-2.1-only.html
[LGPL-3.0-or-later]:
https://spdx.org/licenses/LGPL-3.0-or-later.html
## Documentation
See https://matplotlib.github.io/basemap/
See scripts in `examples` directory for example usage.
Read the FAQ and/or email the matplotlib-users mailing list if you have
problems or questions.
## Contact
Ben Root <ben.v.root@gmail.com>
Víctor Molina García ([@molinav](https://github.com/molinav))
## Thanks
Special thanks to John Hunter, Andrew Straw, Eric Firing, Rob Hetland,
Scott Sinclair, Ivan Lima, Erik Andersen, Michael Hearne, Jesper Larsen,
Ryan May, David Huard, Mauro Cavalcanti, Jonas Bluethgen, Chris Murphy,
Pierre Gerard-Marchant, Christoph Gohlke, Eric Bruning, Stephane
Raynaud, Tom Loredo, Patrick Marsh, Phil Elson, and Henry Hammond for
valuable contributions.
## Known bugs
The `Basemap.fillcontinents` method doesn't always do the right thing.
Matplotlib always tries to fill the inside of a polygon. Under certain
situations, what is the inside of a coastline polygon can be ambiguous,
and the outside may be filled instead of the inside. A workaround is to
change the map projection region slightly or mask the land areas with
the `Basemap.drawlsmask` method instead of filling the coastline
polygons (this is illustrated in the `ortho_demo.py` example).
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Python 优质地理数据可视化工具 Basemap(附源码) (310个子文件)
lsmask_1.25min_f.bin 668KB
lsmask_1.25min_h.bin 643KB
lsmask_1.25min_i.bin 569KB
lsmask_1.25min_l.bin 448KB
lsmask_1.25min_c.bin 339KB
lsmask_2.5min_f.bin 242KB
lsmask_2.5min_h.bin 236KB
lsmask_2.5min_i.bin 213KB
lsmask_2.5min_l.bin 170KB
lsmask_2.5min_c.bin 126KB
lsmask_5min_f.bin 85KB
lsmask_5min_h.bin 84KB
lsmask_5min_i.bin 78KB
lsmask_5min_l.bin 65KB
lsmask_5min_c.bin 49KB
lsmask_10min_f.bin 31KB
lsmask_10min_h.bin 31KB
lsmask_10min_i.bin 29KB
lsmask_10min_l.bin 25KB
lsmask_10min_c.bin 20KB
setup.cfg 614B
setup.cfg 143B
setup.cfg 110B
COPYING 34KB
COPYING 34KB
gshhs_f.dat 80.78MB
rivers_f.dat 17.42MB
gshhs_h.dat 14.68MB
gshhsmeta_f.dat 10.53MB
gshhsmeta_h.dat 8.36MB
rivers_h.dat 4.1MB
gshhs_i.dat 3.44MB
countries_f.dat 2.97MB
states_f.dat 2.69MB
gshhsmeta_i.dat 2.15MB
rivers_i.dat 1.52MB
riversmeta_f.dat 1.06MB
riversmeta_h.dat 1.01MB
riversmeta_i.dat 1010KB
riversmeta_l.dat 985KB
riversmeta_c.dat 982KB
states_h.dat 835KB
countries_h.dat 813KB
gshhs_l.dat 702KB
rivers_l.dat 558KB
gshhsmeta_l.dat 550KB
rivers_c.dat 373KB
states_i.dat 371KB
countries_i.dat 340KB
states_l.dat 259KB
countries_l.dat 243KB
fcover.dat 192KB
states_c.dat 173KB
countries_c.dat 164KB
gshhs_c.dat 98KB
gshhsmeta_c.dat 89KB
statesmeta_f.dat 30KB
statesmeta_h.dat 28KB
statesmeta_i.dat 27KB
statesmeta_l.dat 27KB
statesmeta_c.dat 27KB
countriesmeta_f.dat 21KB
countriesmeta_h.dat 20KB
countriesmeta_i.dat 19KB
countriesmeta_l.dat 19KB
countriesmeta_c.dat 19KB
huralll020.dbf 5.29MB
UScounties.dbf 151KB
st99_d00.dbf 56KB
cities.dbf 39KB
us_25m.dem 2.98MB
epsg 887KB
LICENSE.epsg 2KB
FAQ 2KB
LICENSE.geos 26KB
.gitattributes 416B
.gitignore 476B
etopo20data.gz 1.75MB
500hgtdata.gz 25KB
etopo20lons.gz 7KB
etopo20lats.gz 4KB
500hgtlons.gz 348B
500hgtlats.gz 205B
MANIFEST.in 206B
shadedrelief.jpg 5.39MB
bmng.jpg 2.2MB
etopo1.jpg 1.28MB
earth_lights_lrg.jpg 534KB
200706041200-msg-ch01-SAfrica.jpg 277KB
land_shallow_topo_2048.jpg 233KB
COPYING.LESSER 7KB
COPYING.LESSER 7KB
LICENSE 1KB
LICENSE 1KB
matplotlibrc 14B
CHANGELOG.md 47KB
README.md 4KB
README.md 1KB
README.md 1KB
README.md 1KB
共 310 条
- 1
- 2
- 3
- 4
资源评论
deng214
- 粉丝: 89
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功