-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add copyright/attribution message to downloaded map images #735
base: master
Are you sure you want to change the base?
Conversation
So regarding the temporary file vs. BytesIO topic. I looked at both options and thought it might be safer to store intermediate results on disk, rather than trying to juggle everything in memory. I also noticed the "resource.setrlimit" at the beginning and thought that memory usage is something to watch out for. Are temporary files too much of a concern? |
The memory limit is mostly just a backstop against people doing stupid things, especially with the vector output formats as I recall. Temporary files generally make me nervous because you need to be sure they will always get cleaned up properly, especially if like here you're not immediately deleting them, which you can't if you need to be able to pass them to functions by name. Though all the functions here could actually take a handle instead I think. |
f796226
to
4b15ef9
Compare
I suspect this is because Mapnik can get memory crazy with some output formats. The memory limit is 4GB, so I don't see that storing the rasterized output in-memory is an issue. PDF and PS are terrible to use with Mapnik and likely to break stuff in other ways, so I wouldn't worry about those. |
4b661a5
to
d8a3e10
Compare
Add webp image format. Depends on python3-pil. Fixes openstreetmap/openstreetmap-website#551
d8a3e10
to
6b867e0
Compare
This PR adds OSM attribution to the map export, both for vector and raster formats. Besides, this PR adds webp image format.
I introduced a new dependency on python3-pil package to enable the png->{webp,jpeg} conversion.
Fixes openstreetmap/openstreetmap-website#551