cartopy

Setting up a map which crosses the dateline in cartopy

送分小仙女□ 提交于 2020-08-21 05:18:56
问题 I received the following email and wanted to make sure the answer to this question was available to everybody: Hi, I would like to setup a simple latitude longitude map, using cartopy, which crosses the dateline and shows east Asia on the left hand side with the west of North America on the right. The following google map is roughly what I am after: https://maps.google.co.uk/?ll=56.559482,-175.253906&spn=47.333523,133.066406&t=m&z=4 Can this be done with Cartopy? 回答1: Good question. This is

Setting up a map which crosses the dateline in cartopy

耗尽温柔 提交于 2020-08-21 05:18:18
问题 I received the following email and wanted to make sure the answer to this question was available to everybody: Hi, I would like to setup a simple latitude longitude map, using cartopy, which crosses the dateline and shows east Asia on the left hand side with the west of North America on the right. The following google map is roughly what I am after: https://maps.google.co.uk/?ll=56.559482,-175.253906&spn=47.333523,133.066406&t=m&z=4 Can this be done with Cartopy? 回答1: Good question. This is

cartopy set extent with central_longitude=180

自闭症网瘾萝莉.ら 提交于 2020-07-22 06:29:10
问题 Cartopy 0.17.0: When I set central_longitude, I don't know how to set the extents exactly provided: import matplotlib.pyplot as plt import cartopy.crs as ccrs projection = ccrs.PlateCarree(central_longitude=180) ax = plt.axes(projection=projection) ax.coastlines() ax.set_extent((-120, 120, -45, 45), crs=ccrs.PlateCarree()) ax.gridlines(draw_labels=True, crs=ccrs.PlateCarree()) This subsets latitudes correctly: This subsets longitudes correctly, but has extra labels: import matplotlib.pyplot

Geometry must be a Point or LineString error using Cartopy

旧巷老猫 提交于 2020-06-14 06:44:26
问题 I'm trying to run a simple Cartopy example: import cartopy.crs as ccrs import matplotlib.pyplot as plt ax = plt.axes(projection=ccrs.PlateCarree()) ax.coastlines() plt.show() But I'm getting this error: Geometry must be a Point or LineString python: geos_ts_c.cpp:4179: int GEOSCoordSeq_getSize_r(GEOSContextHandle_t, const geos::geom::CoordinateSequence*, unsigned int*): Assertion 0 != cs' failed`. I installed Cartopy using miniconda3: conda install -c conda-forge cartopy I also tried to

How to plot Lon/Lat values at the border of a orthographic cartopy plot?

主宰稳场 提交于 2020-06-01 04:01:26
问题 I use some shapefile data of the outline of Antartica in cartopy and this works fine. I can generate a plot with the shapefile and some more information on it. But I'm not able to plot the Longitude and Latitude information at the border of the image. I use the orthographic projection with central_longitude and central_latitude. I also need to mention that I'm comparably new to cartopy. My code: import numpy as np import matplotlib.pyplot as plt import cartopy.crs as ccrs from cartopy.io

How to update projection of GeoAxes using Cartopy?

安稳与你 提交于 2020-04-17 21:15:10
问题 I'm trying to make a somewhat interactive map plot with matplotlib utilizing a button added to the toolbar in Matplotlib's navigation Toolbar. The objective: The objective that I'm trying to achieve is to be able to change the axes projection on the fly without creating a new axes. There are many methods in the axes object that gets created by Matplotlib to change other aspects of the plot, but I want to be able to change projection from say, PlateCarree to NorthPolarStereo and vice versa.