Convert KML/KMZ with table data in description field to Shapefile with data in actual fields
✓ Published0🌍 Public
Aajzeigert
Last edited Nov 29, 2018
Created on Nov 29, 2018
This example converts KML/KMZ geographic data into an ESRI Shapefile while extracting HTML tables embedded in each feature’s description field and promoting them to real attribute columns. It uses GDAL/OGR to read the source layer and export its geometry, fiona to write the output shapefile, and lxml’s `etree.HTML` to parse the description tables. The script iterates through all features, replacing the raw description string with parsed table cells as properties before writing the updated schema to disk.
AI-generated description