-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poorly looking Cartopy rendered tiles #1048
Comments
Try adding From the matplotlib documentation (for |
Unfortunately |
I see the same as you on Mac and Linux. I don't have the solution, but this is not an isolated case. |
Maybe I've got a slightly different use case in that I was primarily producing PDF files from matplotlib (on a Mac, using Homebrew Python installation) viewing the results with preview or notebook with inline svg. Your example producing bitmap output (PNG) yes I get noticeable pixelation, there was some improvement using I think it is down to |
For reference, I've provided a link to the StackOverflow question. The For future readers who find this and who don't see the benefit from the interpolation keyword, it is probably because you are re-projecting the tiles into the target projection which is happening before matplotlib gets any influence on the scheme. There isn't a lot we can do with this, as cartopy is using a general 3d interpolation scheme in order to support the full diversity of the projections it can handle. Your best option for poor resolution cross projection map tiles is to change the resolution of the re-projection. A question about how to do this came up on StackOverflow not too long ago: [I can't currently find the link 😢 🔮 ) (there are also others: 1). To give a concrete example of this, take the following code:
If we simply add the Instead, we also need to control how coarse/fine the target regridded image should be with the |
I think this addresses the issue at hand, so will close. Happy to re-open this if the issue isn't resolved for you. Thanks! |
Pardon the nagging: while the The example in the StackOverflow post was posted June 22, 2015. The cartopy version would've been 0.11, 0.12.04, or 0.12.05, judging from the PyPI history. There's three changes visible:
Could difference 3 be a case of regression? I had a try at installing an earlier cartopy version to see if I could reproduce the 2015 example, but unfortunately, the earliest version on conda is 0.15.1 (which is also "not-crisp" by default). PyPI does have the earlier versions, but not surprisingly, installing a package from 2015 fails miserably. I'm not nearly familiar enough with the cartopy source to investigate from that direction... Having good looking tiles is a really cool and convenient feature, so it might be worth another look? |
Could this issue be because Cartopy is accessing Google tiles through a deprecated interface that is no longer supported/allowed: https://developers.google.com/maps/faq#tos_tiles ? |
The simple answer I think is that the default interpolation changed in matplotlib. I have some things lined up to improve the tiles interface further for v0.18 (interactive & auto zoom). Implementing a better interpolation scheme by default is going to be important for that functionality too. |
You could change the figsize=(50, 50) |
Description
I posted this on stackoverflow but got no answers so far, hope someone here could shed some light on it. In a nutshell, my tiles look ugly, for example:
Produces:
Look at those pixelated text labels and overall poor resolution. I played with different zoom levels and different styles with no success.
When displaying the same map on google maps, I get the usual nicely rendered look:
I can change tile provider but results are similar:
It doesn't matter if I run the code on a Jupyter notebook or a python console or on a different machine, results are identical.
Any clue?
Traceback
Full environment definition
Operating system
macOS High Sierra 10.13.3 (17D47)
Cartopy version
0.16.0
conda list
pip list
The text was updated successfully, but these errors were encountered: