-
Notifications
You must be signed in to change notification settings - Fork 105
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
Result image wrong resolution #58
Comments
It would be smart for it to grab extra tiles and pad out to the requested resolution as you describe. As you observed, it doesn't do that. A clumsy but effective workaround is to run it once, see what you get, and then run it again using --margin XXX where XXX is how much margin you need on every side. Then it will do the right thing. For example, when I run that command on photo-points, I get an image that's 896 x 338. (I don't know why that would be different from what you got.) It's 104 pixels too narrow, so I ran it again with --margin 52 and got an image 1000 x 442, with extra map around the edges just like it should have. So that's how to get the right thing with the current code. I agree it should do that automatically in one pass. I'll follow up here if I make that improvement. |
fix on this: sethoscope#58 We ignore margin requirement and increase it to fit exact image dimension if it required(i suppose margin can only be increased, but not sure). Also fix not works it we not split common padding variable on padding.x and padding.y
Actually even your workaround not works properly. Because changed margin on second use can affect chosen zoom level. And if it occured on second iteration we will not get requested dimension again. I think i did proper fix in https://github.com/Opostol/heatmap. It works properly on cases that i tried to test. And also (as i understand) it can only increase requested margin if it set(but not decrease). |
fix on this: sethoscope#58 We ignore margin requirement and increase it to fit exact image dimension if it required(i suppose margin can only be increased, but not sure). Also fix not works it we not split common padding variable on padding.x and padding.y
heatmap.py -o photos.png --width 1000 --osm -B 0.8 --osm_base http://b.tile.stamen.com/toner photo-points
When you call this the result resolution is 915 x 357.
The text was updated successfully, but these errors were encountered: