Every position is longitude first
A position is [longitude, latitude], in that order, on WGS 84. It is the single most common mistake in a hand-written file, because a map screen, a GPS log and most APIs say latitude first, and because a swapped pair is a valid position somewhere else on earth rather than an error. The range check catches only the pairs where one number is impossible as a longitude, which is why the bounding box is printed next to the drawing: a shape at 37 degrees of longitude and 127 of latitude is a real place in Korea, and it is not where the author meant.
An altitude may follow as a third number, and nothing else may. Four numbers in a position is a file from a database export, not a GeoJSON document, and a reader that silently accepts it will lose the fourth number somewhere downstream.
The type is the nesting
A Point is one position, a LineString is an array of positions, a Polygon is an array of rings and each ring is an array of positions. MultiPoint, MultiLineString and MultiPolygon add exactly one more level. There is no separate declaration of dimension: the depth of the arrays is the type, and a file whose arrays are one level off is either invalid or silently drawn as something else by a forgiving library. GeometryCollection is the one type that holds other geometries rather than coordinates, which is why it needs a different check.
| Type | Depth | A minimal valid shape |
| Point | 1 | [127.0, 37.5] |
| LineString | 2 | two positions |
| Polygon | 3 | one closed ring of four positions |
| MultiPolygon | 4 | an array of polygons |
Rings have three rules and one convention
A ring must repeat its first position as its last, must contain at least four positions, and is written counter-clockwise for an outer ring and clockwise for a hole. The first two are in the specification and are checked here. The third is a convention that the specification recommends and that most renderers ignore, deriving inside from outside by a point-in-polygon test instead. When a polygon fills the wrong side of its own outline, the winding is the first thing to look at even though no validator will complain.
Length and area on a sphere
A length here is the sum of haversine distances between consecutive positions, with the earth's mean radius. That is accurate to about half a percent for the distances a line drawn by hand usually has, which is far better than the difference between a line that follows a road and one that does not. An area is the spherical excess of the ring, with holes subtracted, and it stays correct across the equator and the antimeridian where a planar formula does not. Both are approximations of an ellipsoid by a sphere; for a survey boundary the difference matters and for a delivery area it does not.
Why the preview is not a map
An equirectangular preview draws longitude as a straight horizontal axis and latitude as a straight vertical one, scaled by the cosine of the centre latitude. It has no coastlines, no tiles and no projection database, so it cannot show you where a shape is, only what shape it is and how its parts sit together. That is the right trade for this page: a projection library is several hundred kilobytes, the check is not, and the numbers beside the drawing carry the part a picture cannot.
When the trouble is the JSON rather than the geometry, Pikkola JSON formats and validates the same document. When the coordinates arrive as a table, Pikkola CSV reads that first.