Zh-hans:Converting map data between formats
这个页面列出了将外部地图数据与OSM数据互相转换的工具。
GDAL/OGR,ogr2ogr以及QGIS – 几乎每次都可使用的解决方案
GDAL/OGR库支持serveral dozens of vector文件格式。你可以使用ogr2ogr命令行程序转换它们。它也可以读/写PostgreSQL数据库(使用PostGIS扩展)。
使用GDAL将OSM数据转换为不同数据格式的普通的工作流程为:
使用命令行程序ogr2ogr:
- 使用Osm2pgsql或Imposm将OSM数据加载进PostgreSQL数据库。
- 使用ogr2ogr转换数据。这里ogr2ogr从数据库读取并写入至你想要的格式。
使用QGIS(无需命令行):
- 在QGIS中打开.osm.pbf。
- 以你想要的格式保存。
格式
文件类型 | 扩展名 | 导入进OSM | 从OSM导出 | 讨论/评论 |
---|---|---|---|---|
Adobe Illustrator | .ai | 没有 | osm2ai.pl | 查看导出到Adobe Illustrator,OSM2ai以及http://www.flosm.de/ai/ |
ArcGIS (由ESRI制作) | 有几个 | ExportToOSM.py | ArcGIS | |
E00 | e00 | 部分的 | 部分的 | 查看593号信息 |
Dafif | ? | dafif2osm | 没有 | |
DXF (由AutoCad制作) | .dxf | DXF_导入(JOSM插件),Dxf2gpx | GeoConverter,GDAL/OGR,QGIS | 查看使用Grass转换dxf文件到Shapefile |
GADM | ? | gadm2osm | 没有 | |
Garmin maps | .img | 没有 | OSM Map on Garmin | |
Geobase | ? | geobase2osm | 没有 | |
GeoJSON | .geojson | osm-and-geojson,geojsontoosm, geojson2osm-es6 | OSM2GEO,osmtogeojson,Gdal ogr2ogr,osmium export | ogr2ogr提示 |
GeoPackage | .gpkg | 没有 | Gdal ogr2ogr,osm-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}},GeoConverter,osm-export-tool。 | |
GPX | .gpx | 在主站以图层形式导入,JOSM,gpx2csv->csv2osm | OGR,QGIS,GeoConverter | |
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,大部分数据已经被导入 |
查看更多
- 若要在不同的OSM文件格式间转换(包括变换和筛选),查看Zh-hans:OSM file formats#不同OSM文件格式间的转换
- 若您只想转换GPS轨迹,查看Zh-hans:Converting GPS track data between formats
This article is issued from Openstreetmap. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.