2

I am trying to build a custom-designed map, with correct geodata. It could even be an image created in illustrator, but it has to be exported as a set of tiles in correct map format - so that it can be read by tools like Leaflet.js

What confuses me is that none of the available map tools seem to work very well together. I did find Tilemill, which looks very promising (it has a very clean interface and works with CSS), but:

  • Openstreetmaps does not allow downloading tile images, only XML data in OSM format.
  • Tilemill does not allow importing Openstreetmaps XML data (why!).
  • Even if you manage to design a map in Tilemill, you still cannot export tile images, only a proprietary SQL database format? What's the point of that?
  • If Tilemill is useless, are there other tools that allow opening OSM XML data and applying your own design styles?

There are some sources that talk about building your own tile server:

This source suggests converting OSM to PostGIS using SQL, and then using a custom python script and a tool named Mapnik. Then it says that it's not recommended to use Mapnik for OSM....

This source sounds promising, but then it casually mentions that you have to build and run your own custom Linux distribution...

Is there a simpler way to create map tiles with correct filenames and folders for Leaflet.js?

4

1 回答 1

3

Tilemill 不允许导入 Openstreetmaps XML 数据(为什么!)。

OpenStreetMap XML 是一种交换格式:它是一种传输东西的方式,而不是使用它们。您可以将其导入 PostGIS并在 TileMill 中使用

即使您设法在 Tilemill 中设计了地图,您仍然无法导出平铺图像,只能导出专有的 SQL 数据库格式?那有什么意义呢?

如果您导出数百万个平铺图像,您将填满硬盘并用完 inode。这是一个糟糕的交易。这就是我们制作 MBTiles 的原因,它不是专有的,但在每个单词的定义中都非常开源,如果您愿意,可以使用mb-util将其导出到磁盘。

如果 Tilemill 没用,还有其他工具可以打开 OSM XML 数据并应用您自己的设计风格吗?

TileMill 并非没用,但如果您想要其他选择,您可以使用Maperitive,尽管它在任何意义上都是专有的。

于 2014-02-17T21:41:40.587 回答