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


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

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

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

    gdal版本

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

    ogrinfo.exe xxx.文件格式后缀

    GeoJSON(打开成功)

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

    csv(打开成功)

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

    txt(打开失败)

    C:Program FilesGDAL>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 FilesGDAL>ogrinfo.exe D:dddd.xml
    FAILURE:
    Unable to open datasource `D:dddd.xml' with the following drivers.
      -> netCDF
      -> MSSQLSpatial
      -> PCIDSK
      ...
    

    GeoPackage(打开成功)

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

    ESRI Shapefile(打开成功)

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

    kml(打开成功)

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

    gml(打开成功)

    C:Program FilesGDAL>ogrinfo.exe D:hhhh.gml
    INFO: Open of `D:hhhh.gml'
          using driver `GML' successful.
    1: hhhh (Multi Line String)
    
  • 相关阅读:
    Windows“神器”收集贴
    《SICP》读后感:关于软件本质的一点思考
    R语言apply函数族笔记
    论触摸板是比鼠标更先进的输入方式
    macbook上实现MacOS+Windows8+Ubuntu三系统
    使用Markdown+Pandoc+LaTex+Beamer制作幻灯片
    Python基本时间转换
    MySQL存储过程、触发器、自定义函数、事务
    Scrapy抓取jobbole数据
    win7安装scrapy
  • 原文地址:https://www.cnblogs.com/unlockth/p/14760688.html
Copyright © 2020-2023  润新知