ogr2ogr无法进行kml

时间:2019-03-04 04:22:48

标签: centos6 gdal ogr

在Centos 6(vps)上

。我无法将kml转换为shapefile。

[root@vps208386 tmp]# ogr2ogr --version
GDAL 2.2.3, released 2017/11/20

要检查ogr2ogr,我已将shapefile转换为kml,并且可以正常工作

ogr2ogr -f 'kml' output.kml output.shp

但是现在,我想将kml转换为shapefile,并且无法正常工作:

ogr2ogr -f 'ESRI Shapefile' output2.shp output.kml
如您所见,

是相同的kml输出,因此..不是损坏的文件。

结果是:

FAILURE:
Unable to open datasource `output.kml' with the following drivers.
  -> `PCIDSK'
  -> `PDF'
  -> `ESRI Shapefile'
  -> `MapInfo File'
  -> `UK .NTF'
  -> `OGR_SDTS'
  -> `S57'
  -> `DGN'
  -> `OGR_VRT'
  -> `REC'
  -> `Memory'
  -> `BNA'
  -> `CSV'
  -> `GML'
  -> `GPX'
  -> `KML'
  -> `GeoJSON'
  -> `OGR_GMT'
  -> `WAsP'
  -> `OpenFileGDB'
  -> `XPlane'
  -> `DXF'
  -> `Geoconcept'
  -> `GeoRSS'
  -> `GPSTrackMaker'
  -> `PGDUMP'
  -> `GPSBabel'
  -> `SUA'
  -> `OpenAir'
  -> `OGR_PDS'
  -> `HTF'
  -> `AeronavFAA'
  -> `EDIGEO'
  -> `SVG'
  -> `Idrisi'
  -> `ARCGEN'
  -> `SEGUKOOA'
  -> `SEGY'
  -> `SXF'
  -> `Selafin'
  -> `JML'
  -> `VDV'
  -> `TIGER'
  -> `AVCBin'
  -> `AVCE00'

但是,这是什么问题?如果我使用相同的ogr2ogr输出

pd:在我的台式计算机(Centos 7)中可以正常工作。在他们两个人中,我都使用下一个安装了ogr2ogr 2.2.3:

wget http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/install-libkml-r864-64bit.tar.gz
tar xzf install-libkml-r864-64bit.tar.gz

#Copy these required files to  /usr/local
sudo cp -r install-libkml/include/* /usr/local/include
sudo cp -r install-libkml/lib/* /usr/local/lib
sudo ldconfig


#download GDAL
wget http://download.osgeo.org/gdal/2.2.3/gdal-2.2.3.tar.gz

#Untar
tar xzf gdal-2.2.3.tar.gz
cd gdal-2.2.3

#Compile from source
./configure --with-libkml 
make
make install

0 个答案:

没有答案