Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

[Edited to include example image outputs]

SE folks, I'm wanting to modify generate_tiles.py to create 512 x 512 tiles.

At om_henners' recommendation, I tried replacing 12 of the 13 instances of 256 in the Python file (the 13th specifies the .PNG image format). I've since tried a test run, and I can already tell something is wacky...

Replacing all the relevant 256's with 512's merely produces a larger tile, when the intended result is increased mapped-area per tile (I think it amounts to 4x coverage).

Posting the code isn't worthwhile becuase you can see it here, but it is worth noting this is the only line for which I did not change 256 to 512 between test runs:

im.save(tile_uri, 'png256')    <-- the only 256 not changed to 512

So I'm getting these two outputs, and I have two curious observations:

1) The file address is the same. I would expect---if the mapped-area was changed between runs---the same location should fall into a different file, no?

2) Even though the mapped-area remained the same, the 512 tiles gained labels. Very interesting.

256x256 (%/8/61/97.png)

enter image description here

512x512 (%/8/61/97.png)

enter image description here

(And, I apologize for double-posting, but this question isn't getting any interest at help.OSM, and it seems at least one person at GIS.SE is okay with some of that traffic appearing here.)

Thanks in advance for the help!

share|improve this question
1  
There is an implicit assumption that a particular zoom level covers a particular cartesian area in most tools. See wiki.openstreetmap.org/wiki/Zoom_levels. Consider what the output at zoom level 0 should look like. –  BradHards Dec 22 '12 at 0:24
    
Maybe you can explain why you are trying to make bigger tiles - that might allow people to come up with better solutions to the real problem you are trying to solve. –  BradHards Dec 22 '12 at 0:25
    
@BradHards thanks for taking an interest. We (me and another fella at my company) formerly used 256x tiles in our stuff, but we found---in our case---512 creates a better UX. I realize alot of queries on this subject suggest 256x creates a better user experience, but this wasn't the outcome of our experimentats. Maybe our server is slow, but our product, for enterpise clients (not the general public using smart phones), uses a full-screen map viewport. So that said, all of our existing sites use 512x, and I want to stay true to 512x tiles when we deploy the OSM data. –  elrobis Dec 22 '12 at 1:12
add comment

2 Answers

For testing, I would suggest to start with small countries, like Andorra or Monaco. Geofabrik has those extracts for download, and the result should drop in quickly.

Furthermore, you have to adapt the tilesize in Openlayers or whatever you aim to display the tiles with.

share|improve this answer
    
Good ideas, thank you. /E –  elrobis Dec 21 '12 at 10:18
add comment

Update (origianlly said to change all the instances of 256 except the png definition)

Taking a look at your update and the code a bit more carefully, you were right originally - if you also leave the first c = 256 in the GoogelProjection initialisation you will get the tiles back at the correct resolution. However your tile naming convention will be changed compared to the 256 tiles, which depending on your application may or may not be important (x and y are halved).

share|improve this answer
    
+1 Ok great---I appreciate the insight, om_henners. I suspect you are right. Once I've tried it (likely today or by Saturday), I'll return and followup with you. Thanks again for your help. –  elrobis Dec 21 '12 at 10:22
    
I ran into some goofy stuff whcn changing all (but one) 256 to 512. I updated the question; curious if you have any additional insights. –  elrobis Dec 21 '12 at 20:44
    
Updated as you were right originally to say not to change the top c = 256 –  om_henners Jan 4 '13 at 2:04
    
Also, apologies for the late reply - been on holidays! –  om_henners Jan 4 '13 at 2:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.