Questions tagged [cartopy]

A library providing cartographic tools for python.

Filter by
Sorted by
Tagged with
1
vote
1answer
32 views

Plotting high latitude bounding box using cartopy

I have used the sentinelhub python api to download a Sentinel-1 scene corresponding to the north coast of greenland where a bounding box defined by lon-lat is highly distorted. I have tried a few ...
0
votes
1answer
26 views

How to plot coordinate system from EPSG 4326 on north pole centered map in Python?

I have the following pandas dataframe (df) which looks like this with column headers and data values, 3 points each: temperature: array([-101.6015625, -100.9296875, -85.4296875]) latitude: array([32....
0
votes
0answers
28 views

Weird differences between basemap rotate_vector and Cartopy transform_vectors

I define a Lambert Conical Conformal in both Cartopy and Basemap import numpy as np from mpl_toolkits.basemap import Basemap #Cartopy: lam2 = ccrs.LambertConformal(central_longitude=-2....
1
vote
1answer
51 views

Define your own latitude and longitude projection

I am converting (rotating) vectors from Lambert to latlon (and viceversa) in Python. But in Basemap or Cartopy, I see that you do not define the lat and lon projections, you just define your Lambert, ...
3
votes
1answer
39 views

Creating map of pacific with cartopy

I'm trying to plot a map of the Pacific with Japan and California in view, but am having some problems. Here's my script: import cartopy.crs as ccrs import cartopy.feature as cfeature import ...
2
votes
1answer
23 views

Obtain CRS from existing axis with cartopy

Is there a method to get the CRS from a figure created with cartopy? Say for example, I only had access to the ax created here: import cartopy.crs as ccrs import matplotlib.pyplot as plt plt.figure(...
0
votes
1answer
218 views

GEOSGeom_createLinearRing_r returned a NULL pointer

I want to import cartopy on Python3, but it keeps showing me File "shapely\speedups\_speedups.pyx", line 408, in shapely.speedups._speedups.geos_linearring_from_py ...
1
vote
1answer
22 views

Cartopy unable to find tilematrix for projection

I am currently trying to run the example script from cartopy import matplotlib.pyplot as plt import cartopy.crs as ccrs from cartopy.io.shapereader import FionaReader import os import fiona def main()...
1
vote
0answers
42 views

Plotting city locations on Python 3 [closed]

My question is a follow-up of this: plotting US cities on a map with matplotlib and basemap. I would like to use some Python library to plot on a map city locations, starting from a list like this: ...
0
votes
1answer
100 views

Plotting xarray over background map using cartopy

I am trying to plot an xarray DataArray over a background map using cartopy. When including the background map, the DataArray is not visible, although the map has an appropriate extent. I am adding ...
0
votes
0answers
75 views

GeoPandas and Cartopy how to dynamically zoom to Multiline

I am new to GeoPandas and Cartopy. I am trying to generate map plots for different regions dynamically. When generating the image from geopandas ('df.plot()') the size is correct, but when I generate ...
1
vote
0answers
54 views

Issue with circular patterns showing up after orthographic projection

For a project I'm working on, I'm trying to project a GOES-16 image to an orthographic projection centred at the continental United States. In a later stage, I found these odd circular patterns appear ...
1
vote
1answer
96 views

Distance to coastline in meters using Cartopy and Shapely

I am trying to calculate the distance to coastline for some points. Using Cartopy and Shapely, I can calculate the distance in degrees, but that is not very helpful. Perhaps if I could transform the ...
0
votes
1answer
232 views

Clip global data by polygon using rioxarray fails (off by 180 longitude)

I want to extract CMIP6 climate data within polygons defined by a selection of the Large Marine Ecosystems of the world. The data(CMIP6) are found in ranges from 0 to 360 degrees longitude, while my ...
1
vote
0answers
396 views

Displaying projection with IMSHOW()

I am having an issue displaying satellite data on the correctly projection using cartopy and imshow. I am unsure of the initial data projection, but I am trying to put it into Plate Carree with a ...
1
vote
0answers
108 views

Single country coastlines in Python Matplotlib Cartopy

In the image below I am using cartopy to plot coastlines. But, I only wish to have the coastlines of Australia, and not the surrounding countries. Is there a way to remove the other countries. Here ...
3
votes
2answers
1k views

Calculating geodesic distance along a path (lat/lon points) at once?

Using Python 3.7 with Jupyter Notebook on a Win10 x64. I have a list of lat-long tuples representing a path and I want to calculate the total length along that path in meters (or km, miles etc). I ...
2
votes
0answers
226 views

Estimating a Rotated Pole given a gridded dataset with lat/lons at each point

I have netcdf dataset that I think is regular gridded dataset using a Rotated pole mapping, but the rotated pole information is wrong. For those not familiar with Rotated Poles, the cartopy ...
3
votes
1answer
4k views

Increasing resolution of Cartopy stock background?

I am trying to create a small application that will show zoomed in maps. If possible, I would like to avoid using map tiles. Going off the example on this page: https://scitools.org.uk/cartopy/docs/...
0
votes
1answer
467 views

Geoplot/Cartopy Orthographic projection won't work near equator

I am having trouble getting Geoplot's Orthographic projection to work near the equator. It works fine at locations ±90 longitude where latitude is right at 0, but if I run the code below, it fails ...
-1
votes
1answer
196 views

cartopy and xarray issues

I'm beginning to use netCDF4 data and therefore I have downloaded xarray and also cartopy (with pip). I have downloaded data from the climate data store and want to plot these data. I have a notebook ...
0
votes
1answer
503 views

Cartopy lakes and rivers are clipped

I'm trying to produce a map showing water bodies like oceans/rivers/lakes polygons for purposes of plotting vessel voyages using cartopy. Ultimately I'm looking to create a sea mesh grid using the ...
0
votes
1answer
1k views

Displaying geopandas points with cartopy

I am trying to display a GeoDataFrame containing points, using cartopy. I first tried to follow the indications given in the documentation of geopandas. However, the points are not displayed: ...
1
vote
1answer
498 views

Interpolate Temperature Data On Urban Area Using Cartopy

I'm trying to interpolate temperature data observed on an urban area formed by 5 locations. I am using cartopy to interpolate and draw the map, however, when I run the script the temperature ...
1
vote
0answers
488 views

Add geopandas to cartopy

How can I add a geopandas geodataframe to a cartopy map? My objective is to create a large number of PNGs to turn into a GIF. The geopandas default plotting options are limited so I would like to ...
3
votes
2answers
2k views

Shapefiles won't display with cartopy

I'm trying my first GIS project with cartopy and matplotlib and I'm having some trouble displaying some shapefiles. The shapefiles were downloaded from here: http://data.vancouver.ca/datacatalogue/...
2
votes
0answers
1k views

Cartopy image tiles - determining possible zoom level in advance?

In Cartopy I'm using an image tile like so: terrain_tile = cimgt.StamenTerrain() ax.add_image(tile, zoom) By default I've set the zoom level to 14 and that works perfectly for my first test case. ...
5
votes
1answer
3k views

How do I set extent in a geopandas plot (as in cartopy)?

The usual. My shapefile is from a much bigger place than my data, and I want to zoom in. The dark dot below is Melbourne, and it has some very interesting data plotted on it. base.plot(linewidth=0 ...
1
vote
1answer
1k views

Rotating geometry in cartopy?

I would like to use cartopy to display a map of the cities in the contiguous United States. In order to do so, I have written the following code (the data comes from here): import geopandas as gpd ...
4
votes
1answer
6k views

cartopy: plotting shapefiles

I am new to gis and am trying to plot a shapefile containing land polygons. (From OSM.) Unfortunately my output image is always empty (i.e. white). Can somebody tell me what I am doing wrong? import ...
1
vote
0answers
763 views

Error and kernel dies with shapely/geos inside Jupyter notebook

I have a Python 2.7 script (code below) that scrapes data from a table on the web and draws a map. It runs fine from the command line using $ python bears.py When I run the identical script from ...
3
votes
0answers
1k views

Installing cartopy on OSGeo4W

I am trying to install cartopy on OSGeo4W. Even though all required packages already downloaded and updated, the installer won't recognize them. I keep getting the following error: setup.py:168: ...
5
votes
1answer
13k views

Python Mapping in Matplotlib Cartopy Color One Country

I have plotted a map of the world using matplotlib Cartopy. Now I want to select a specific country in the map in this case the United States and change the color. I think this is possible but not ...