Zh-hans:Converting map data between formats

From OpenStreetMap Wiki
Jump to navigation Jump to search

这个页面列出了将外部地图数据与OSM数据互相转换的工具。

GDAL/OGR,ogr2ogr以及QGIS – 几乎每次都可使用的解决方案

GDAL/OGR库支持serveral dozens of vector文件格式。你可以使用ogr2ogr命令行程序转换它们。它也可以读/写PostgreSQL数据库(使用PostGIS扩展)。

使用GDAL将OSM数据转换为不同数据格式的普通的工作流程为:

使用命令行程序ogr2ogr:

  1. 使用Osm2pgsqlImposm将OSM数据加载进PostgreSQL数据库。
  2. 使用ogr2ogr转换数据。这里ogr2ogr从数据库读取并写入至你想要的格式。

使用QGIS(无需命令行):

  1. 在QGIS中打开.osm.pbf。
  2. 以你想要的格式保存。

格式

文件类型 扩展名 导入进OSM 从OSM导出 讨论/评论
Adobe Illustrator .ai 没有 osm2ai.pl 查看导出到Adobe IllustratorOSM2ai以及http://www.flosm.de/ai/
ArcGIS
(由ESRI制作)
有几个 ExportToOSM.py ArcGIS
E00 e00 部分的 部分的 查看593号信息
Dafif dafif2osm 没有
DXF
(由AutoCad制作)
.dxf DXF_导入(JOSM插件)Dxf2gpx GeoConverterGDAL/OGRQGIS 查看使用Grass转换dxf文件到Shapefile
GADM gadm2osm 没有
Garmin maps .img 没有 OSM Map on Garmin
Geobase geobase2osm 没有
GeoJSON .geojson osm-and-geojsongeojsontoosm, geojson2osm-es6 OSM2GEOosmtogeojsonGdal ogr2ogrosmium export ogr2ogr提示
GeoPackage .gpkg 没有 Gdal ogr2ogrosm-export-tool
GML gml2osm XSLT,Python,GeoConverter 查看Converting OSM to GML。查看JOSM ticket #6921
Google Earth (Keyhole) Markup Language .kml JOSM/Plugins/OpenData [[Zh-hans:OSM in Google Earth|Google Earth中的OSM],Osm2KML}},GeoConverterosm-export-tool
GPX .gpx 主站以图层形式导入,JOSMgpx2csv->csv2osm OGRQGISGeoConverter
MP (Polish format .mp mp2osm
PFM2OSM
Osm2mp
Persistance of Vision Raytracer .pov 没有
Shapefile .shp JOSM/Plugins/OpenData GDAL, QGIS, GeoConverter, osm-export-tool See Shapefiles
Smallworld (GE Smallworld datastore) .ds 没有 OpenStreetMap Plug-In

特殊格式

这里只列出特殊的格式,主要用于特定的导入

文件类型 扩展名 导入进OSM 从OSM导出 讨论/评论
AND ? and2osm 没有 查看AND数据
CIA World Database .wdb wdb2osm 没有
Coastlines .pgs perl脚本 没有 查看Almien coastlines (PGS)
LINZ ? LINZ 没有
NKF ? Nkf2osm 没有
Frida ? Frida 没有
TIGER ?? ? ? 查看TIGER,大部分数据已经被导入

查看更多

  • 要导出图片格式(PNG,SVG,PDF)的地图,请前往渲染页面了解更多。
  • 查看导出指南以获得更普遍的概述。