KML and Google Earth for wind and solar projects
KML is still the fastest way to put a project in front of a landowner, a lender or a regulator. How KML files are structured, and how to build good ones.
· 6 min read · reneGIS team
KML (Keyhole Markup Language) is the file format Google Earth reads. It is old, verbose and limited compared with a real GIS format, and it remains the most effective way to show a project layout to someone who does not use GIS. A landowner, a lender, a district official and a lineman can all open a KML file and see turbines, boundaries and roads on satellite imagery within a minute.
What is inside a KML file
KML is XML. The elements that matter for project work are few.
- Placemark: one feature. It has a name, an optional description, a style, and a geometry.
- Point, LineString, Polygon: the geometries. Coordinates are always
longitude,latitude,altitudein WGS84, in that order. Getting the order backwards is the most common KML bug. - Folder: groups placemarks, and can be nested. Google Earth shows folders as a collapsible tree with checkboxes.
- Style and StyleMap: colours, icon, line width, polygon fill. Defined once and referenced by ID so many placemarks share a look.
- Document: the top-level container.
A KMZ file is a zipped KML, optionally with custom icons and images inside. It is smaller and travels better through email.
Structuring a project KML
Structure is what separates a useful KML from a cloud of pins.
- One folder per company, one sub-folder per project. Anyone can switch a competitor on and off in one click.
- Consistent naming. Placemark names should be the asset ID that appears in the spreadsheet, so a pin on the screen can be found in the data.
- A description table. The placemark description can hold HTML. A small table with company, project, ID, coordinates and status turns each pin into a fact sheet when clicked.
- Styles that carry meaning. Give each project its own pin colour. Reserve red for problems: a red line between two turbines says "spacing violation" without a legend.
- Polygons for areas. A solar site should be a filled, semi-transparent polygon, not a set of corner pins. Draw both if the corner coordinates matter.
- Lines for relationships. A straight line between two turbines that are too close is the clearest way to show a clash.
Colours in KML
KML colours are written as aabbggrr, alpha first and then blue, green, red. This is the reverse of the CSS rrggbb convention. A fully opaque red is ff0000ff; a half-transparent blue is 80ff0000. Many "why is my polygon the wrong colour" problems are this byte order.
Generating KML from data
Hand-writing KML is only sensible for a few features. For a project, generate it.
- Google Earth Pro imports CSV directly and can export the result as KML, which works for simple point layers.
- QGIS exports any layer to KML with styling, and handles folders through layer groups.
- Scripts are the right choice for anything that regenerates. A few dozen lines of Python or JavaScript that read a coordinate table and write a structured KML with folders, styles and description tables will save hours on every revision.
Whichever route you take, keep the source of truth in a table or GIS layer and treat the KML as an export. Editing the KML by hand and then losing those edits on the next export is a familiar story.
Sharing and size
A few thousand placemarks are fine. Tens of thousands make Google Earth sluggish, so split large datasets into regional files or use network links. Use KMZ for email. Remember that a KML file contains every coordinate in plain text, so a master map of competitor assets should only go to people entitled to see it.
What reneGIS exports
reneGIS Windmill Micrositing exports KML with the structure above: a folder per company and project, colour-coded pins with a description table per asset, solar footprints drawn as polygons, and red connector lines between assets that violate spacing rules. Three export modes cover the usual needs: the full master map, a custom selection of companies, and a single asset with its clashing neighbours.
For a single point, the Coordinate Converter links straight into Google Maps and Apple Maps, and shows the location on an interactive map without any file at all.