python tilecutter.py -h
Cut the picture into small pieces (tiles) according to the pyramid model; support for cutting images, cutting maps, display in tiled maps for Web Mercator projection and latitude and longitude projection.
瓦片切割工具,按照金字塔模型把图片切成小片;支持图片切割,地图切割,可用于Web墨卡托投影和经纬度投影的瓦片地图中显示。
For example:
- Cut map 地图切割
python tilecutter.py ./test_res/china.png -wm -t 512 -lv 4 -max 5 -ul "67.5000000,55.77657301866757"
The parameter -wm
indicates that the Web Mercator projection is used for cutting tile. If you need to use the longitude and latitude projection, modify the parameter to -ll
.
参数-wm
表示采用Web墨卡托平面进行切图,如果需要使用经纬度直投的切图方式则修改参数为-ll
- Cut image 图片切割
python tilecutter.py ./test_res/lol_crop.jpg -lv 6 -ul 4575,3840
import geoutil # geoutil.py
Commonly used projection coordinate system conversion, including wgs84 (GPS coordinates), gcj02 (Mars coordinates), bd09 (Baidu coordinates) coordinate conversion.
常用的投影坐标系转换,包括wgs84(GPS坐标),gcj02(火星坐标),bd09(百度坐标)之间的坐标转换。
python downloadmap.py -h
Download tiles for a specific area under a specified level and combine them into a map.
下载指定级别下特定区域的瓦片,并合成一张区域地图。
For example:
python downloadmap.py 4 5,11 7,14
表示下载级别4下,瓦片索引从(5,11)到(7,14)的区域地图。默认地图源为谷歌地图,加上参数-t
表示切换到经纬度投影的天地图。
After the download is completed, the starting point (ie, upper left corner) of the tile index will be output, which can be referenced when cutting the map.
下载完成后会输出瓦片索引的起点(即左上角)经纬度坐标,可在切割地图时进行参考:
The upper left lng/lat is [67.50000000000001, 55.7765730186677]
Tiled map loader for Android , supports a variety of projections, including Web Mercator projection, latitude and longitude projection and custom projection; supports locating, adding layers and overlays.
Android瓦片地图加载,支持多种投影,包括Web墨卡托投影,经纬度直投及自定义投影等;支持定位,添加图层和覆盖物。
Tiles generated using the tile cutter cut above can be displayed directly in TiledMapView. For more information, please go to TiledMapView.
上面使用瓦片切割器生成的瓦片可以直接在TiledMapView中显示。想要了解更多请前往TiledMapView。