在Linux中正确压缩KML文件

问题描述 投票:-1回答:1

我试图在Linux系统上使用gzip压缩KML文件

Linux代码

gzip -cvf somefile.kml > somefile.kmz

当我在Google地球中尝试验证新的KMZ文件时,收到以下错误:

打开文件“somefile.kmz”失败:第1行第0列的解析错误:格式不正确(令牌无效)

发生了什么?

gzip kml google-earth
1个回答
0
投票

向@geocodezip大声呼救:

终端代码

zip -9 somefile.zip somefile.kml
mv -f somefile.zip somefile.kmz

-9用于最佳拉链压缩

也可以通过运行以下方法优化此过程:

zip -9 somefile.kmz somefile.kml
© www.soinside.com 2019 - 2024. All rights reserved.