验证gdal支持打开的矢量文件格式

1.gdal支持的矢量格式列表

https://www.osgeo.cn/gdal/drivers/vector/index.html

2.gdal命令测试打开矢量格式

gdal版本

C:\Program Files\GDAL>gdalinfo.exe --version
GDAL 3.1.3, released 2020/09/01

ogrinfo.exe xxx.文件格式后缀

GeoJSON(打开成功)

C:\Program Files\GDAL>ogrinfo.exe D:\aaaa.geojson
INFO: Open of `D:\aaaa.geojson'
      using driver `GeoJSON' successful.
1: test (Multi Polygon)

csv(打开成功)

C:\Program Files\GDAL>ogrinfo.exe D:\bbbb.csv
INFO: Open of `D:\bbbb.csv'
      using driver `CSV' successful.
1: bbbb (None)

txt(打开失败)

C:\Program Files\GDAL>ogrinfo.exe D:\cccc.txt
FAILURE:
Unable to open datasource `D:\cccc.txt' with the following drivers.
  -> netCDF
  -> MSSQLSpatial
  -> PCIDSK
  -> PDS4
  -> VICAR
  -> JP2OpenJPEG
  -> PDF
  -> MBTiles
  -> EEDA
  -> DB2ODBC
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> OGR_SDTS
  -> S57
  -> DGN
  -> OGR_VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> NAS
  -> GML
  -> GPX
  -> LIBKML
  -> KML
  -> GeoJSON
  -> GeoJSONSeq
  -> ESRIJSON
  -> TopoJSON
  -> Interlis 1
  -> Interlis 2
  -> OGR_GMT
  -> GPKG
  -> SQLite
  -> ODBC
  -> WAsP
  -> PGeo
  -> PostgreSQL
  -> MySQL
  -> OpenFileGDB
  -> XPlane
  -> DXF
  -> CAD
  -> FlatGeobuf
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK
  -> PGDUMP
  -> OSM
  -> GPSBabel
  -> SUA
  -> OpenAir
  -> OGR_PDS
  -> WFS
  -> OAPIF
  -> HTF
  -> AeronavFAA
  -> Geomedia
  -> EDIGEO
  -> SVG
  -> CouchDB
  -> Cloudant
  -> Idrisi
  -> ARCGEN
  -> SEGUKOOA
  -> SEGY
  -> ODS
  -> XLSX
  -> Elasticsearch
  -> Walk
  -> Carto
  -> SXF
  -> Selafin
  -> JML
  -> PLSCENES
  -> CSW
  -> VDV
  -> GMLAS
  -> MVT
  -> NGW
  -> MapML
  -> TIGER
  -> AVCBin
  -> AVCE00
  -> HTTP

xml(打开失败)

C:\Program Files\GDAL>ogrinfo.exe D:\dddd.xml
FAILURE:
Unable to open datasource `D:\dddd.xml' with the following drivers.
  -> netCDF
  -> MSSQLSpatial
  -> PCIDSK
  ...

GeoPackage(打开成功)

C:\Program Files\GDAL>ogrinfo.exe D:\eeee.gpkg
INFO: Open of `D:\eeee.gpkg'
      using driver `GPKG' successful.
1: Point (3D Point)

ESRI Shapefile(打开成功)

C:\Program Files\GDAL>ogrinfo.exe D:\ffff.shp
INFO: Open of `D:\ffff.shp'
      using driver `ESRI Shapefile' successful.
1: ffff (Line String)

kml(打开成功)

C:\Program Files\GDAL>ogrinfo.exe D:\gggg.kml
INFO: Open of `D:\gggg.kml'
      using driver `LIBKML' successful.
1: gggg

gml(打开成功)

C:\Program Files\GDAL>ogrinfo.exe D:\hhhh.gml
INFO: Open of `D:\hhhh.gml'
      using driver `GML' successful.
1: hhhh (Multi Line String)
posted @ 2021-05-12 17:10  xustch  阅读(600)  评论(0编辑  收藏  举报