1. 程式人生 > 其它 >mapshaper匯入.shp出現:To avoid corrupted text, re-import using the “encoding=“ option的解決方案

mapshaper匯入.shp出現:To avoid corrupted text, re-import using the “encoding=“ option的解決方案

技術標籤:地圖開發

geojson.io中匯入.json是沒有編碼的;如果直接儲存為shp格式,在https://mapshaper.org/中會提示
在這裡插入圖片描述

Unable to auto-detect the text encoding of the DBF file.
To avoid corrupted text, re-import using the “encoding=” option.
To see a list of supported encodings, run the “encodings” command.

解決方案:

1.在geojson中新增utf8編碼:"UTF8Encoding":true

{"type":"FeatureCollection","UTF8Encoding":true,"features":[{}]}

2.如果mapshaper命令使用不熟練的話,建議使用:
http://blog.giscafer.com/mapshaper-plus/

Done!