- 安裝 Geo-OSM-Tiles-0.04
wget http://search.cpan.org/CPAN/authors/id/R/RO/ROTKRAUT/Geo-OSM-Tiles-0.04.tar.gz tar -xf Geo-OSM-Tiles-0.04.tar.gz cd Geo-OSM-Tiles-0.04
- 安裝 LWP (LWP是一個Perl的 moudle)
yum install perl-libwww-perl
perl Makefile.PL make make test make install
- 到 http://www.openstreetmap.org/ 選取要的地圖範圍,記下經緯度
- 使用 downloadosmtiles.pl 下載所需的地圖,詳見官方說明 http://search.cpan.org/~rotkraut/Geo-OSM-Tiles-0.02/downloadosmtiles.pl
ex.
downloadosmtiles.pl --lat=31.104:31.343 --lon=121.309:121.664 --zoom=13:18 --destdir=../Map_Shanghai
壓縮處理 Imagemagick
convert -strip -interlace Plane -quality 50% source.jpg result.jpg
-strip 移除圖片相關的註解或資訊
-interlace 隔行掃描 Plane 漸進式