@@ -11,24 +11,20 @@ using matplotlib.
11
11
Basic requirements are the following:
12
12
13
13
* Python 2.6 (or higher)
14
- * matplotlib
15
- * numpy
14
+ * [ matplotlib] ( https://github.com/matplotlib/matplotlib )
15
+ * [ numpy] ( https://github.com/numpy/numpy )
16
16
* [ pyproj] ( https://github.com/pyproj4/pyproj )
17
17
* [ pyshp] ( https://github.com/GeospatialPython/pyshp )
18
- * GEOS library (Geometry Engine, Open Source) version 3.1.1 or higher.
19
- * On Linux, if your Python was installed via a package management
20
- system, make sure the corresponding ` python-dev ` package is also
21
- installed. Otherwise, you may not have the Python header (` Python.h ` ),
22
- which is required to build Python C extensions.
18
+ * [ six] ( https://github.com/benjaminp/six )
23
19
24
20
Optional requirements include:
25
21
26
22
* [ OWSLib] ( https://github.com/geopython/OWSLib ) . It is needed for the
27
- ` BaseMap .wmsimage` function.
23
+ ` Basemap .wmsimage` function.
28
24
29
- * [ Pillow] ( https://python-pillow.github.io/ ) . It is needed for Basemap
30
- warpimage, bluemarble, shadedrelief, and etopo methods. PIL should
31
- work on Python 2.x. Pillow is a maintained fork of PIL .
25
+ * [ Pillow] ( https://github.com/ python-pillow/Pillow ) . It is needed for
26
+ the methods ` Basemap. bluemarble` , ` Basemap.etopo ` ,
27
+ ` Basemap.shadedrelief ` and ` Basemap.warpimage ` .
32
28
33
29
## Installation
34
30
@@ -39,45 +35,50 @@ python -m pip install basemap-data
39
35
python -m pip install basemap-data-hires
40
36
```
41
37
42
- Precompiled binaries for GNU/Linux are also available in PyPI:
38
+ Precompiled ` basemap ` binary wheels for Windows and GNU/Linux are also
39
+ available in PyPI (architectures x86 and x64, Python 2.7 and 3.5+):
43
40
``` sh
44
41
python -m pip install basemap
45
42
```
46
43
47
44
Otherwise, you will need to install ` basemap ` from source as follows:
48
45
49
46
1 . Install pre-requisite Python modules:
50
- - ` cython ` .
51
- - ` numpy ` .
47
+ - [ cython] ( https://github.com/cython/cython ) .
48
+ - [ numpy] ( https://github.com/numpy/numpy ) .
52
49
53
50
2 . Download the ` basemap ` source code and move to the ` packages/basemap `
54
51
folder:
55
52
``` sh
56
- git clone https://github.com/matplotlib/basemap.git
53
+ git clone --depth 1 https://github.com/matplotlib/basemap.git
57
54
cd basemap/packages/basemap
58
55
```
59
56
60
- 3 . Build the GEOS library. You may use the helper provided in ` utils ` , i.e.
57
+ 3 . Build the [ GEOS] ( https://github.com/libgeos/geos ) library. You may
58
+ use the helper provided in ` utils ` , i.e.
61
59
``` sh
62
60
export GEOS_DIR=< your desired location>
63
- python -c " import utils; utils.GeosLibrary('3.6.5 ').build(installdir='${GEOS_DIR} ')"
61
+ python -c " import utils; utils.GeosLibrary('3.5.1 ').build(installdir='${GEOS_DIR} ')"
64
62
```
65
- or you can link directly to the system library if it is already installed.
66
- ` GEOS_DIR ` must point to the GEOS installation prefix; e.g. if ` libgeos_c.so `
67
- is located in ` /usr/lib ` and ` geos_c.h ` is located in ` /usr/include ` , then
68
- you must set ` GEOS_DIR ` to ` /usr ` .
63
+ or you can link directly to the system library if it is already
64
+ installed. ` GEOS_DIR ` must point to the GEOS installation prefix;
65
+ e.g. if ` libgeos_c.so ` is located in ` /usr/lib ` and ` geos_c.h ` is
66
+ located in ` /usr/include ` , then you must set ` GEOS_DIR ` to ` /usr ` .
69
67
70
- 4 . Build the basemap wheel from the ` packages/ basemap` folder and install it :
68
+ 4 . Build and install the ` basemap ` binary wheel :
71
69
``` sh
72
- python setup.py bdist_wheel
73
- python -m pip install dist/* .whl
70
+ python -m pip install .
74
71
```
72
+ On Linux, if your Python was installed through a package management
73
+ system, make sure that you have the Python header ` Python.h ` required
74
+ to build Cython extensions (e.g. on Debian-like systems, you should
75
+ have the package ` python-dev ` installed).
75
76
76
- 5 . Check that the package installed correctly by executing in the terminal :
77
+ 5 . Check that the package installed correctly by executing:
77
78
``` sh
78
79
python -c " from mpl_toolkits.basemap import Basemap"
79
80
```
80
- You can also test the ` basemap ` examples available in the ` examples ` folder.
81
+ You can also test the examples available in the ` examples ` folder.
81
82
82
83
## License
83
84
@@ -89,8 +90,8 @@ The source code and data assets are under the following licenses:
89
90
* The EPSG file and the JPG images are also under the [ MIT] license.
90
91
* ` basemap-data-hires ` : [ LGPL-3.0-or-later] .
91
92
92
- For a full description, please visit the README and LICENSE files of
93
- each package in the corresponding package folders .
93
+ For a full description, please visit the ` README ` and ` LICENSE ` files of
94
+ each package.
94
95
95
96
[ MIT] :
96
97
https://spdx.org/licenses/MIT.html
@@ -101,7 +102,7 @@ https://spdx.org/licenses/LGPL-3.0-or-later.html
101
102
102
103
## Documentation
103
104
104
- See http ://matplotlib.github.io/basemap/
105
+ See https ://matplotlib.github.io/basemap/
105
106
106
107
See scripts in ` examples ` directory for example usage.
107
108
0 commit comments