GeoJSON stands for Geographic JSON—it's a format for encoding geographic data structures using JSON (JavaScript Object Notation).
In short, it's a way to represent points, lines, shapes, and features on a map using a structure that's easy to read, share, and use in code.
A GeoJSON object usually includes:
"Feature"
, "Point"
, "Polygon"
, etc.)json
CopyEdit
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-73.9857, 40.7484]
},
"properties": {
"name": "Empire State Building",
"city": "New York"
}
}
"Feature"
means this is a single mappable thing."Point"
is the type of shape.coordinates
are [longitude, latitude]
.GeoJSON supports several geometry types:
"Point"
– A single location"LineString"
– A path (like a road)"Polygon"
– An area (like a park or country)"MultiPoint"
/ "MultiPolygon"
/ "MultiLineString"
– Groups of those"GeometryCollection"
– A mix of multiple geometry typesAn object literal is just a basic JSON object—a set of key-value pairs used to represent any kind of data.
A GeoJSON Feature is a structured object used specifically to represent geographic data. It follows a standard format, so that mapping tools can understand and render it properly.
Feature | Object Literal | GeoJSON Feature |
---|---|---|
Purpose | Generic data | Geospatial data |
Structure | Flexible | Must follow GeoJSON format |
Must include | Nothing specific | type , geometry , properties |
Can include location? | Yes, but custom format | Yes, standardized format |
Mapping tools compatible? | Not directly | Yes! Fully supported |
When working with geographic data on maps, it’s important to understand the difference between unprojected and projected geometries. GeoJSON stores coordinates in an unprojected format—specifically, latitude and longitude values based on the WGS84 coordinate system. However, for accurate measurements, transformations, and on-screen rendering, those coordinates often need to be projected into a flat, Cartesian coordinate system. This section explains how and why that projection happens, and how it affects geometry manipulation in real-world mapping tools.
GeoJSON typically uses geographic coordinates:
[ -73.9857, 40.7484 ]
(NYC-ish)json
CopyEdit
{
"type": "Point",
"coordinates": [-73.9857, 40.7484]
}
But these are not Cartesian—they're on a curved Earth (spherical or ellipsoidal)
<aside> 👉
Learn more about setting your project’s projection in Set the project CRS
</aside>
This would be the same location as before, but now in projected meters (e.g., Web Mercator).
json
CopyEdit
{
"type": "Point",
"coordinates": [1335832.46, 6261723.78]
}
So when we say "Cartesian" in mapping, we’re usually talking about projected coordinates—flattened into an (x, y) system.
Purpose | Use Unprojected (GeoJSON) | Use Projected (Cartesian) |
---|---|---|
Data storage & exchange | ✅ GeoJSON is always unprojected | ❌ Not common |
Web maps | ✅ GeoJSON input | Internally projected to screen coords |
Distance, area, buffer | ❌ Not accurate | ✅ Required for correct math |
GIS software (QGIS, ArcGIS) | ✅ Can import | ✅ Projects automatically for analysis |
Rendering on canvas or SVG | ❌ | ✅ Needed for pixel-perfect drawing |