On Thu, Jul 2, 2009 at 7:22 AM, mqy<meng.qing...@gmail.com> wrote: > > XML is used as a database, elements can be easily added, modified, removed. > xor tends to be overkilled as of map tile usage -- we don't need iterating, > delete, and that much meta information. With my suggested design, we can > even add newly downloaded tiles: > insert record into meta database, and append tile content into "heap" file.
If I understand right the OSM tiles, they have the following directory structure: XX/YYY/ZZZ.png 10/558/357.png All the information is obtained from this info (position, zoom level), am I right? XX: zoom level YYY: position x? (or I dont know how to call it;) ZZZ: position y? So I think we should only pack the files into the KISS archive file. For more in depth explanation see the end of this mail. So something like this: XX/YY1.kiss XX/YY2.kiss XX/YYY.kiss Im willing to implement a simple kiss/unkiss program (just like tar/untar), for easy archiving. I will use python with no non-standard modules. Best regards, Laszlo ps: Some statistical data: Number of all tiles # cd ~/Maps/OSM; find . -name *.png |wc -l 63818 Subdirs in zoom level dirs (YYY), and total number of files. for i in *; do echo -n $i; echo -n " "; cd $i; ls -1|wc -l; cd ..; done for f in *; do cd $f; for i in *; do cd $i; for k in *; do echo "$i/$k" >> ~/Maps/OSM/$f.txt; done; cd ..; done; cd ..; done cd ~/Maps/OSM for i in *.txt; do echo -n "$i "; cat $i|wc -l ; done 2: 4 dirs, 16 files 3: 8 dirs, 64 files 4: 11 dirs, 77 files 5: 17 dirs, 83 files 6: 22 dirs, 265 files 7: 22 dirs, 217 files 8: 17 dirs, 75 files 9: 26 dirs, 152 files 10: 39 dirs, 426 files 11: 71 dirs, 1484 files 12: 100 dirs, 1046 files 13: 78 dirs, 2902 files 14: 193 dirs, 23400 files 15: 86 dirs, 1941 files 16: 119 dirs, 4033 files 17: 277 dirs, 27637 files Count the files in the subdirs(ZZZ): for i in *; do echo -n $i; echo -n "f "; cd $i; for j in *; do cd $j; echo -n "$i # $j @"; ls -1|wc -l; cd ..; done; cd ..; done The number of files is in general 20-30, and the maximum was 180. _______________________________________________ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community