KML vs GPX vs GeoJSON vs CSV: Choosing the Right Format for Your Location Data
Compare KML vs GPX vs GeoJSON vs CSV formats for location data. Learn which format fits your use case and export from Notion today.
KML vs GPX vs GeoJSON vs CSV - which format should you use? KML is best for Google Earth visualization, GPX for GPS devices and hiking apps, GeoJSON for web maps and APIs, and CSV for spreadsheet analysis. The right choice depends on your destination application, not the data itself.
When you export location data from Notion to Maps, you're faced with this choice. Each format has its own history, strengths, and ideal use cases. Understanding these differences helps you pick the right format for your specific needs, whether you're planning a hiking trip, building a web application, or analyzing data in a spreadsheet.
KML: The Visualization Powerhouse
Keyhole Markup Language, or KML, was originally developed by Keyhole Inc. before Google acquired the company in 2004. It became the native format for Google Earth and remains the go-to choice for rich geographic visualization. KML is an XML-based format that excels at describing not just where things are, but how they should look.
What sets KML apart is its support for styling and presentation. You can define custom icons, line colors, polygon fills, and even 3D models. KML also supports time-based animations, network links that fetch remote data, and hierarchical folder structures for organizing complex datasets. If you're creating a presentation layer for geographic data, especially one destined for Google Earth, KML is your format. Export your Notion database to KML to get started with Google Earth visualization.
The trade-off is complexity. KML files tend to be verbose, and parsing them requires handling XML namespaces and nested structures. For simple point data, KML might be overkill.
GPX: Built for the Trail
GPS Exchange Format, or GPX, emerged from the outdoor recreation community. It was designed specifically for transferring GPS data between devices and software. When you download a hiking route to your Garmin or upload a cycling track to Strava, you're likely working with GPX files.
GPX distinguishes between waypoints (individual points of interest), routes (planned paths), and tracks (recorded paths with timestamps). This makes it ideal for navigation and activity recording. The core format includes fields for elevation and timestamps, while extensions like Garmin's TrackPointExtension add support for heart rate and other fitness data.
Notion databases typically contain waypoints rather than tracks, so when you export from Notion to GPX, you get a clean list of waypoints ready for your GPS device. This is perfect for creating custom points of interest for road trips, geocaching adventures, or field research.
GeoJSON: The Web Developer's Choice for KML vs GPX vs GeoJSON Comparisons
GeoJSON arrived in 2008 as a lightweight alternative to the XML-heavy formats that dominated geographic data exchange. Built on JSON, it integrates seamlessly with JavaScript and modern web APIs. If you're building anything for the web, GeoJSON is almost certainly your best choice.
The format supports all standard geometry types: points, lines, polygons, and their multi-part variants. Each feature can carry arbitrary properties, making it flexible for any kind of attribute data. The structure is simple enough to read and write by hand, yet powerful enough for complex applications.
Every major web mapping library speaks GeoJSON natively. Leaflet, Mapbox GL, OpenLayers, and Google Maps all accept GeoJSON directly. This makes it trivial to fetch data from an API and render it on a map with just a few lines of code. When you export your Notion database as GeoJSON, you get a file ready to drop into any web mapping project.
One quirk worth noting: GeoJSON uses longitude-latitude order for coordinates, which is the opposite of what most people expect. This catches many developers off guard, but it follows the mathematical convention of x-y ordering.
CSV: Universal Compatibility
Comma-Separated Values is the oldest and simplest format in this comparison. It's just text with commas between values, readable by virtually any software ever created. Spreadsheet applications, databases, programming languages, and even text editors can work with CSV files.
For geographic data, CSV typically includes latitude and longitude columns alongside your other attributes. There's no standard structure, which means flexibility but also potential confusion. Some systems expect "lat,lon" while others want "longitude,latitude" or even "y,x" columns.
CSV shines when you need to analyze location data alongside other attributes. Import it into Excel for pivot tables, load it into a database for queries, or process it with pandas for statistical analysis. Export your Notion places to CSV when you need maximum compatibility. The format's simplicity also makes it easy to transform into other formats programmatically.
Quick Comparison
| Format | Best For | Styling | Complexity | Web Ready |
|---|---|---|---|---|
| KML | Google Earth, presentations | Full support | High | Limited |
| GPX | GPS devices, navigation | None | Medium | No |
| GeoJSON | Web maps, APIs | Via code | Low | Yes |
| CSV | Spreadsheets, analysis | None | Minimal | Via conversion |
Making Your Choice
Choose KML when your destination is Google Earth or you need rich styling baked into the file. Choose GPX when you're loading waypoints onto a GPS device or sharing routes with outdoor apps like Gaia GPS or AllTrails. Choose GeoJSON when you're building for the web or working with modern mapping APIs. Choose CSV when you need maximum compatibility or plan to analyze the data in spreadsheets or databases.
The good news is that Notion to Maps exports all four formats from the same source data. You can export GeoJSON for your web map, GPX for your hiking GPS, and CSV for your spreadsheet analysis, all from a single Notion database. There's no need to choose just one.
Frequently Asked Questions
Which format is best for web maps?
GeoJSON is the best format for web maps. Every major mapping library including Leaflet, Mapbox GL JS, OpenLayers, and Google Maps API supports GeoJSON natively. You can parse it with standard JSON.parse() in JavaScript without any special libraries, and the format integrates seamlessly with modern web development workflows.
Can I convert between KML, GPX, and GeoJSON?
Yes, you can convert between all these formats. Tools like GDAL/ogr2ogr handle conversions on the command line, while online converters like MyGeodata or GPS Visualizer offer browser-based conversion. However, some data may be lost in conversion since each format supports different features. KML styling information won't transfer to GPX, for example. The easiest approach is exporting directly to your needed format from Notion to Maps rather than converting afterward.
What's the difference between GeoJSON and TopoJSON?
GeoJSON stores complete geometry for each feature independently, while TopoJSON encodes topology by storing shared boundaries once. TopoJSON files are typically 80% smaller than equivalent GeoJSON for polygon data like country borders. However, TopoJSON requires a library to decode back to GeoJSON before use with most mapping libraries. For point data from Notion databases, GeoJSON is the better choice since there's no topology to optimize.
Which format does Google Earth use?
Google Earth uses KML (Keyhole Markup Language) as its native format. KML was developed by Keyhole Inc., which Google acquired in 2004. Google Earth also supports the compressed KMZ format, which is simply a zipped KML file. If you're planning to visualize your Notion locations in Google Earth, export to KML for the best experience with full styling support.
How do I validate my GeoJSON file?
Use geojsonlint.com for quick browser-based validation, or geojson.io to both validate and visualize your data on a map. For programmatic validation, the geojson-validation npm package or Python's geojson library can check files against the RFC 7946 specification. Common issues include incorrect coordinate order (should be longitude, latitude), missing required fields like "type", and invalid geometry such as polygons that don't close properly.