Posted in Packages


Cartopy is a Python package designed to make drawing maps for data analysis and visualisation as easy as possible. Some of the key features of cartopy are: object oriented projection definitions; point, line, vector, polygon and image transformations between projections; integration to expose advanced mapping in matplotlib with a simple and intuitive interface; powerful vector data handling by integrating shapefile reading with Shapely capabilities

Status: Actively developed

Depends on: Cython, Numpy, GEOS C++, Shapely, PyShp, Proj4 C++, six

Optional extensions: Matplotlib, GDAL, PIL, pyepsg, SciPy, OWSLib

Python versions: 2.7, 3



Embedding in a Tkinter GUI

# Source:

from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.figure import Figure

import as ccrs

import sys
import Tkinter as Tk

root = Tk.Tk()
root.wm_title("Cartopy in TK")

fig = Figure(figsize=(8,4), dpi=100)

ax = fig.add_axes([0.01, 0.01, 0.98, 0.98],

ax.set_title('Cartopy and Tkinter')

# a tk.DrawingArea
canvas = FigureCanvasTkAgg(fig, master=root)
canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)

canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)

button = Tk.Button(master=root, text='Quit', command=sys.exit)




Windows binary

Compiling from source



Primarily I am a social scientist and data wrangler on topics of political violence and public opinion, but I have increasingly gotten into Python programming and development, particularly focusing on geographic analysis, image rendering/drawing/visualization, and user-friendly Tkinter GUI software building.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s