🌎 GeoFan
Appearance
Language

What is GeoJSON? And How We Use It at Geofan.org

·
Technology

What is GeoJSON? A Simple Guide to the Language of Digital Maps

Have you ever used Google Maps to find the nearest coffee shop, looked up a national park's boundary, or tracked a running route on an app? If so, you've interacted with the work of a hidden but powerful tool that tells your screen exactly what to draw. That tool is often GeoJSON.

In the simplest terms, GeoJSON is like a digital recipe for a map. It’s a way of writing down geographic information in a standardized text format that computers and web browsers can easily understand and use to draw points, lines, and shapes on a map.


The "JSON" Part: Just Organized Text

The "JSON" part stands for JavaScript Object Notation, which sounds technical, but the concept is very simple. Think of it as a way to organize information using labels.

Imagine you have a business card. It has labels and information:

  • Name: John Smith
  • Company: GeoFan.org
  • Email: john@geofan.org

A computer would write this in JSON format using curly braces {} and key-value pairs:

{
  "name": "John Smith",
  "company": "GeoFan.org",
  "email": "john@geofan.org"
}

That’s it! It’s just a clean, predictable way to list information. Because it’s so organized, any program that understands JSON can instantly read the "name" or the "email." The simple JSON format is widely used for data exchange on the web, making it easy to share information between different systems and applications.


The "Geo" Part: Drawing on the Map 🗺️

This is where it gets interesting. GeoJSON uses the same simple, organized text format to describe geographic shapes. There are three main building blocks you’ll encounter.

1. Point

A Point is the simplest shape—it's just a single spot on the Earth. It's defined by a pair of coordinates: [longitude, latitude]. A Point is perfect for marking things like:

  • A specific building (like the Eiffel Tower)
  • A city on a world map
  • The location of a single coffee shop

2. LineString

A LineString is what you get when you connect a series of points, like a game of connect-the-dots. It's used to represent things that have length but not area, such as:

  • A road or a highway
  • A river's path
  • A hiking trail or a marathon route

3. Polygon

A Polygon is like a LineString, but the last point connects back to the first point, closing the shape. This creates an enclosed area. Polygons are used to define boundaries for things like:

  • A country or state
  • A national park's territory
  • The outline of a lake

Putting It All Together: Features and Properties

Now, a shape on a map is not very useful on its own. If you see a dot on a map, you want to know what it is. Is it a restaurant? A museum? A train station?

This is where Properties come in. Every shape in GeoJSON is usually bundled with a list of properties that describe it.

A complete GeoJSON object is called a Feature. A Feature contains two main parts:

  1. Geometry: The shape itself (a Point, LineString, or Polygon).
  2. Properties: The descriptive information about that shape (like the business card info we saw earlier).

For example, here’s a simplified GeoJSON Feature for the White House:

{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [-77.0365, 38.8977] 
  },
  "properties": {
    "name": "The White House",
    "address": "1600 Pennsylvania Avenue NW, Washington, D.C."
  }
}

Even if you’ve never seen code before, you can probably read that and understand exactly what it represents: a point on a map with a name and an address.


Why we use GeoJSON, and how we use it at Geofan.org

Computers excel at processing structured data—data that follows a specific, predictable format. Once data is structured, it can be easily exported from one system and imported into another, allowing different applications to understand and work with the same information. GeoJSON is a perfect example of this.

Here at Geofan.org, we chose GeoJSON as our standard for its simplicity, readability, and wide support across web-based mapping applications. This ensures a consistent and user-friendly experience across all our tools.

For example, when you use our MapAnnotate to draw on a map, the markers, shapes, and lines you create can be saved as GeoJSON files, next time if you want to edit them again, you can simply load the GeoJSON file back into the tool. Beyond that, you can also share your GeoJSON files with others, who can then import them into their own mapping tools or applications.

Our Map River Mark tool can automatically detect river paths, Map Mountain Mark support automatic mountain peak detection, for both tools, after the detection is done, you can click the export button to download the river paths as a GeoJSON file, and then you can use that file in other GIS software or mapping applications.

The drawings you see on the map are just a visual representation of the underlying GeoJSON data. This separation of data from visualization provides greater flexibility and interoperability.

Although there are many other formats for storing geographic data, such as KML, GPX, and Shapefiles, we choose GeoJSON for its simplicity, readability, and wide support across web-based mapping applications. Throughout our website, as much as possible, we use GeoJSON as a standard, so that users will not be confused by different formats.

GeoJSON in Action with Our Tools

Map Annotate: You can draw points, lines, and shapes on a map visually, and then export your drawings as a GeoJSON file. You can also import a GeoJSON file to edit it further.

For example, after you create a marker on the map, you can click the export button to download the GeoJSON file.

Create a marker on map visually Create a marker on map visually

The marker you saw on the map can be exported as GeoJSON The marker you saw on the map can be exported as GeoJSON

Our Map River Mark tool automatically detects river paths, and our Map Mountain Mark tool does the same for mountain peaks. With both tools, once the detection is complete, you can click the export button to download the results as a GeoJSON file.

Click download button to export GeoJSON Click download button to export GeoJSON

This exported file can then be used in other GIS software or imported back into our Map Annotate tool for further editing and customization.

Conclusion

GeoJSON turns complex geographical information into simple, structured text. It's a universal language that allows us to easily create, share, and visualize spatial data across different platforms. Whether you're marking a single location or outlining an entire country, GeoJSON provides a clear and organized way to bring the world to your screen.