Skip to content

vitoriape/kml-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KML Generator

Excel & VBA Based KML Generator for Geolocation Visualization on Google Earth and GIS Tools

version status excel vba kml license

[Open/Close] Table of Contents

📄 Description

The KML Generator automates the creation of .kml files based on coordinate tables maintained in an Excel sheet.

The project includes:

  • A ready-to-use Excel template (dados_kml.xlsm)
  • All VBA modules already imported
  • A standardized table format ready for modification
  • Built-in validation for colors, coordinate formats, and structure integrity

💡 Technologies

  • Excel (.xlsm)
  • VBA
  • KML format
  • Google Earth-compatible

⚙️ General Settings

Excel Model Structure

The file dados_kml.xlsm contains:

  • All VBA modules pre-imported (funcoes.bas, gerar_kml.bas)
  • A fully prepared structure for edition
  • Columns preconfigured for KML generation
  • Validation of allowed colors for IconCor

Column Rules and Constraints

You may:

  • Add or remove columns before the Drive column (yellow KMZ stage).
  • Add metadata fields.

You may not:

  • Add columns after IconCor
  • Change the order of required columns

Required final structure:

Link Description Latitude Longitude IconText Drive IconCor

Format Requirements

  • Latitude/Longitude format (must include degree symbol °):
    37.235000°
    -115.811111°
    
  • Drive must be a URL link to a folder
  • IconCor only accepts implemented script colors

IconCor Allowed Colors

vermelho
amarelo
verde
branco

🚀 Usage

Input Example

Link Description Latitude Longitude IconText Drive IconCor
Folder 37.235000° -115.811111° Galpão https://drive/folder amarelo

Generate KML

Developer → Macros → gerar_kml

📁 Repository Structure

/kml-generator
├── dados_kml.xlsm
├── funcoes.bas
├── gerar_kml.bas
├── LICENSE
└── README.md

⚙️ Architecture

  • Input Layer (Excel)
  • Processing Layer (VBA)
  • Output Layer (KML)

🔎 Output Example

<Placemark>
  <name>Galpão</name>
  <Point>
    <coordinates>37.235000°, -115.811111°</coordinates>
  </Point>
</Placemark>

🚧 Versions

Version 1.1 – 2025/02/11

  • Documentation updates
  • Added IconCor constraints
  • Added Drive rules
  • Updated Excel model instructions

About

The project generates structured KML outputs based on a customizable spreadsheet, allowing each location to include coordinates, metadata, icons, and folder links. Ideal for quickly mapping points of interest with consistent formatting and automated file generation

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages