Closed blu3r4d0n closed 2 years ago
Hello @philipmnelson thanks for posting! If I understand your question correctly, you want to be able to only display the part of the basemap that is within the polygon, correct? If that's the case, you are right, we currently don't have specific support for it in contextily
, but you could download the tile to disk (see the guide) and then load it with either rasterio
or, probably a bit easier, rioxarray
(which uses rasterio
. This guide might be of use.
@darribas thanks! I was able to do what I wanted with cartopy and shapely! But I'll keep in mind the solutions you have mentioned. Here's an example of the output I wanted to get!
Hi, I've been trying at this for a while and I've read through the source code and didn't see any way to do this.
Essentially what I'd like to do is generate an image like below, but clipped to the areas within the polygon. I don't think is a feature of contextily but I wanted to ask to be sure, and if not I'd like to suggest it be added.