自製 tiles source – 使用 Geo-OSM-Tiles

  1. 安裝 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
  2. 安裝 LWP (LWP是一個Perl的 moudle)
    
yum install perl-libwww-perl
    perl Makefile.PL
    
make
    
make test
    
make install
  3. 到 http://www.openstreetmap.org/ 選取要的地圖範圍,記下經緯度
  4. 使用 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 漸進式

 

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *