Menu

1 / 5

geojson-editor: a browser GeoJSON viewer, editor and RFC 7946 validator I built to learn

DEV Community: frontend·Abdeldjalil Chougui·3 days ago
#yaj1nN7u
#devtofrontend#devto#dev#editor#geojson
Long article (1224 words) — no AI summary yet.
Reading 0:00
15s threshold

GeoJSON looks simple: it is JSON with coordinates in it. Then a file refuses to load somewhere, and you find out how many small rules sit behind that simplicity. A polygon ring that does not close. Latitude and longitude in the wrong order. A ring wound the wrong way. A crs member that the current specification no longer allows.

To learn those rules properly, I built the tool I would want when a file misbehaves. geojson-editor is a small browser-based GeoJSON viewer, editor and validator, made with MapLibre GL JS and terra-draw. Everything runs in the browser and nothing is uploaded.

It is a learning project. The interesting part is not the map; it is the pure logic underneath it and the decisions about who owns the data.

What it does

Load from anywhere. Pick a file, drag and drop one on the map, give it a URL (the server must allow CORS) or paste text. A bare Geometry or a single Feature is wrapped into a FeatureCollection, so you always work on the same shape of document.

Draw and edit.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.