Questions tagged [cartopy]

Cartopy is a Python package harnessing the power of matplotlib to deliver informative, precise and striking maps.

Cartopy is a Python package designed to make drawing maps for data analysis easy and enjoyable.

Primarily the non-drawing functionality of cartopy makes use of proj.4, numpy, geos and shapely; with simple and intuitive interfacing to matplotlib for map drawing.

Some of the key features of cartopy are:

  • object oriented projection definitions
  • point, line, polygon and image transformations between projections
  • integration to expose advanced mapping in matplotlib with a simple and intuitive interface
  • work-in-progress mechanisms for accessing specialist data such as those from the “Shuttle - Radar Topography Mission” (SRTM) and the “Global Self-consistent, Hierarchical, High-resolution Shoreline” database (GSHHS).

Licensed under the GNU LGPL3, cartopy's latest documentation can be found at http://scitools.org.uk/cartopy/docs/latest and the source repository at https://github.com/SciTools/cartopy

612 questions
6
votes
4 answers

Cartopy: axis label - workaround

I am looking for a workaround to add x and y axis ticks and labels to a Cartopy map in Lambert projection. The solution I have come up with is just an approximation which will yield worse results for larger maps: It involves transforming desired…
yngwaz
  • 579
  • 5
  • 15
6
votes
1 answer

Python Matplotlib add Colorbar

i've got a problem using MatlobLib with "Custom" Shapes from a shapereader. Importing and viewing inserted faces works fine, but i'm not able to place a colorbar on my figure. I already tried several ways from the tutorial, but im quite sure there…
user3066027
  • 197
  • 2
  • 3
  • 12
6
votes
1 answer

How to add a point-feature shapefile to map using cartopy

I have two shapefiles. One is a point feature shapefile, named "point.shp", the other is a polygon shapefile named "polygon.shp". Both I want to add to a map using cartopy. I managed to add the "polygon.shp", but failed with the "point.shp". Here's…
gepcel
  • 1,024
  • 7
  • 16
6
votes
1 answer

3D CartoPy similar to Matplotlib-Basemap

I'm new to Python with a question about Cartopy being able to be used in a 3D plot. Below is an example using matplotlibBasemap. import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.basemap import Basemap m =…
5
votes
1 answer

cartopy: map overlay on NOAA APT image

I am working on a project trying to decode NOAA APT images, so far I reached the stage where I can get the images from raw IQ recordings from RTLSDRs. Here is one of the decoded images, Decoded NOAA APT image this image will be used as input for the…
7andahalf
  • 71
  • 3
5
votes
2 answers

Python: using polygons to create a mask on a given 2d grid

I have some polygons (Canadian provinces), read in with GeoPandas, and want to use these to create a mask to apply to gridded data on a 2-d latitude-longitude grid (read from a netcdf file using iris). An end goal would be to only have data for a…
Ian Ashpole
  • 275
  • 3
  • 14
5
votes
1 answer

Cartopy: Drawing the coastlines with a country border removed

I want to draw the outline of China in one color whilst also showing the global coastlines in another. My first attempt at doing this was as follows: import matplotlib.pyplot as plt import cartopy.crs as ccrs import cartopy.feature as feature import…
pelson
  • 18,423
  • 3
  • 80
  • 88
5
votes
2 answers

Python 3.4 crashes when producing some – but not all – Cartopy maps with segmentation fault 11

I have installed the Python mapping tool Cartopy on a Mac running El Capitan 10.11.6 with Python 3.4. I can use Cartopy to successfully plot some maps but, in some cases, the Python kernel dies with Segmentation Fault 11. I wanted a setup that I…
user1718097
  • 3,350
  • 6
  • 34
  • 51
5
votes
2 answers

Plotting projected data in other projectons using cartopy

This question is in regards to plotting some data I have that uses the Lambert Conformal (LCC) CRS. While these questions specifically pertain to plotting LCC data in multiple projections, it also applies to the use of cartopy in general in that I…
nawendt
  • 134
  • 2
  • 10
5
votes
1 answer

Cartopy shaded relief

I have been struggling with generating a shaded relief to underlay my cartopy maps. This srtm_shading example is very slow for downloading data from new areas. Is there any way to use a shaded relief image instead? This image tiling seems…
jsignell
  • 2,262
  • 1
  • 16
  • 21
5
votes
1 answer

How to plot a tissot with cartopy and matplotlib?

For plotting skymaps I just switched from Basemap to cartopy, I like it a lot more . (The main reason was segfaulting of Basemap on some computers, which I could not fix). The only thing I struggle with, is getting a tissot circle (used to show the…
MaxNoe
  • 12,219
  • 2
  • 32
  • 40
5
votes
2 answers

Make a transparent plot with cartopy

I'd like to create a transparent map with Cartopy (which could then be used as an overlay for a web application). Have tried to play with several settings, projections, type of plots etc., but never managed to get a transparent Cartopy map. Here is…
yngwaz
  • 579
  • 5
  • 15
5
votes
2 answers

Cartopy behavior when plotting projected data

I am using cartopy to draw my maps. Its a great tool! For some of my data I have the problem that the data is not properly mapped around 0deg or the dateline. See the example below. I know the same feature from matplotlib.basemap, where it can be…
allion
  • 133
  • 9
5
votes
1 answer

Force aspect ratio for a map

If I define a set of (geo)axes with a given height and width how can I make sure that the plot will fill these axes? import matplotlib.pyplot as plt import cartopy.crs as ccrs ax = plt.axes([0.3, 0.1, 0.4, 0.8],…
ajdawson
  • 2,527
  • 21
  • 33
5
votes
2 answers

central longitude for NorthPolarStereo

I'd like to plot a polar stereographic plot of the Northern Hemisphere with 180 at the bottom of the plot so I can emphasize the Pacific region. I'm using the latest cartopy from git, and can make a polar stereographic plot no problem, but I can't…
ajdawson
  • 2,527
  • 21
  • 33
1 2
3
40 41