Зачем конвертировать SHP в KML?
.kml is the format Google Earth and Google Maps import natively, making it the standard way to visualize GIS data without a dedicated GIS application. KML is also a single self-contained file, which is easier to share than the multi-file Shapefile bundle.
Способы конвертации SHP в KML
QGIS OPEN-SOURCE
Add the .shp via Layer > Add Layer > Add Vector Layer, right-click the layer, choose Export > Save Features As, set format to Keyhole Markup Language (KML), and set CRS to EPSG:4326.
ogr2ogr OPEN-SOURCE
Run ogr2ogr -f KML out.kml in.shp in a terminal, adding -t_srs EPSG:4326 if the Shapefile is not already in WGS 84. ogr2ogr ships with QGIS on Windows.
Об этих форматах
Файл .shp - это почти всегда Esri Shapefile, представляющий собой геопространственные векторные данные (точки, линии, полигоны), используемые в GIS-программах. Он является частью набора:…
Открыть детали .SHP →Файл KML хранит картографические данные - метки, маршруты, многоугольники, наложения изображений - в текстовом формате XML. Проще всего открыть его в Google Earth (бесплатное приложение для…
Открыть детали .KML →Качество и на что обратить внимание
- The Shapefile must have all companion files present -
.shxand.dbfare mandatory, and.prjis critical for correct coordinate assignment in the output KML. - Skipping reprojection to EPSG:4326 when the Shapefile uses a projected CRS produces a KML that places features in the wrong location in Google Earth.
- Shapefile attributes transfer to KML as ExtendedData elements, visible in Google Earth's feature info popup.
Часто задаваемые вопросы
Does the converted KML open in Google Earth?
.kml or drag it into the Google Earth window.What is the difference between KML and KMZ?
.kml and rename it .kmz for a smaller file size.Do I need all Shapefile component files?
.shp, .shx, .dbf, and .prj must all be in the same folder; missing any will cause the conversion to fail or produce incorrect output.