如何使用Python显示OSM切片? [英] How can I display OSM tiles using Python?

查看:229
本文介绍了如何使用Python显示OSM切片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用generate_tiles.py生成图块,我想编写一个Python应用程序来显示它们,而不是使用Web界面.像这样的东西已经存在了吗,或者我本人是否有关于如何编写这样一个应用程序的信息?

I'm in the process of generating tiles with generate_tiles.py and I'd like to write a Python app to display them instead of having a web interface. Does anything like that already exist or is there information somewhere on how to write such an app myself?

推荐答案

您可以使用Tilemill或QGIS之类的桌面应用程序查看/编辑地图(我真的无法猜测为什么您生成的图块如果不是用于网络应用程序.)

You can look/edit your map using a desktop application like Tilemill or QGIS (I can't really guess why are you generating tiles if it is not for a web application).

Tilestache有一个内部网络服务器,可用于测试,仅使用配置文件即可轻松运行它.

Tilestache has an internal webserver you can use for testing, it's easy to get it running just using config files.

一些入门指南(或让您忙几个星期):

A few pointers to get you started (or keep you busy for a few weeks):

服务器端库和应用程序

  • TileStache: very easy to use tile server and tile cache
  • Mapnik: underlying library behind tilestache and tilemill
  • TileLite: lightweight Python tile-server
  • MapOSMatic: written in Python/Django + mapnik ?

客户端库

  • Leaflet :类似于Google Maps API的客户端库
  • OpenLayers :可以轻松地在任何网页中放置动态地图
  • :将通用实用程序添加到最小的映射库中
  • 现代地图:构建的简单平台
  • Mapstraction :众多JavaScript映射库的通用界面
  • Leaflet: client side library a lot like Google Maps API
  • OpenLayers: makes it easy to put a dynamic map in any web page
  • Wax: adds common utilities to minimal mapping libraries
  • Modest maps: a simple platform to build upon
  • Mapstraction: common interface for numerous javascript mapping libraries

用于自定义地图创建的工具

Tools for custom map creation

  • Tilemill :就像地图的CSS一样(很棒)
  • OSGeo4W :必须具有Windows的地理空间工具箱
  • Tilemill: like css for maps (awesome)
  • OSGeo4W: must have geospatial toolbox for windows

标记

  • MakiIcons: A clean point of interest icon set made for web cartography
  • Map Icons Collection: 700 free icons to use as placemarks

PyCon2012中的一些相关视频

Some related videos from PyCon2012

  • A gentle introduction to GIS
  • Making maps with Python
  • Spatial data and web mapping with Python
  • Making interactive maps for the web

一些有趣的应用程序可以激发您的灵感:

Some interesting applications to get you inspired:

  • 8bitcity: if Google Maps was running into an Atari 2600 River Raid cartridge
  • OpenWhateverMap: a patchwork of different rendering styles

这篇关于如何使用Python显示OSM切片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆