Zh-hans:渲染

渲染地图的进程一般来说意味着使用某地的元地理数据制作一幅可视的地图。通常以上陈述更适用于栅格地图的制作,或是一组栅格瓦片,但同时它也可以指矢量地图格式的输出。"3D渲染"也可以将数据导入。渲染新奇且有趣的地图的能力,或特别标记特殊要素,是访问开放地理数据最激动人心的部分之一。在OpenStreetMap社区中及周围的开发者已经创造了十分多样化的用于渲染OpenStreetMap数据的软件。这些数据也可以被转化至其他格式,以使用其他可用的渲染软件。

OpenStreetMap服务器上的渲染

渲染OpenStreetMap数据最显而易见的示例,是那些在OSM主页上的地图瓦片。点击右侧的图层选择按钮以在展示不同渲染风格的图层间切换。其中有一些图层是使用Mapnik软件创建的,包括默认的'标准'图层。To understand more about the infrastructure involved in rendering and serving these tiles' map styles, see Component overview and Mapnik Rendering.

There are limitless dimensions of flexibility involved in rendering. Most rendering software supports some kind of stylesheet for controlling things like colour, line widths, text orientation, icons for points of interest, and many very subtle visual factors.

服务器以及命令行工具

名称目标平台目标语言协议备注
AlaCarteWindows,LinuxN/AAGPL
CartoJavaScriptN/AApache v2 convert CartoCSS style sheets into Mapnik's own XML styling language
MapnikWindows,macOS,LinuxC++,JavaScript,Python,Ruby,JavaLGPL最受欢迎的服务端2D地图渲染器。要求PostgreSQL以及various C++库。被设计为快速并适用于在高端服务器上的瓦片制作,但不容易配置。
MapOSMatic跨平台PythonAGPLv3Can render maps with a grid and street index. Written in Python/Django + mapnik.
Smrender跨平台CGPLv3a rules-based rendering engine written in C
TileServer GL跨平台BSDTile server for raster and vector tiles.
TileSweepLinux,macOSC,JSXMITTile server with prerendering using libmapnik.
PhototilerLinux,macOS,WindowsC++ProprietaryA tool to create high quality maps using photo-realistic shading and vector tile data.
Röntgen 跨平台 Python MIT A simple renderer for OpenStreetMap with custom icons intended to display as many tags as possible.

Client-side GUI applications

名称目标平台协议备注
Kendzi3dJava SEBSDPlugin for JOSM, allows viewing of edited data in 3D
KosmtikNode.jsWTFPLCartoCSS style development tool (style preview) based on Mapnik.
MaperitiveWindows, macOS, LinuxProprietarylocal file (.osm, .osm.bz2 and GPX) desktop rendering application, with rendering rules defined in a text file. Generates BMP, PNG and SVG output. Not designed for high performance rendering or huge volumes of data, but easy to set up and flexible, and a good option for one-off rendering (e.g. a map of your city). It also has a tile generator, hillshading, elevation colouring and lots of other features.
OSM2WorldJava SELGPLTool that creates 3D realistic models from OSM data files
OSMBuildingsJavaSript (WebGL)...Tool that creates 3D models from OSM data files
OSM goJavaScriptGPLTool that creates 3D simple models with selectable OSM-Objects from OSM data files
TileMillWindows, macOS, Linux3-clause BSDdevelopment environment for CartoCSS styles

Client-side libraries

主条目:Frameworks
名称目标平台目标语言协议备注
Carto Mobile SDKAndroid,iOS,Windows PhoneJava,Objective-C++,Swift,C#BSDSupports 3D city overlays, editable vector overlays and is highly customizable.
CartoTypeWindows,iOS,Android,macOS,Unix,Web AssemblyC++,C#,Java,Swift,Objective CProprietaryRendering and routing library. Uses OpenGL ES hardware acceleration. Customizable style sheets and route profiles. Supports perspective and 3D buildings.
GLMapiOS,AndroidObjective-C, Swift, JavaProprietaryOffline or online vector map rendered on device using OpenGL ES
libosmscoutLinux, macOS, iOS, Windows, Android, QtC++, JavaLGPLOffers simple, high-level interfaces to offline rendering and routing functionalities based on OpenStreetMap data.
Mapbox Android SDKAndroidJavaProprietary (starting with v9.3.0)[1], BSD+JSON (earlier versions)Displays Mapbox Vector Tiles in a slippy map using OpenGL ES.
Open source fork continued by community as MapLibre GL Native.
Mapbox GL JSWebJavaScriptProprietary (starting with v2)[2], BSD (until v1.13)Displays Mapbox Vector Tiles in a slippy map using WebGL.
Open source fork continued by community as MapLibre GL JS.
Mapbox iOS SDKiOSObjective-C, Swift, Interface BuilderProprietary (starting with v5.10/6.0)[3], BSD+JSON (earlier versions)Displays Mapbox Vector Tiles in a slippy map using OpenGL ES.
Open source fork continued by community as MapLibre GL Native.
Mapbox macOS SDKmacOSObjective-C, Swift, Interface Builder, AppleScriptBSD+JSONDisplays Mapbox Vector Tiles in a slippy map using OpenGL
Mapbox Qt SDKQtC++BSDDisplays Mapbox Vector Tiles in a slippy map using OpenGL
Mapbox Unity SDKCross-platformC#Apache/BSDProvides data for generating custom 3D scenes in Unity
MapLibre GL Web JavaScript BSD Community led fork derived from Mapbox GL JS v1.13 prior to their switch to a non-OSS license
MapLibre GL Native Android, iOS Java, Objective-C, Swift, Interface Builder BSD Community led fork derived from Mapbox GL Native 1.6.0 prior to their switch to a non-OSS license
MapsforgeAndroid, Java MEJavaLGPLv3free and open toolbox that enables the community to easily create new OpenStreetMap-based applications. Provided tools and APIs include solutions for map rendering, route planning and navigation, POI indexing and search, map overlays and more.
TangramWebJavaScriptMIT2D and 3D map renderer using WebGL
Tangram ESAndroid, iOS, Linux, macOSC++MIT2D and 3D map renderer using OpenGL ES
Prettymaps Cross-platform Python MIT 2D raster and vector graphics rendering using Python. Based on osmnx, matplotlib and shapely libraries.

历史

下列的渲染器已经停止维护但仍在被使用:

  • Hardware accelerated real-time rendering, .NET, proprietary, using graphics card to render images in real-time, instead of displaying prerendered tiles
  • Kartograph – AGPL licensed Python framework to create SVG maps, officially dead since 2016
  • Kartograph, LGPL, JavaScript library to display vector generated maps in any browser
  • Kothic JS – JavaScript, BSD, full-featured JavaScript map rendering engine using HTML5 Canvas. It was initially developed as a JavaScript port of Kothic.
  • Kothic – GPLv3 licensed, Python, a MapCSS/0.2 python rendering engine (project is dead, last activity in 2015)
  • LunaRender, Windows, Lua, MIT license, XML2SVG renderer
  • Mapweaver - Successor of mapgen.pl Perl rendering, OSM to SVG and with Inkscape to PNG or PDF, automatic map key. Supports street and POI lists, grids and coordinate overlays. Automatic extraction of desired place out of OSM file. Not running under Windows.
  • MapSurfer.NET - proprietary, .NET, framework for map styling and publishing (rendering, caching) geospatial data to the web
  • Memphis – a map-rendering application and a library for OpenStreetMap written in C using eXpat, Cairo and GLib. It's licensed under the terms of the GNU Lesser General Public License.
  • Osmarender - XSLTs which does OSM XML to SVG transformation. tiles@home was a project which uses Osmarender to create a tile set for serving a map layer alongside Mapnik's, but Osmarender can also be a good option for doing one-off renderings. SVG format allows you to do post-processing tidy up tweaks (see other options below). It was withdrawn from the main map at osm.org on 1th March 2012.
  • osmbrowser – can load large areas of OSM data and render them in vector graphics.
  • osmrender.pl - simple maps easily drawn with a Perl program. Uses *.osm as input.
  • XNavigator, Java SE, GPLv2, 3D renderer, last release in 2012 according to OSM wiki page
  • Osm2pov - Tool for creating isometric maps from OSM data
  • Pyrender – a collection of ideas, and some code in Python for various rendering server steps
  • VTM – cross-platform vector tile renderer developed by the OpenScienceMap project

查看更多

  • Creating your own tiles - Various options with quick descriptions
  • 基于OSM的服务列表 - 主要是不同地图渲染的一个列表
  • Category:Renderers - 关于渲染器的页面的Wiki类别
  • 3D开发
  • 纸上OSM

备注及引用

  1. Contains Mapbox GL Native binary licensed under Mapbox Terms of Service. Starting with Mapbox GL Native 1.7.0, Mapbox GL Native is distributed as binary only.
  2. Starting with version 2.0.0, Mapbox GL JS is licensed under Mapbox Terms of Service and must only be used by clients of Mapbox.
  3. Contains Mapbox GL Native binary licensed under Mapbox Terms of Service. Starting with Mapbox GL Native 1.7.0, Mapbox GL Native is distributed as binary only.
This article is issued from Openstreetmap. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.