What’s New in cartopy 0.19¶
21st Apr 2021
For a full list of included Pull Requests and closed Issues, please see the 0.19 milestone.
Thomas Grainger restored PEP-517 support to improve installations. (PR #1681)
@emsterr added the ability to style bounding boxes of labels. (PR #1669)
Adrien Berchet added the ability to cache downloaded image tiles. (PR #1533)
Greg Lucas changed the vector interpolations to be strictly in the source coordinates, which removed some erroneous extrapolations. (PR #1636)
Giacomo Caria added an option to remove the cardinal direction labels from the axes. (PR #1662)
Greg Lucas added the ability to update data within a pcolormesh plot using
set_array()to enable animations of the fields. (PR #1496) Liam Bindle extended this capability to update the color limits (PR #1655) and Sebastian David Eastham fixed the return values when
get_array()was called (PR #1656)
@htonchia and Greg Lucas fixed an issue with large cells appearing in pcolormesh plots. (PR #1622)
Philippe Miron added an example to demonstrate how to label specific sides of the plot. (PR #1593)
Greg Lucas added the option to restrict the limits of gridlines. (PR #1574)
Kyle Penner fixed extrapolations using an alpha-channel in imshow(). (PR #1582)
Valentin Iovene added pkg-config instructions to help with installations on MacOS. (PR #1596)
Luke Davis updated the tight bbox calculations to include the gridliner labels. (PR #1355)
Luke Davis fixed the label padding for gridliners to use points which makes the rendered screen image appear the same as the printed image now. (PR #1556)
Daryl Herzmann added the ability to make Hexbin plots. (PR #1542)
Kyle Penner fixed image plotting when a 2D alpha array is input. (PR #1543)
What’s New in cartopy 0.18¶
3rd May 2020
For a full list of included Pull Requests and closed Issues, please see the 0.18 milestone.
We are very pleased to announce that Greg Lucas has been added to the cartopy core development team. Greg (@greglucas) added the NightShade feature in the previous release, and has been instrumental in issue and PR triage leading up to 0.18. He has also ensured that CI systems have kept working through various upstream project changes.
Kevin Donkers and Phil Elson made the AdaptiveScalar the default for Natural Earth Features. This will make the default features look much nicer when plotting on zoomed in axes. (PR #1105)
Andrew Huang added the ability to put the meridian and parallel gridline labels on the gridlines within the plot boundaries rather than only as labels on the boundary. (PR #1089)
Stephane Raynaud added longitude and latitude labeling to all projections. It was previously restricted to the Mercator and PlateCarree projections. (PR #1117)
Phil Elson added the ability to fetch image tiles using multiple threads. (PR #1232)
Ryan May fixed the Geostationary projection boundary so that geometries no longer extend beyond the map domain. (PR #1216)
Phil Elson added support for style composition of Features. This means that the styles set on a Feature when it is created, and when it is added to an Axes, will be processed consistently.
This will be the last release with Python 2 support.
The default value for the
'upper'to match the default in Matplotlib.
cartopy.mpl.geoaxes.GeoAxes.outline_patchattribute is deprecated. In its place, use Matplotlib’s standard options for controlling the Axes frame, or access
cartopy.mpl.geoaxes.GeoAxes.background_patchattribute is deprecated. In its place, use Matplotlib’s standard options for controlling the Axes patch, i.e., pass values to the constructor or access
The gridliner labelling options
cartopy.mpl.gridliner.Gridliner.ylabels_rightare deprecated. Instead, use
What’s New in cartopy 0.17¶
16th Nov 2018
For a full list of included Pull Requests and closed Issues, please see the 0.17 milestone.
cartopy.feature.NaturalEarthFeatureclass now allows a
cartopy.feature.AdaptiveScalerobject to be passed as the
scaleargument. This will automatically choose the appropriate feature scale from the GeoAxes extent. This can also be used interactively while panning and zooming in a figure.
cartopy.feature.NaturalEarthFeature.scaleis now read-only. (PR #1102, PR #983)
Proj version 5.x is now supported in Cartopy, thanks to hard work by Elliott Sales de Andrade. As part of making this version work, the inner workings and boundaries of many projections were improved. (PR #1124, PR #1148) Elliott also improved support for warped rectangular projections (PR #1180) as well as added support for the Eckert family of projections (PR #1168) and Equal Earth projection. (PR #1182)
Greg Lucas contributed functionality to plot day/night across the globe, which was turned into a map feature by Phil Elson. The shading can be added to a map with
cartopy.feature.nightshade.Nightshade(datetime). For more information, see the Nightshade feature example. (PR #1135, PR #1181)
Elliott Sales de Andrade added optional support for the use of pykdtree when performing image transformations. This module has been demonstrated to be twice as fast as the old code for most of the Cartopy examples, with one example (geostationary) having a 95% reduction in run time. (PR #1150)
Phil Elson added the ability to control the appearance of Shapely geometries using a function.
stylerargument that takes a function that given a geometry, returns a dictionary of style keyword arguments. The Hurricane Katrina example has been updated to use this. (PR #1019)
Peter Killick and Phil Elson improved the use of Cartopy in Jupyter notebook environments by adding an HTML representation for projections. These render vector images of the coastlines using a given projection to enable a quick preview. (PR #951, PR #1196)
Fixes were added by Elliott Sales de Andrade to support the Matplotlib 3.x series. (PR #1130)
Andrey Kiselev contributed support for the Equidistant Conic projection. (PR #1022)
Peter Killick updated and improved the interface to Mapbox image tiles. (PR #1170)
Elliott Sales de Andrade improved the interpolation code by normalizing values, reducing issues due to precision. (PR #1042)
pyproject.tomlfile has been added to Cartopy by Elliott Sales de Andrade to make it easier to build Cartopy. Newer versions of pip should now automatically install Cython and NumPy before trying to build Cartopy. (PR #1132)
Andrew Dawson fixed a crash when calculating the boundary for the Lambert Azimuthal Equal Area projection. (PR #1100)
Kevin Donkers added all 60 UTM zones to the images in the supported projection documentation. (PR #1103)
Broken URLs to the SRTM imagery were corrected by Elliott Sales de Andrade. (PR #1143)
cartopy.mpl.clip_path.clip_path()has been deprecated. It is a simple wrapper for Matplotlib’s path clipping, so use that instead. You can replace
cartopy.io.img_tiles.StamenTerrainhas been deprecated. Use
In CartoPy 0.18, the default value for the
cartopy.mpl.geoaxes.GeoAxes.imshow()will change from
'upper'to match the default in Matplotlib.
Support for Matplotlib < 1.5.1 and NumPy < 1.10 has been removed.
What’s New in cartopy 0.16¶
21st Feb 2018
We are very pleased to announce that Ryan May has been added to the cartopy core development team. Ryan (@dopplershift) brings a wealth of experience, and has already made significant contributions to the Matplotlib interface, extended projections, and helped modernise the development infrastructure.
Elliott Sales de Andrade made a number of micro-optimisations to the Matplotlib interface, fixed a number of documentation issues with Python 3 and added Matplotlib 2.0 & 2.1 compatibility. (PR #886, PR #901, PR #780, PR #773, PR #977)
Ryan May added the
with_scale()method to the NaturalEarthFeature class. For example, it is now possible to access higher resolution land features with
cartopy.feature.LAND.with_scale('50m'). In addition to this,
cartopy.feature.STATESwas added to easily access administrative area boundaries that were previously only accessible by manually constructing
NaturalEarthFeatureinstances (as is done in the Feature Creation example). (PR #898)
Andrew Dawson wrote a new tutorial for the user guide: Understanding the transform and projection keywords. (PR #914)
Daniel Kirkham and Daryl Herzmann made significant improvements to the stability of polygon transformation. The changes reduce the frequency of messages such as
Unidentified problem with geometry, linestring being re-addedand
Self-intersection at or near point <X> <Y>occurring. (PR #974 and PR #903)
Ryan May changed the default zorder of LAND and OCEAN to -1, thus fixing an issue with LAND/OCEAN appearing above some data elements such as vectors. (PR #916)
Kevin Donkers added the 60 UTM projections example to the gallery in PR #954:
Andrey Kiselev added support for reading shapes with a third (Z) dimension. (PR #958)
Corinne Bosley standardised the docstring format for improved readability and visual consistency. (PR #987)
Cartopy now no longer enables
shapely.speedups()at cartopy import time. (PR #990)
What’s New in cartopy 0.15¶
1st February 2017
cartopy.crs.Mercatorclass now allows a
latitude_true_scaleto be specified.
tilesurl can now be passed directly to the
background_img()method has been added. This allows users to add a background image to the map, from a selection of pre-prepared images held in a directory specified by the CARTOPY_USER_BACKGROUNDS environment variable.
The Web Map Tile Service (WMTS) interface has been extended so that WMTS layers can be added to GeoAxes in different projections.
NearsidePerspectiveprojection has been added.
Optional keyword arguments can now be supplied to the
add_wmts()method, which will be passed to the OGC WMTS
New additions to the gallery:
What’s New in cartopy 0.14¶
24th March 2016
Zachary Tessler and Raj Kesavan added the
cartopy.crs.Sinusoidalprojection, allowing MODIS data to be visualised in its native projection. Additionally, a prepared
cartopy.crs.Sinusoidal.MODISprojection has been made available for convenience.
Joseph Hogg and Daniel Atton Beckmann added the
cartopy.geodesic.Geodesicclass which wraps the proj.4 geodesic library. This allows users to solve the direct and inverse geodesic problems (calculating distances between points etc). It also contains a convenience function that returns geodetic circles. This is used by
cartopy.mpl.geoaxes.GeoAxes.tissot()which draws Tissot’s indicatrices on the axes.
The SRTM3 data source has been changed to the LP DAAC Data Pool. The Data Pool is more consistent, fixing several missing tiles, and the data is void-filled. Consequently, the
cartopy.srtm.fill_gaps()function has been deprecated as it has no purpose within the STRM context. The SRTM example has also been updated to skip the void-filling step. Additionally, this data source provides SRTM at a higher resolution of 1 arc-second, which may be accessed via
All downloaders will use secure connections where available. Not every service supports this method, and so those will use non-secured HTTP connections instead. (See PR #736 for full details.)
Cartopy now supports, and is tested against, Matplotlib 1.3 and 1.5 as well as NumPy 1.7, 1.8 and 1.10.
Daniel Eriksson added a new example to the gallery:
cartopy.crs.CRS.transform_point()now issues NaNs when invalid transforms are identified.
cartopy.crs.GOOGLE_MERCATORhas been moved to
What’s new in cartopy 0.13¶
30th June 2015
Peter Killick fixed the cartopy.crs.Mercator projection for non-zero central longitudes. (PR #633)
Update of tools/feature_download.py to allow mass download of feature data rather than on-demand downloading.
A new example was added to the gallery:
What’s new in cartopy 0.12¶
14th April 2015
We are very pleased to announce that Elliott Sales de Andrade was added to the cartopy core development team. Elliott has added several new projections in this release, as well as setting up cartopy’s Python 3 testing on TravisCI and generally improving the cartopy codebase.
Installing cartopy became much easier for conda users. A
scitoolschannel has been added which makes getting cartopy and all of its dependencies on Linux, OSX and Windows possible with:
conda install -c scitools cartopy
Support for Python 3, specifically 3.3 and 3.4, has been added. Some features that depend on OWSLib will not be available as it does not support Python 3.
The Web Map Service (WMS) interface has been extended to support on-the-fly reprojection of imagery if the service does not support the projection of the map being drawn. The following example demonstrates the process by adding WMS imagery to an Interrupted Goode Homolosine map - unsurprisingly this WMS service does not provide IGH imagery, so cartopy has had to reproject them from a projection the WMS does support:
Peter Killick added an interface for accessing MapBox tiles using the MapBox Developer API. A MapBox client can be created with,
MapboxTilesand as with the other imagery from a simple URL based imagery service, it can be added to a
add_image()method. The following example demonstrates the interface for another source of imagery:
Some improvements were made to the geometry transformation algorithm to improve the stability of geometry winding. Several cases of geometries being incorrectly inverted when transformed have now been resolved. (PR #545)
Mark Hedley added the
cartopy.crs.RotatedPole, which is particularly useful for limited area rotated pole models in areas such as New Zealand:
A new method has been added to the
GeoAxesto allow control of the neatline of a map drawn with the Matplotlib interface. The method,
set_boundary(), takes a
matplotlib Pathobject, which means that arbitrary shaped edges can be achieved:
A new SRTM3 RasterSource has been implemented allowing interactive pan/zoom of 3 arc-second elevation data from the Shuttle Radar Topography Mission. The SRTM example has also been updated to use the new interface.
New additions to the gallery:
The SRTM module has been re-factored for simplicity and to take advantage of the new raster source interface. Some methods have therefore been deprecated and will be removed in future releases. The function
cartopy.io.srtm.srtm()has been replaced with the
cartopy.io.srtm.SRTM3_retrieve()have been replaced with the
cartopy.crs.LambertConformalhas been deprecated in favour of
What’s new in cartopy 0.11¶
19 June 2014
Richard Hattersley added
epsg()support for generating a Cartopy projection at run-time based on the EPSG code of a projected coordinate system. This mechanism utilises https://epsg.io/ as a coordinate system resource and employs EPSG request caching using pyepsg
Phil Elson added
WMSRasterSourcewhich provides interactive pan and zoom OGC web services support for a Web Map Service (WMS) aware axes. This capability may be added to an axes via the
add_wms()method. Generic interactive slippy map panning and zooming capability is managed through the new
SlippyImageArtistand use of the
WMTSRasterSourcewas added by Richard Hattersley to provide interactive pan and zoom OGC web services support for a Web Map Tile Service (WMTS) aware axes, which is available through the
add_wmts()method. This includes support for the Google Mercator projection and efficient WMTS tile caching. This new capability determines how to match up the available tiles projections with the target projection and chooses the zoom level to best match the pixel density in the rendered image.
Thomas Lecocq added functionality to
cartopy.io.srtmallowing intelligent filling of missing elevation data, as well as a function to compute elevation shading for relief style mapping. An example has been added which uses both of these functions to produce a grayscale shaded relief map
Lion Krischer extended the capability of
GoogleTilesto allow support for street, satellite, terrain and street_only style Google Map tiles.
Nat Wilson’s contribution brought us a major step closer to Python 3 compatibility.
Support for the
UTMprojection was added by Mark Hedley.
Andrew Dawson has added a new convenience utility function
add_cyclic_point()to add a cyclic point to an array and optionally to a corresponding 1D coordinate.
Andrew Dawson added formatters for producing longitude/latitude tick labels for rectangular projections. The formatters are customizable and can be used to produce nice tick labels in a variety of styles:
What’s new in cartopy 0.10¶
17 January 2014
We are very pleased to announce that Andrew Dawson was added to the cartopy core development team. In this release Andrew has single-handedly implemented comprehensive vector transformation and visualisation capabilities, including:
The ability to transform vector fields between different coordinate reference systems via the
A regridding function for “regularising” a vector field in the target coordinate system. See also
regrid_shapekeyword to trigger this behaviour automatically.
GeoAxes.streamplotadds the ability to draw streamlines in any projection from a vector field in any other projection.
What’s new in cartopy 0.9¶
12 September 2013
We are very pleased to announce that Bill Little was added to the cartopy core development team. Bill has made some excellent contributions to cartopy, and his presentation at EuroScipy’13 on “Iris & Cartopy” was voted best talk of the conference.
Christoph Gohlke updated cartopy to support Windows 7.
The Plate Carree projection was updated to fully handle arbitrary globe definitions.
Peter Killick updated the Mercator class’ default globe to WGS84. His refactor paved the way for some follow on work to fully implement the Google Spherical Mercator (EPSG:3857) projection.
The TransverseMercator class saw a tidy up to include several common arguments (pull request)
Bill Little added the Geostationary projection to allow geolocation of satellite imagery.
Byron Blay added the
Lambert conformal conic projection.
What’s new in cartopy 0.8¶
3 June 2013
Bill Little added support for the OSNI projection and enhanced the image nest capability. (PR #263)
cartopy.io.img_nest.Imghas been extended to include a
cartopy.io.img_nest.Img.from_world_file()static method for easier loading of georeferenced images.
Phil Elson added a major performance improvement when plotting data from PlateCarree onto a PlateCarree map. (PR #260)
Byron Blay and Richard Hattersley added a
cartopy.crs.Globeclass to encapsulate ellipsoid and optionally datum information for CRSs. Globe handling in many projections, including Stereographic, has been added.
What’s new in cartopy 0.7¶
21 Mar 2013
This is a quick release which targets two very specific requirements. The goals outlined in the development plan at
v0.6 still remain the primary target for
v0.8 and beyond.
What’s new in cartopy 0.6¶
19 Feb 2013
Patrick Peglar added the ability to draw ticks for some limited projections when using the
gridlines()method on an Axes.
Phil Elson and Carwyn Pelley extended the cartopy documentation to include new tutorials such as Using the cartopy shapereader.
Ian Edwards added a new example to create a favicon for cartopy.
Phil Elson added a new example to show polygon analysis and visualisation with Shapely and cartopy.
Edward Campbell added a new
cartopy.crs.EuroPPprojection for UTM zone 32.
Andrew Dawson added a
central_longitudekeyword for the Stereographic family of projections.
Phil Elson added a
Downloaderclass which allows automatic downloading of shapefiles (currently from Natural Earth and GSHHS). The extension requires no user action and can be configured via the
Development plans for cartopy 0.7 and beyond¶
Improve the projection definitions to support better control over datum definitions and consider adding WKT support (ticket).
Begin work on vector field support (barbs, quiver, streamlines etc.).
Continue identifying and implementing performance enhancements (particularly in contour drawing).
Extend the number of projections for which it is possible to draw tick marks.
What’s new in cartopy 0.5¶
7 Dec 2012
This document explains the new/changed features of cartopy in version 0.5.
Release 0.5 of cartopy continues the work to expand the feature-set of cartopy to encompass common operations, and provide performance improvements.
Cartopy 0.5 features¶
A summary of the main features added with version 0.5:
An improved feature API to support future expansion and sophistication, and a wider range of pre-defined Natural Earth datasets.
Axes.natural_earth_shp()has been replaced by the method