2

I've been learning how to use Cartopy and Matplotlib to plot map. But I have a question regarding the argument transform. According to the Cartopy document, transform specifies "what coordinate system your data are defined in". Suppose I am going to plot temperatures of an area, and the area has been split into several grid cells. Each grid cells has a corresponding coordinate defined in lat and lon (Geodetic Systems). Based on the Cartopy document, I need to use crs.PlateCarree() instead of crs.Geodetic(). I'm a bit confused about it. Because,I think the PlateCarree is a way of projection. In other words, coordinates defined in PlateCarree projections are projected data. But latitude and longitude should be unprojected data. Can anyone help me with it? Thanks!

Michael Delgado
  • 13,789
  • 3
  • 29
  • 54
Yifeng
  • 21
  • 1
  • 1
    If the plot involves lines, `transform=crs.PlateCarree()` transforms/draws straight lines along supplied data points, the results can be bad if distances between points are long. Instead, `transform=crs.Geodetic()` will add extra points along the supplied vertices to obtain the plots of long lines as greatcircle arcs that make the plots more accurate. – swatchai Jun 20 '22 at 22:14
  • 1
    Clearly, `transform=crs.Geodetic()` will do much more computations than the other. If you don't need greatcircle arcs in your plots, you should use `transform=crs.PlateCarree()`. Both provide similar coordinates transformation in the process. – swatchai Jun 20 '22 at 22:26

0 Answers0