From OpenStreetMap Wiki
Jump to: navigation, search

README for png2tileinfo


This is the "source" for the oceantiles_12.dat file used in and in of the tilesAtHome project, as well as the tahngo t@h server.

The oceantiles_12.dat file contains two bits for every level-12 tile in the world, specifying whether it is a land tile, a sea tile, a coastal tile, or unknown.

The file is easy to access by the programs using it, but difficult to edit. So here is the "source data" in the form of a large PNG file 4096x4096 pixels for the whole planet, in which each pixel corresponds to one level-12 tile and may have one of four colours:

  • white - coastline intersects with this tile
  • green - no coastline intersect, land tile
  • blue - no coastline intersect, sea tile
  • black - unknown


If you find errors in the data file - i.e. an inland area rendered blue or a sea area not rendered blue -, you can fix the PNG file with any image editor, then run png2tileinfo, and you have a new data file.

An other option is to use png2tileinfo as an interface to change the desired tile (syntax: see below)

Please make sure to upload both the .png file that you changed and the .dat file created!

Please note that the code is picky about the colours used. Nothing but "pure" colors will do - blue has to be 0,0,255, green has to be 0,255,0, black is 0,0,0 and white 255,255,255.


% cd applications/rendering/png2tileinfo
% svn update
% perl check 3762 2471
oceantiles_12.png(3762, 2471) = 3 (mixed)
% perl set 3762 2471 land
% perl

[wait until file generated...]

% svn commit