Formats · 7 min read
KML vs Shapefile
Both formats carry points, lines and polygons, and both open almost everywhere. But they were built for different people, and each quietly drops something the other keeps. Here is how to pick the right one before you hit send.
Where they came from
KML (Keyhole Markup Language) was created for the program that became Google Earth, and was adopted as an open OGC standard in 2008. It is XML: a readable text file that describes not just shapes but how to draw them — colours, icons, labels, pop-up balloons, even camera views and tours. Zipped with its icons, it becomes a .kmz.
The Shapefile was published by Esri in the early 1990s and became the de facto exchange format of desktop GIS. It is binary, fast to read, and understood by every GIS package ever written. It describes data, not presentation: there is no styling in a Shapefile at all.
A Shapefile is never one file
This catches people out constantly. A "Shapefile" is a set of files with the same name and different extensions, and they must travel together:
| File | Holds | Needed? |
|---|---|---|
.shp | The geometry | Required |
.shx | An index into the geometry | Required |
.dbf | The attribute table | Required |
.prj | The coordinate system | Optional — but without it the layer may land in the wrong place |
.cpg | The text encoding of the table | Optional — without it accented names can garble |
Email only the .shp and the recipient gets nothing usable. Always zip the whole set. RICE reads a Shapefile as one .zip for exactly this reason.
What each one loses
Shapefile limits come from its 1990s dBase table:
- Field names are cut to 10 characters —
population_2022becomespopulation, and two long names can collide. - Each part of the set is limited to 2 GB.
- One geometry type per file — points and polygons cannot share a Shapefile.
- No true date-time fields, no lists, and no clean way to say "no value" versus zero.
KML limits come from being built for a globe viewer:
- Coordinates are always WGS 84 longitude/latitude. A layer surveyed in a local system is reprojected on the way in, and the original coordinates are gone.
- Attributes are loose text in
ExtendedDataor an HTML description; field types — number, date, integer — are often lost. - Files grow large fast: XML is verbose, and big KML files make Google Earth slow.
Side by side
| KML / KMZ | Shapefile | |
|---|---|---|
| Opens in Google Earth | Yes, directly | Only Google Earth Pro, via import |
| Opens in QGIS / ArcGIS | Yes | Yes |
| Coordinate systems | WGS 84 only | Any, declared in .prj |
| Styling | Built in | None |
| Attribute types | Mostly text | Typed, but 10-character names |
| Mixed geometry | Yes | No |
| Files to send | One | Three to five, zipped |
So which should you send?
- Send KML/KMZ to clients, landowners, community groups and anyone who will "just look at it". Google Earth opens it with a double-click, and your colours and labels come along.
- Send a zipped Shapefile to engineers, surveyors and GIS teams who will edit, measure or analyse the data — and to any government portal that still asks for one. Always include the
.prj. - Consider GeoPackage for anything large or with long field names. It is a single file, has no 2 GB or 10-character limits, and QGIS and ArcGIS both read it.
If you are unsure, send both. A KMZ for viewing and a zipped Shapefile for working costs you one extra conversion and saves a round of emails.
Drop either format into Convert. RICE warns you about field names that will be shortened, reprojects to WGS 84 for KML, and checks every feature made it across.
Open ConvertPublished by RICE, a LocalID Pty Ltd product. Questions or corrections: info@cartesiasa.com.
