All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and the project adheres to Semantic Versioning since version 1.3.0.
1.4.1 - 2024-02-15
- Update workflow actions to use NodeJS 20:
- Update base actions from v3 to v4 when possible (
actions/checkout
,actions/upload-artifact
andactions/download-artifact
). - Update
jwlawson/actions-setup-cmake
from v1.13 to v2.0.
- Update base actions from v3 to v4 when possible (
- Update base image for
basemap-data
andbasemap-data-hires
GitHub workflows to use Debian 10.
- Set recursive exclusion for
.DS_Store
folders inMANIFEST.in
. - Fix broken implementation and docstrings of
Basemap.arcgisimage
method (PR #598 by @nitram96).
1.4.0 - 2024-01-09
- Support for Python 3.12 (solves issue #590).
- Complete support for
basemap
inconda-forge
channel for the major platforms on x64 and for MacOS on arm64 (solves issue #286). - Precompiled wheels for MacOS x64 and arm64 on PyPI (solves issues #447 and #574).
- Renewed documentation, with fixes for the broken links and examples, an improved section on the installation process, and without the deprecation/sunsetting section (solves issues #438, #471, #527 and #568).
- Optional argument
encoding_errors
forBasemap.readshapefile
method (PR #554 by @guziy, implements request #552). - Optional argument
cachedir
forBasemap.arcgisimage
method to allow caching of ArcGIS image downloads (PR #562 by @JoepdeJong).
- Upgrade bundled GEOS library to 3.6.5.
- Create optional library requirements files:
requirements-owslib.txt
for optional dependencyOWSLib
.- Set
OWSLib
lower limit to 0.28.1 for Python 3.6+ due to vulnerability CVE-2023-27476.
- Set
requirements-pillow.txt
for optional dependencypillow
:- Upgrade
pillow
upper limit to 10.2.0.
- Upgrade
- Update library dependencies:
- Upgrade upper limit for
numpy
to 1.27.0. - Upgrade upper limit for
matplotlib
to 3.9.0. - Downgrade upper limit for
pyproj
to 2.2.0 for Python 2.7. - Set dependency on
packaging
as replacement fordistutils
.
- Upgrade upper limit for
- Update build dependencies:
- Upgrade upper limit for
Cython
to 3.1.
- Upgrade upper limit for
- Update doc dependencies and require at least Python 3.8 for them:
- Upgrade upper limit for
sphinx
to 7.2. - Upgrade upper limit for
furo
to 2023.9.11. - Move dependency on
netCDF4
torequirements-doc.txt
. - Set dependency on
cftime
explicitly inrequirements-doc.txt
. - Set dependency on
scipy
explicitly inrequirements-doc.txt
.
- Upgrade upper limit for
- Update lint dependencies:
- Downgrade upper limit for
flake8
to 6.2. - Upgrade upper limit for
astropy
to 3.1. - Upgrade lower limit for
pylint
to 3.1.
- Downgrade upper limit for
- Update test dependencies:
- Upgrade upper limit for
pytest
to 7.5. - Upgrade upper limit for
coverage
to 7.4. - Upgrade upper limit for
pytest-cov
to 4.2.
- Upgrade upper limit for
- Reimplement
matplotlib
version checks without usingdistutils
and remove old switches related to unsupportedmatplotlib
versions. - Hide
FutureWarning
inBasemap.arcgisimage
andBasemap.wmsimage
methods due to old initialisation EPSG string used withpyproj.Proj
. - Fix
DeprecationWarning
inBasemap.imshow
andBasemap.shiftdata
methods. - Fix
DeprecationWarning
in internal function_validated_ll
. - Set MSVC 14.0 (VS2015) to build the
_geoslib
module in the precompiled Windows wheels (PR #565). - Fix
_geoslib.pyx
compilation with Cython 3.0+ using the compiler directive "legacy_implicit_noexcept" (PR #593 by @musicinmybrain). - Fix
_geoslib.pyx
syntax to comply with newer compilers such as Clang 16 and GCC 14 (PR #595 by @fweimer-rh). - Apply basic cleanup of
_geoslib.pyx
source code (i.e. basic linting, removal of commented code, version update). - Fix breaking change from
matplotlib
3.8 due to the promotion ofQuadContourSet
objects intoArtist
objects, which affectedBasemap.contour
,Basemap.contourf
andBasemap.nightshade
(solves issue #594, thanks to @qianwu2 and @rcomer).
- Use of unicode literals within the library.
- Attribute
__version__
inmpl_toolkits.basemap.proj
module. - Module
mpl_toolkits.basemap.test
, whose content is migrated to the test suite in thetest
folder. - Dependency on
dedent
function (either as alias ofinspect.cleandoc
or the deprecatedmatplotlib.cbook.dedent
) to write multi-line error messages.
1.3.9 - 2023-12-26
- Fix
GeosLibrary
wrapper to also work with CMake >= 3.27.0 and Python 2.7 on Windows by adding '/MANIFEST:NO' to override the new default '/MANIFEST:EMBED,ID=2' provided to linker. - Fix broken
Proj.__call__
when the input arguments are provided as a combined single array. - Fix flipped coastlines with pseudocylindrical projections when
lon_0
is greater than 0 deg (solves issues #443 and #463, thanks to @YilongWang). - Fix
antialiased
argument being ignored inBasemap.drawcounties
andBasemap.readshapefile
(solves issue #501, thanks to @TheFizzWare). - Fix
BaseGeometry.intersection
in_geoslib
so that it also works withGEOS_GEOMETRYCOLLECTION
objects returned byGEOSIntersection
(solves issue #566, where country boundaries are missing due to this bug, thanks to @guidocioni). - Fix bug with elliptical maps causing warped images (Blue Marble, ETOPO, Shaded Relief) to be shown behind the map background when the map boundary is not initialised manually (solves issue #577, thanks to @YilongWang).
- Fix references to removed
numpy.float
alias (solves issue #589, thanks to @quickbrett). - Fix wrong reference to
ireland.py
example in FAQ, which should behires.py
instead, and fix wrong use of locals and invalid syntax in this example (solves issue #592, thanks to @timcoote).
1.3.8 - 2023-08-18
- Upgrade
numpy
upper pin to 1.26. - Upgrade
pyproj
upper pin to 3.7. - Upgrade optional
pillow
upper pin to 10.1.0. - Upgrade documentation and linting dependencies.
- Fix Cygwin build error due to GCC passing
"--enable-new-dtags"
to the linker (PR #582 by @DWesl, solves issue #579). - Fix deprecated
Image.ANTIALIAS
withImage.LANCZOS
whenpillow
version is at least 10.0.0 (PR #580 by @cgohlke). - Downgrade upper pin for Cython requirement from 3.1 to 3.0 due to
build error triggered by
_geoslib.pyx
(solves issues #581 and #583). - Downgrade
numpy
lower pin tonumpy >= 1.21
for Python >= 3.8, whose upgrade is delayed untilbasemap
1.4.0.
1.3.7 - 2023-05-04
- Upgrade
numpy
upper pin to 1.25. - Upgrade
matplotlib
upper pin to 3.8 (solves issue #573). - Upgrade
pyproj
upper pin to 3.6. - Upgrade test dependency
netCDF4
upper pin to 1.7. - Upgrade test dependency
pillow
lower pin to 9.4 due to vulnerability CVE-2022-45198.
1.3.6 - 2022-10-31
- Support for Python 3.11 (PR #563, solves issue #561).
- Optional argument
toolset
inGeosLibrary.build
method.
- Upgrade
matplotlib
upper pin to 3.7. - Upgrade
pyproj
upper pin to 3.5.
- Set MSVC 14.0 (VS2015) to build the GEOS library bundled in the precompiled Windows wheels (PR #564).
1.3.5 - 2022-10-25
- Fix broken array slicing inside
addcyclic
(PR #559, solves issue #555, thanks to @fragkoul). - Fix
GeosLibrary
wrapper to also work with GEOS >= 3.7.0 on Windows and GNU/Linux. - Fix wrong Antarctica coastline boundary with GEOS >= 3.9.0 (PR #560, solves issue #522).
1.3.4 - 2022-08-10
- Upgrade
numpy
upper pin to 1.24. - Upgrade
pyshp
upper pin to 2.4. - Upgrade
sphinx
upper pin to 5.0 and require at least Python 3.6 to build the docs.
- Update
numpy
build dependency to ensure that builds also work on MacOS (fixes issue #547, thanks to @SongJaeIn for testing). - Fix broken implementation of
Basemap.arcgisimage
(PR #548, solves issues #481, #546 and #591). - Enforce up-to-date
numpy
dependency when possible:- Set
numpy >= 1.19
for Python == 3.6 due tonumpy
vulnerabilities CVE-2021-41495 and CVE-2021-41496. - Set
numpy >= 1.22
for Python >= 3.8 due tonumpy
vulnerability CVE-2021-34141.
- Set
- Enforce up-to-date
pillow
dependency when possible:- Set
pillow >= 9.0.1
for Python >= 3.7 due topillow
vulnerability CVE-2022-24303.
- Set
1.3.3 - 2022-05-11
- Reformat
basemap.cm
usingflake8
andblack
.
- Fix issue in
drawcoastlines
with shape of vertices array (PR #538 by @guziy, fixes issue #512). - Fix setup to identify GEOS dylib on MacOS correctly (PR #541, fixes issue #539, thanks to @ronaldbradford and @CaffreyR for testing).
1.3.2 - 2022-02-10
- Add
"/usr/lib/x86_64-linux-gnu"
to list of candidate locations to search the GEOS library during installation.
- Split lint and test requirements into two separate files.
- Fix setup encoding comment to deal with corner case under PowerShell.
- Enforce dependency
numpy >= 1.21
for Python >= 3.7 due tonumpy
vulnerability CVE-2021-33430. - Fix wrong marker for
unittest2
in development requirements. - Fix
sdist
so that packages can be built from source distributions (PR #532 by @DWesl, fixes #444 and #533). - Specify Cython language level for
_geoslib
extension explicitly. - Enforce up-to-date
pillow
dependency when possible:pillow >= 9.0.0
for Python >= 3.7 due topillow
vulnerabilities CVE-2022-22815, CVE-2022-22816 and CVE-2022-22817.pillow >= 8.3.2
for Python >= 3.6 due topillow
vulnerabilities CVE-2020-35653, CVE-2020-35654, CVE-2020-35655, CVE-2021-23437, CVE-2021-25287, CVE-2021-25288, CVE-2021-25290, CVE-2021-25291, CVE-2021-25292, CVE-2021-25293, CVE-2021-27921, CVE-2021-27922, CVE-2021-27923, CVE-2021-28675, CVE-2021-28676, CVE-2021-28677, CVE-2021-28678 and CVE-2021-34552.pillow >= 7.1.0
for Python >= 3.5 due topillow
vulnerabilities CVE-2020-10177, CVE-2020-10378, CVE-2020-10379, CVE-2020-10994 and CVE-2020-11538.pillow >= 6.2.2
For Python == 2.7 due topillow
vulnerabilities CVE-2019-16865, CVE-2019-19911, CVE-2020-5310, CVE-2020-5311, CVE-2020-5312 and CVE-2020-5313.
- Remove deprecation notices (issue #527).
1.3.1 - 2022-01-22
- Upgrade
numpy
upper pin to 1.23. - Upgrade
matplotlib
upper pin to 3.6. - Upgrade development requirements for Python 3.10.
- Move
doc
folder intopackages/basemap
.
- Fix error message when trying to load high- and full-resolution datasets
without installing the
basemap-data-hires
package.
1.3.0 - 2021-12-28
- Precompiled binary wheels available in PyPI.
- Complete workflow to build the project wheels for Windows and GNU/Linux using GitHub Actions.
-
Reorganise the package structure. In summary, the former
basemap
package is split in three:basemap
itself contains the Python modules.basemap-data
contains the mandatory data assets required bybasemap
to provide minimal functionality.basemap-data-hires
contains the high-resolution data assets.
This change together with the precompiled binary wheels in PyPI should solve most of the former installation problems (see issues #403, #405, #422, #436, #445, #456, #461, #488, #489, #491, #510, #513, #525, #526 and #535).
-
Upgrade default GEOS library dependency to 3.5.1.
-
Update and clarify licenses. In summary:
basemap
: MIT license.- 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.
- Fix
Basemap.pcolormesh
for"ortho"
projection (PR #476). - Fix
Basemap.arcgisimage
for cylindrical coordinates (PR #505). - Force
setup.py
to cythonize_geoslib.pyx
at compile time (issues #487, #518 and #521). - Update
README
files and apply corrections and changes to outdated content (issue #179).
- Bundled GEOS source code. The same source code can be downloaded using
the
GeosLibrary
class inutils
(issue #228). - Precompiled
_geoslib.c
file (issue #437).
1.2.2 - 2020-08-04
- Some incompatibilities with
matplotlib
v3.3+. - Some incompatibilities with newer
libgeos
versions (tested against v1.6.1). - Some incompatibilities with the
make.py
.
1.2.1 - 2019-08-08
- Some documentation updates.
- More compatibility bugfixes.
- Fix a bug introduced in v1.1.0 in
addcyclic
.
1.2.0 - 2018-09-26
1.1.0 - 2017-05-04
drawmapscale
supports"feet"
as an input unit (PR #289).nightshade
supports timezone-aware datetime objects as long as the timezone is UTC. Still assumes timezone-naive objects are UTC as well (issue #272).- Add
"textcolor"
kwarg todrawmeridians
anddrawparallels
(issue #145). - Add
"facecolor"
keyword argument todrawcounties
method; gives user ability to fill counties with specifiedmatplotlib
color argument.
- Update packaged data to use GSHHG v2.3.6 (PR #311 & #320).
- Convert
pyshp
andpyproj
into external dependencies (PR #234). - Don't assume grid is regular when adding cyclic point in
addcyclic
. New kwargs"axis"
and"cyclic"
added. More than one array can be handled at a time, as long as the last one is longitude (issue #139). - On non-Windows platforms, only link against libgeos C API (and not against
C++ API anymore; issue #140). This is recommended by the authors/maintainers
of GEOS. Also, this means that on e.g. Debian Linux,
basemap
can now be installed from source simply usingpip install basemap
when thelibgeos
packages are installed globally using the package management.
- Properly clip plots regardless of projection (issue #175).
- Properly perform input validation/casting (issue #260).
- Support newer versions of OWSLib (PR #259).
- Use integer indexes (PR #246).
- Stop
ResourceWarnings
for unclosed files in Python 3 (PR #244). - Fix for coastline drawing glitch (issue #123).
- Fix
drawgreatcircle
bug so that lines exiting and reentering a projection region don't draw horizontally across the map.
1.0.7 - 2013-08-17
- Make
basemap
a namespace package (issue #114). - Include
mpl_toolkits/__init__.py
, since the one installed bymatplotlib
is now inaccessible inside an egg (in 1.4.x). - Support for rotated pole transformation (
projection = "rotpole"
).
- Update
pyproj
(with fixes to geodesic calculations).
- Fix
drawmeridians
so meridians reach edge of plot when map projection region is very small (issue #113). - Fix
warpimage
with"hammer"
projection (issue #100). - Fix tolerances for detecting jumps in meridians and parallels for
"cyl"
and"rotpole"
projections (issue #108). - Update
pyproj
(with fixes to geodesic calculations). - Fix clipping to map projection region done in
contourf
andcontour
methods so it doesn't assumex
andy
are increasing (issue #110).
1.0.6 - 2013-01-13
- Add
"epsg"
keyword for defining projections. - Add
"ellps"
keyword ("rsphere"
ignored if"ellps"
given). - Add
"linestyle"
keyword to all draw* methods. - Add support for cylindrical equal area (
"cea"
) projection. - Add
drawcounties
method (PR #65). Thanks to Patrick Marsh. - Add
arcgisimage
method for displaying background image retrieved from an ArcGIS server using the REST API (requires using"epsg"
keyword to define projection). - Add
wmsimage
method for displaying background image retrieved from an OGC-compliant WMS server using OWSLib (http://pypi.python.org/OWSLib) (requires using"epsg"
keyword to define projection). - Add
"latlon"
keyword toplot
andscatter
methods (PR #64). - Add module variable
"latlon_default"
that can be used to switch default value of"latlon"
kwarg to True, so that plotting methods can be passedlats
andlons
(geographic coordinates in degrees) instead ofx
andy
(projection coordinates).
- Update
pyproj
to version 1.9.3 (remove geographiclib Python code with C code fromPROJ.4
). - Allow for latitude values slightly greater than 90 to exist in shapefiles, (by truncating to 90). Still raise exception if latitude exceeds 90.01.
- Make
drawcoastlines
use line segments instead of coastline polygons, to avoid thickening of lines around edges of map.
- Fix
drawcounties
for Python 3.3. - Fix drawing of meridians and parallels in very small map regions (issue #79).
- Fix
shiftdata
method so it shifts mask along with data (PR #68). - Fix bug that caused plotting to fail when
"latlon"
keyword is explicitly set to False (PR #66). - Fix masking of grid cells outside the map projection in
contour
andcontourf
. In these methods, all points outside the map projection region were masked. This meant that if a grid cell was partly inside and partly outside the map projection region, nothing was drawn, leaving a gap along the edge of the map. This was particularly noticeable for very coarse resolution grids. This commit only masks those points more than one grid length beyond the edge of the map projection region (issue #88).
1.0.5 - 2012-08-06
- Add
"latlon"
keyword to plotting methods. Iflatlon = True
,x
andy
values are assumed to longitudes and latitudes in degrees. The data and longitudes are shifted to the map projection region (for cylindrical and pseudo-cylindrical projections) using theshiftdata
method, and lons/lats are converted to map projection coords. Default value is False. New exampleshiftdata.py
added to illustrate usage (issue #54).
- Fix bug triggered when
drawlsmask
method was called more than once. - Fix further corner cases with splitting of parallels that cross the dateline (issue #40).
- Fix error in
contour
method that caused a bogus mask to be applied to the data (issue #58). - Fix
bluemarble
andwarpimage
methods to account for change in orientation of arrays returned tomatplotlib
functionpil_to_array
(issue #51). - Fix glitch with drawing meridians and filling coastline polygons with
"omerc"
projection that includes pole.
1.0.4 - 2012-06-13
- Fix bug that caused Europe coastlines to disappear from some maps
(evident from
nytolondon.py
example). - Fix splitting of parallels in conic projections that cross the dateline (issue 40).
1.0.3 - 2012-05-18
- Add
"alpha"
keyword tofillcontinents
(to set transparency). - Add
"k_0"
keyword for"tmerc"
projection so UTM zones can be created. Also can be used with"lcc"
,"omerc"
and"stere"
. Addutmtest.py
example. - Add
streamplot
method, along withstreamplot_demo.py
example. - Add
Basemap
attributesboundarylats
abdboundarylons
(arrays describing map boundaries; useful for illustrating map projection region on another map). Example illustrating usagemake_inset.py
added. - Add
"round"
keyword toBasemap.__init__
for pole-centered projections to make them round (clipped atboundinglat
) instead of square. - Add
hexbin
method, along withhexbin_demo.py
example. - Add
"kav7"
(Kavrayskiy VII) and"eck4"
(Eckert IV) projections (PR #9).
- Update GEOS from 3.3.1 to 3.3.3.
- Upgrade PROJ.4 source to version 4.8.0 and
pyproj
to version 1.9.2. Newpyproj
source from pyproj.googlecode.com includes more robust and accurate pure Python code for geodesic computations fromgeographiclib
. - Update coastlines, rivers, political boundaries to GSHHS 2.2.0/GMT 4.5.7.
The
fillcontinents
bug (filling the outside instead of the inside of a coastline polygon) is now much harder to trigger. - Make
drawmapboundary
use axes"bgcolor"
as default"fill_color"
. If no color fill is wanted, set"fill_color"
to'none'
(a string).
- Fix some more Python 3 compatibility issues (all examples now work with Python 3.2).
- Fix broken daynight terminator function.
- Bug in
drawparallels
that results inKeyError
when drawing parallels very close together (0.1 degrees). - Bugs in celestial projections and non-standard sphere radii (PR #6).
- Fix constant in Robinson projection (update
PJ_robin.c
from PROJ.4 SVN). - Fix typo in
setup.py
(replace"!= ['sdist','clean']"
with"not in ['sdist','clean']"
). - Clip coastlines for
"nplaea"
,"npaeqd"
,"splaea"
,"spaeqd"
in stereographic coordinates to avoid South America disappearing in some south polar plots. - Make sure
drawmeridians
can handle wrap-around (so that if projection is defined in -180 to 0 and user asks for meridians from 180 to 360 to be drawn, it should work). Only affects projections"mill"
,"gall"
,"merc"
and"cyl"
.
- Update included GEOS from 3.2.0 to 3.3.1 so it compiles with GCC 4.6.
- Add
colorbar
method that usesaxes_grid
toolkit to create colorbar axes. - Replace
hasattr(arr,'mask')
withnumpy.ma.isMA(arr)
. - Update docs and move to
matplotlib.github.com/basemap
. - Add optional 1.25, 2.5 and 10 minute land/sea masks (derived from GSHHS
coastline data).
"resolution"
and"grid"
kwargs added todrawlsmask
and maskoceans."resolution"
can be"c"
,"l"
,"i"
,"h"
or"f"
,"grid"
can be 1.25, 2.5, 5 or 10. - Update
shapefile.py
from pyshp.googlecode.com to r72. - Change default land-sea mask (now derived directly from GSHHS coastline data,
default is 5 minutes use coastline resolution
"l"
). Default for plotting lakes is now True. - Add
etopo
method (similar tobluemarble
, but plots etopo relief image from www.ngdc.noaa.gov/mgg/global as a map background). - Add
shadedrelief
method (similar tobluemarble
, but plots shaded relief image from naturalearthdata.com as a map background). - Replace
pyshapelib
with pure-Pythonshapelib.py
from pyshp.googlecode.com. Allows full Python 3 compatibility. - Fix
doc/conf.py
to use inheritance_diagram from Sphinx, notmatplotlib
. - Fix
drawlsmask
so cylindrical projections work correctly when longitude range outside of -180 to 180. - Python 3 compatibility.
- Add
lic_demo.py
to examples (line integral convolution, requiresscikit.vectorplot
). - Remove deprecated
NetCDFFile
. - Add
"zorder"
keyword todrawmapscale
. - Change default value for
"lakes"
kwarg indrawlsmask
from False to True (API change). - Change default value for
"inlands"
kwarg inmaskoceans
from False to True (API change).
- Regenerate C source with Cython 0.14.1.
- Add new
allsky
example from Tom Loredo. - Add
"celestial"
keyword: if True, astronomical convention for longitude is used (negative for 'east', positive for 'west');celestial=True
impliesresolution=None
(no continents or coastlines). - Improve placement of labels for parallels for pseudo-cylindrical projections like Mollweide and Hammer.
- Add support for Hammer projection (required adding inverse projection to
PROJ.4 src in
src/PJ_hammer.c
). - Update
src/pj_mutex.c
from PROJ.4 svn to fix a threading bug on Windows. - If you try to transform NaNs to/from map projection coords, 1.e30 is returned (previously, this caused a segfault for some projections).
- Deprecate
NetCDFFile
function, will be removed in 1.0.2. Issue warning advising users to usenetcdf4-python
instead. - Deleting an item from the dicts returned by
drawparallels
anddrawmeridians
removes the corresponding parallel or meridian (and associated labels) from the plot. - Add a
remove
method to the tuples that are returned in the dicts returned bydrawparallels
anddrawmeridians
.
- Don't force
adjustable="box"
soBasemap
is compatible withAxesGrid
. Addfcstmaps_axesgrid.py
example. - Add support for plotting on unstructured grids using keyword
"tri"
inpcolor
,contour
, andcontourf
methods (which then forward totripcolor
,tricontour
, andtricontourf
axes methods).examples/ploticos.py
added. - Let continents that fill the whole map be filled.
- Add option for cubic spline interpolation in
interp
function (order=3) usingscipy.ndimage
. - Add "near-sided perspective" projection for a satellite view at an arbitrary altitude.
- Patch from Stephane Raynaud to pass format string to
drawmapscale
, and allowunits="m"
. - Update PROJ.4 source to version 4.7.0,
pyproj
to 1.8.6. - Add
is_land
method to check whether a point is over land or water. - GEOS-3.1.1 now required. 3.2.0 source included (instead of 2.2.3).
shiftgrid
no longer requires a cyclic point to be present (patch from Eric Bruning).- Fix
date2index
bugs. - Update
date2index
function with a bugfix fromnetcdf4-python
. - In
contourf
method, mask data outside map projection region (this preventscontourf
from erroneously filling entire map). - Add
nightshade
method to shade night regions on a map.daynight.py
example added to illustrate usage. - Add
lonmin
andlonmax
instance variables.
- Replace
ax.frame
withax.spines
to maintain compatibility withmatplotlib
spines support. - Add
"latmax"
kwarg todrawparallels
anddrawmeridians
(patch from Chris Murphy). - Add new example
plotmap_shaded.py
(shaded relief plot). - Add new example
plothighsandlows.py
. - Add
"fix_aspect"
kwarg toBasemap.__init__
, when Falseaxes.set_aspect
is set to"auto"
instead of default"equal"
. Can be used to make plot fill whole plot region, even if the plot region doesn't match the aspect ratio of the map region. - Add
date2index
function. - Update
netcdftime
to 0.7.1. - Add
maskoceans
function. - Update
pupynere
to version 1.0.8 (supports writing large files). - Add more informative error message in
readshapefile
when one of the shapefile components can't be found.
- If upper-right/lower-left corners nor width/height given for azimuthal
equidistant (
"aeqd"
), the whole world is drawn in a circle (only works for perfect spheres, not ellipsoids). - Make
setup.py
check for already installedpyshapelib
(just like it does forhttplib2
andpydap
). Basemap
will now look for its data inBASEMAPDATA
. If that environment variable is not set, it will fall back to its default location.- If
readshapefile
is called withdrawbounds=True
, aLineCollection
object is appended to the returned tuple. - Make sure
drawmapscale
method returns a list of objects that can be iterated over to remove them from the plot. fillcontinents
was returning just lastPolygon
instance. Now returns a list of allPolygon
instances.- Pass
bluemarble
/warpimage
kwargs toimshow
and returnImage
instance.
- Fix
drawlsmask
method so that it works for cylindrical projections with limits outside (-180, 180). - Add
"scale"
keyword tobluemarble
andwarpimage
methods to downsample image background. - Make
"lat_ts"
default to 0 for Mercator. - Now can specify just
lon_0
for all cylindrical projections (to produce global map centered onlon_0
). - Add
save_background.py
example, showing how to re-use a map background without redrawing coastlines. - Add
embedding_map_in_wx.py
example (courtesy of Mauro Cavalcanti). - Add masked array support to
shiftgrid
function (thanks to Jesper Larsen). - Defer import of netcdf stuff till it is needed (in
NetCDFFile
function). - Add McBryde-Thomas Flat Polar Quartic (
projection = "mbtfpq"
), Gall Stereographic Cylindrical (projection = "gall"
) and van der Grinten (projection = "vandg"
). - Fix bugs in
warpimage
andbluemarble
methods for several projections. - Bugfix patch for
rotate_vector
from David Huard. David also contributed the beginnings of a test suite. - Make sure scatter method sets pyplot color mappable.
- Add
cubed_sphere
example. - Update
NetCDFFile
to usepupynere
1.0.2 (now can write as well as read!). - Now works with GEOS version 3.
- Add
Basemap
instance variableproj4string
. testgdal.py
example now uses gdal to read topo data from a raster DEM file and ogr to read state boundaries from a shape file.warpimage
method can now handle gray-scale images, and images specifed as URLs (for example, the Blue Marble images from http://earthobservatory.nasa.gov/Newsroom/BlueMarble/BlueMarble_monthlies.html).
- GEOS-2.2.3 patched for compatibility with GCC 4.3.
- Add
barbs
method to draw wind barbs on the map. - Add
tissot
method for generating Tissot's indicatrix (see exampleplot_tissot.py
). - Fix processing of coastlines for gnomonic projection.
- Don't try to use PyNIO in
NetCDFFile
(it was causing too many suprises). - Start of improved documentation using Sphinx/docutils. Can be viewed at http://matplotlib.sf.net/basemap/doc/html
- Change default behaviour of
num2date
anddate2num
to be the same asmatplotlib
counterparts.
- Fix to
warpimage
method for API change inmatplotlib
0.98.0. - Update
pyproj
to 1.8.6. - Fix bug in
NetCDFFile
creating masked arrays when both_FillValue
andmissing_value
exist. drawparallels
anddrawmeridians
return a dictionary containing theLine2D
andText
instances associated with each lat or lon.drawcoastlines
,drawcountries
and friends now havePatchCollection
return values.- Make sure
_nolabel_
set on coastlines, countries, states, rivers, parallels and meridians so they are not included in a legend. - Add
drawmapscale
method to create a map scale bar similar to that available with the GMT's psbasemap. - Now lives in
mpl_toolkits.basemap
(API change). Instead offrom matplotlib.toolkits.basemap import Basemap
, usefrom mpl_toolkits.basemap import Basemap
. All examples changed. Usesmatplotlib mpl_toolkits
namespace package, sobasemap
can now be installed ifmatplotlib
is installed as an egg. Python 2.3 support re-enabled. - Change
_geos
to_geoslib
, so as not to conflict with the Python module bundled with the GEOS library. - Some fixes/enhancements for
"omerc"
projection (added"no_rot"
flag). - Add
warpimage
method for displaying an image background. Default is NASA's blue marble image, which is included.
- Require Python 2.4 (really only needed for building). Once namespace packages are re-enabled in matplotlib, Python 2.3 should work again.
- Updated PROJ.4 sources to version 4.6.0.
- Remove hidden dependency on
setuptools
(indap
module). - Fix exception handling bug in code that looks for intersection between boundary feature and map projection region.
setup.py
now looks for GEOS library in a few standard places (/usr/local, /opt, $HOME, /sw) if theGEOS_DIR
environment variable is not set. This is a workaround for a new Leopard 'feature' (sudo does not inherit enviroment variables).- Add support for reading
Point
andMultiPoint
shapes from ESRI shapefiles. - Now automatically draws figure if running in interactive mode (so
draw()
does not need to be called explicitly in IPython). - Add
num2date
anddate2num
functions, which use includednetcdftime
module.
- Fixes for filling continents in orthographic projection.
- Add
"maskandscale"
kwarg toNetCDFFile
to optionally turn off automatic masking and rescaling of variable data. NetCDFFile
will try to use PyNIO if installed and the file cannot be read withpupynere
. This allows GRIB1, GRIB2, HDF4 and HDFEOS2 files to be read."fmt"
kwarg todrawparallels
anddrawmeridians
can now be a custom string formatting function (examplecustomticks.py
demonstrates usage).- Remove
"linestyle"
kwarg fromdrawparallels
anddrawmeridians
(it never did anything anyway since it was overridden by the"dashes"
kwarg). - Modify
NetCDFFile
to usedap
module to read remote datasets over http. Includedap
andhttplib2
modules. - Modify
NetCDFFile
to automatically apply"scale_factor"
and"add_offset"
, and return masked arrays masked wheredata == missing_value
ordata == _FillValue
. - Add
"fill_color"
option todrawmapboundary
, to optionally fill the map projection background a certain color. - Add
"sstanom"
colormap from http://www.ghrsst-pp.org/GHRSST-PP-Data-Tools.html
- Fix bug in
drawlsmask
for"moll"
,"robin"
and"sinu"
projections. - Add
"lake_color"
keyword tofillcontinents
. - Fix a bug in the
"tmerc"
projection. - Add pure-Python
NetCDFFile
reader from Roberto De Almeida tobasemap
namespace (frommatplotlib.toolkits.basemap import NetCDFFile
). - Add support for full-resolution boundaries (will be a separate download). Full-res files (totaling around 100 MB) available in SVN.
- High-resolution boundaries now included.
- Postpone processing of countries, states and river boundaries until a draw is
requested. Only the coastlines are processed in
__init__
. - Use a Cython interface to the GEOS library (http://geos.refractions.net, LGPL-2.1 license) to find geometries that are within map projection region. This speeds up instance creation for small map regions and high resolution coastlines. Boundary datasets now in binary format (I/O is faster). Requires GEOS version 2.2.3, source code included.
- Remove all numerix imports.
- Fix
rotate_vector
so it works in S. Hem and for non-orthogonal grids. Support for masked velocity vectors also added. (EF) - Numpification. (EF)
- Fix
addcyclic
function so it handles masked arrays. - Labelling of meridians and parallels now works with very small map regions (less than 0.2 degrees square).
- Subregions of the globe may be specified with
llcrnrlat, llcrnrlon, urcrnrlat, urcrnrlon
keywords for"ortho"
and"geos"
(illustrated byexamples/geos_demo_2.py
). - Add
"labelstyle"
keyword todrawparallels
anddrawmeridians
. If set to"+/-"
, labels are given prefixed by"+"
or"-"
, instead of suffixed with"N"
,"S"
,"E"
or"W"
. Useful for astronomical plots, where there is no such thing as north, south, east or west. - Add support for geostationary satellite projection (
projection = "geos"
), contributed by Scott Sinclair. Illustrated byexamples/geos_demo.py
. - Add a bunch of extra colormaps (mostly from GMT), and a script to plot them
(
examples/show_colormaps.py
). To import new colormaps, usefrom matplotlib.toolkits.basemap import cm
. - Orthographic projection only defined for perfect sphere, raise an error if user tries to use an ellipsoid.
- Print a warning in
contour
andcontourf
in situations that may result in a screwy looking plot (x
not monotonically increasing, because the data wraps around the edge of the plot). The warning suggests using theshiftgrid
function to recenter the data on the map projection region. - Fix
setup.py
so it works properly with Python 2.3, and on Windows. - Add
"zorder"
keyword todrawmeridians
,drawparallels
,drawcoastlines
,drawstates
,drawcountries
,drawrivers
,readshapefile
andfillcontinents
. numpy
now required.- Added
"srs"
(spatial reference system) instance variable. - Update
pyproj
to version 1.8.3. Now usespyproj.Geod
for Great Circle calculations. PROJ.4 data files now included. - Make sure axes ticks are always turned off, unless
noticks=False
is set when creating aBasemap
instance.
- Fix examples to conform to 'one show() per script' rule.
- Intermediate coastlines now installed by default.
basemap-data
is no longer a separate package (couldn't figure out how to manage the egg). If the"h"
res boundaries are needed, the data files must be manually put in place by the user.BASEMAP_DATA_PATH
environment variable is no longer used. - Reorganize data files so that
bdist_egg
includes the data.setup-data.py
now used to install the high-res data files. - Make sure PROJ.4 returns 1.e30 instead of
HUGE_VAL
for undefined transformations (HUGE_VAL
is inf on most platforms, which gets embedded in the postscript, resulting in a un-renderable file). - Use
typedef Py_ssize_t
if necessary (ADS). - Rename
pyproj.so
to_pyproj.so
, add a Python wrapperpyproj.py
and movepyproj
intomatplotlib.toolkits.basemap
.
- Add "Tissot's indicatrix" example.
"extent"
keyword was erroneously being passed topcolor
.- Update PROJ.4 source files to version 4.5.0.
- Update
pyproj
to version 1.8.0 (better error handling).
- Update
pyproj.c
to be compatible with Python 2.5. - Add new example
ccsm_popgrid.py
(contributed by Ivan Lima).
- Fix several bugs in
drawlsmask
method. - Remove buggy optimizations for cylindrical projections not crossing the Greenwich meridian.
- Can now specify map projection region in
Basemap.__init__
by setting width and height in projection coordinates (in meters) instead of specifying lat/lon of upper-right and lower-left corners (API change).
- Make sure
llcrnrlat
andllcrnrlon
are not at poles for Mercator. - Use Eric Firing's new
quiver
inBasemap.quiver
method. interp
functions now work with masked arrays.- Add some sanity checks for projection parameters.
- Change from classic to new-style classes.
- Remove deprecated
createfigure
method. - Fix some creeping
numpy
'isms (which caused breakage whennumarray
orNumeric
were used).
- Update for new
matplotlib
aspect ratio handling. Now maps will always have the correct aspect ratio. - If
"resolution"
keyword is set to None when aBasemap
instance is created, no boundary data sets are needed (methods to draw boundaries, likedrawcoastlines
, will raise an exception). - Rename
proj4
module topyproj
to avoid conflicts withproj4
module from CDAT. - Deprecate
createfigure
method, since maps will now automatically have the correct aspect ratio. - Add new projections Xpstere, Xplaea, Xpaeqd (where X can be n or s). These are special-case, polar-centric versions of the stereographic, lambert azimuthal equal area and azimuthal equidistant projections that don't require you specify the lat/lon values of the lower-left and upper-right corners.
- Fix bugs in
plot
,scatter
andmapboundary
methods for Miller, cylindrical and Mercator projections. "crude"
and"low"
resolution boundary datasets now installed by default.basemap_data
package now only needed to get"intermediate"
and"high"
resolution datasets.- Move all packages under single
lib/
directory so that setuptools' "develop" command works properly. - Add sinusoidal projection.
- Bilinear interpolation routines can return masked arrays with values outside range of data coordinates masked.
- New examples:
warpimage.py
: warping an image to different map projections.polarmaps.py
: simplified polar projections.garp.py
: 'World According to Garp' maps.
- Add
pcolormesh
method. - Add
drawlsmask
method for masking oceans and/or land areas. - Add 5-minute land-sea mask dataset.
- Minor bugfixes, mostly in examples.
- Huge speedups for
numpy
(no significant differences forNumeric
andnumarray
).
- Add
numpy
compatibility.
- There was a problem running examples that read pickle files. The pickle files
were created with
numarray
, and the data would not be read correctly usingNumeric
. Fixed so that pickles are created withNumeric
andNumeric
is used to read them.
- No longer requires
numarray
(interp
function no longer usesnumarray.nd_image
). This means thatinterp
does not accept"mode"
and"cval"
any longer (API change)."order"
keyword must be 0 or 1. - Modify to work with the new
ContourSet
returned bycontour
andcontourf
. - Turn off axes frame by default for non-rectangular projections (
"ortho"
,"robin"
and"moll"
). - Add
createfigure
method to create a figure with the same aspect ratio as the map usingpylab.figure
. - Reset subplot.params defaults so that default axes rectangle will have both a width and height of 0.9 (this ensures that the figure size determines that aspect ratio of the plot).
- Make
readshapefile
method raise an exception if the vertices look like they are not in geographic (lat/lon) coordinates.
- Fix several bugs in meridian/parallel labelling and cylindrical projections that crossed Greenwich were not being handled properly.
- Add
"fmt"
kwarg todrawmeridians
anddrawparallels
(default is"%g"
). - Fix bug in
readshapefile
that prevented boundaries from being drawn for"cyl"
,"merc"
or"miller"
projections when the map region did not cross the Greenwich meridian. - Modify
imshow
method so"origin"
keyword is accepted (it was always set to"lower"
previously). - Add
testgdal.py
example showing how to plot raster geospatial data withgdal
module (gdal.maptools.org). - Meridians and parallels labelled correctly when
rcParams["text.usetext"] = True
.
- Optimizations to reduce the time it takes to create a
Basemap
class instance (now nearly 4 times faster when usingresolution="i"
). - Add
"h"
(high) resolution boundary data. - Add datasets for major rivers, "drawrivers" class method.
- Fix some errors in boundaries datasets.
- Boundary datasets now installed in a separate package.
- Should now handle Numeric to numarray conversions internally, so removed
warning when
rcParams["numerix"] != "numarray"
. - Change default
"area_thresh"
so it depends on coastline resolution (10000 for"c"
declining to 10 for"h"
).
- Warning issued if numerix = 'Numeric' (a user reported crashes due to botched Numeric --> numarray conversions).
- Changes to PROJ.4 wrapper to make
Basemap
instances pickle-able.
- Add
hurrtracks.py
example (plot hurricane tracks from shapefile). - Now includes
pyshapelib
(extracted from Thuban source).
- SF bug #1254163 (make sure lat/lon limits of projection are floats).
wiki_example.py
andplotclimdiv.py
examples added. - Add
readshapefile
method for reading and plotting data from ESRI shapefiles (requirespyshapelib
from Thuban).plotclimdiv.py
is an example that illustrates this.
- Fix bug in meridian labelling when lon > 360 or lon < -180.
- Add
"ax"
keyword toBasemap.__init__
. This will set default axis instance, which can be overridden by using"ax"
keyword in method calls (API change).
- Add
"ax"
keyword to mostBasemap
methods to allow use of a pre-existingAxes
instance. Default is still to use the current instance. - Full control of font properties for parallel and meridian labels (now uses
unicode instead of mathtext for degree symbol). Replace
"font"
and"fontsize"
keyword args fordrawparallels
anddrawmeridians
replaced by**kwargs
, which is passed directly toAxes.text
method (API change).
- Add Orthographic, Mollweide and Robinson projections.
- Add
drawmapboundary
method to draw a line around the map projection region. - Add
"suppress_ticks"
keyword toBasemap.__init__
It's True by default, but can be set to False if you want to label ticks in native map projection coordinates. - Add
rotate_vector
method to rotate vectors to map projection coordinates (without interpolation, as intransform_vector
method). - Modified
pcolor
,contour
,contourf
methods to use masked arrays. - Now requires matplotlib v0.81.
drawparallels
anddrawmeridians
methods now take optional keyword arguments"xoffset"
and"yoffset"
, which control how far from the edge of the map labels are drawn.- Make
llcrnrlon
,llcrnrlat
,urcrnrlon
andurcrnrlat
optional keyword arguments inBasemap.__init__
(API change).
- Add Oblique Mercator.
- Great circle calculations now use Vincenty's equations for an ellipsoid.
- Remove
"preserve_magnitude"
keyword fromtransform_vector
. Nowtransform_vector
does a simple rotation of the vector from geographic to map coordinates, preserving the vector magnitude (API change). - Fix minor bugs in Miller and Mercator projections.
- Add Gnomonic, Cassini-Soldner and Polyconic projections (now 13 projections supported).
- Fix Miller projection being erroneously referred to by the name
"miller"
instead of"mill"
. - Add the ability to specify the major and minor sphere radii by specifying the
"rsphere"
keyword in__init__
to be a tuple instead of a scalar.
- Add support for miller cylindrical, equidistant conic, and azimuthal equidistant projections.
- Fix bugs in coastline drawing and continent filling methods.
- Modify
fillcontinents
to not fill lakes (they are actually still filled, but with axis background color).
- Code cleanups.
- Docstring typo fixes.
- Environment variable
BASEMAP_DATA_PATH
can now be used to point to data files in a non-standard install (i.e using--prefix
or--home
).
- Add
transform_scalar
andtransform_vector
methods for interpolating scalar and vector fields to a map projection grid. - Add
shiftgrid
andaddcyclic
convenience functions. - Add
quiver_demo.py
example illustrating how to plot wind vectors on a map. - Update examples to use
transform_scalar
instead of callinginterp
directly. - Change Mercator
x
coordinate units from degrees to meters. setup.py
now installs data in Python version-numbered directory (so you can have separate copies for different Python versions).- Fix aspect ratio of mercator plots.
- Add
set_axes_limits
,plot
,scatter
,contourf
,contour
,pcolor
andquiver
methods. axes
instance no longer a method argument to anyBasemap
method,gca
is called to obtain the current axes instance instead (API change).
- Add
gcpoints
anddrawgreatcircles
methods. - Add intermediate resolution coastline and political boundary databases.
- Fix bug in filling continents.
- Fix bug in drawing parallels/meridians.
- Add
ireland.py
example.
drawparallels
anddrawmeridians
can now draw labels at edge of map.
- Now can handle negative longitudes (patch from Michael Brady).
basemap.interp
can now handle irregular (but still rectilinear) lat/lon grids.
- First release on SF.
- Change
LineCollections.color
toset_color
in a try/except block. (color was a typo in 0.71 and is deprecated).
- No user visible changes. Uses new pyrex generated C extension interface to PROJ.4 which is twice as fast as the Thuban one.
- Some code reorganisation.
- Fix bugs in S. Hem. projections.
Basemap
instance variablesxmin, xmax, ymin, ymax
renamed tollcrnrx, urcrnrx, llcrnry, urcrnry
.- Add
__call__
and makegrid methods toBasemap
class.
- PROJ.4 is now called via a C-library interface, instead of using the proj
command-line tool via
os.popen
.
- Fix glitches in drawing of parallels and meridians.