无法从 OpenStreetMap 下载地图数据

Unable to download map data from OpenStreetMap

正在执行

`java -jar OSMMapTilePackager-6.1.1-SNAPSHOT.jar -u http://b.tile.openstreetmap.org/%d/%d/%d.png -t Mapnik -d at_mapnik_13.zip -zmax 15 -n 49.03942 -s 46.40162 -e 17.14736 -w 9.44595`

我得到 403(禁止访问),但是当我在浏览器中执行它时,我得到一个图块作为图像文件。

有没有我漏掉的政策相关的东西。我正在尝试下载地图文件并将其用于离线使用。

提前致谢!

通常禁止批量下载。参见tile usage policy。引用重要部分:

OpenStreetMap’s own servers are run entirely on donated resources.

OpenStreetMap data is free for everyone to use. Our tile servers are not.

Bulk downloading is strongly discouraged. Do not download tiles unnecessarily. In particular, downloading significant areas of tiles at zoom levels 17 and higher for offline or later usage is forbidden [...]

你可以render your own raster tiles by installing a rendering software such as TileMill or by installing your own tile-server. Alternatively take a look at Commercial OSM software and services.

或者切换到 vector tiles。获取原始 OSM 数据相当容易。矢量切片允许您在设备上即时渲染切片。