npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

maptiletool

v1.0.4

Published

下载公网地图服务器中以xyz及其形变性质的地图切片,用于离线GIS系统建设使用

Downloads

3

Readme

MapTileTool

一 作用

下载公网地图服务器中以xyz及其类xyz形式的地图切片,用于离线GIS系统底图使用。该xyz形式为基于墨卡托投影的坐标系,切片大小为256*256规格。

二 限制

  1. xyz切片原点是基于左上角,大部分切片符合这个规则,百度切片原点在中心点,不符合。
  2. xyz切片大小为标准的256 * 256,大部分切片大小符合这个规则,类似cesium地形大小为64 * 64不符合。

三 支持范围

1 支持esri公网这种不需要带token的切片下载。

2 支持天地图,mapbox这种带token的切片下载,由于这类服务器对单token的请求数量和请求规则做了爬虫限制,需自备一个token列表,绕开数量限制和请求行为限制。

3 大部分明显为墨卡托的xyz格式的切片都可以下载。

四 使用说明

4.1 安装

源码形式:

git clone [email protected]:FreeGIS/MapTileTool.git
cd MapTileTool
npm install
npm link

npm安装命令行形式:

npm i maptiletool -g

验证安装:

freetile -h
Usage: freetile [options]

Options:
  -f, --config_file <String>  底图下载配置文件
  -h, --help                  display help for command

4.2 下载配置

工程目录config下有若干下载模板,配置参数说明如下:

bound:下载切片的wgs84坐标系的地理范围。

levels:下载切片的级别数组。

parallel:下载请求的并发数。

mapurl:下载切片服务xyz模板。

tileformat:明确指定下载切片的格式,如png jpeg pbf webp等。

downPath:下载切片本地存储目录。

tokenInfo:可选,对需要指定token的服务在此设置,该设置有三个选项。

​ location:token位置,枚举型,枚举值为"url"与"headers"。该设置用于明确指定token是在url里申明还是 headers里申明,这需要根据具体服务明确。例如:天地图和mapbox都是url中加token,而cesium地形却是在headers里申明。

​ key:token值绑定的主键,例如天地图是xxxx?tk=xxxxx,那么key就配置为"tk"。

​ values:token值数组,多配置几个,用于随机获取token下载,避免请求数量和行为限制。

4.3 切片下载

freetile -f D:/xxx/xx/esri.json