Free Geometry Test Data
A copy-paste corpus of sample geometry — 66 valid samples and 37 invalid-on-purpose samples across 12 formats. These are the exact fixtures our 471-test suite runs against. Every valid sample is annotated with the format our engine detects and the geometry it parses to; every broken one is paired with the verbatim error message our parser or validator produces — so you can see, in plain language, what is actually wrong with it.
Grab any sample with the Copy button, or hit Open in Inspector to load it into the universal inspector — detected, validated, converted to every other format, and drawn on a map. Nothing you copy or open here is uploaded anywhere; the geometry travels only in the URL hash fragment.
GeoJSON
RFC 7946 JSON — the lingua franca of web maps. Points through GeometryCollections, plus Feature/FeatureCollection wrappers.
Valid samples
-
point.geojsonGeoJSON PointPoint
{ "type": "Point", "coordinates": [-73.9857, 40.7484] } -
linestring.geojsonGeoJSON LineStringLineString
{ "type": "LineString", "coordinates": [[-0.1276, 51.5072], [2.3522, 48.8566], [12.4964, 41.9028]] } -
polygon.geojsonGeoJSON PolygonPolygon with one interior ring (hole)
{ "type": "Polygon", "coordinates": [ [[-87.63, 41.88], [-87.62, 41.88], [-87.62, 41.89], [-87.63, 41.89], [-87.63, 41.88]] ] } -
geometrycollection.geojsonGeoJSON GeometryCollectionGeometryCollection
display truncated — full value copies{ "type": "GeometryCollection", "geometries": [ { "type": "Point", "coordinates": [30.0, 10.0] }, { "type": "LineString", "coordinates": [[10.0, 10.… -
feature.geojsonGeoJSON PointA Feature wrapping a geometry + properties
{ "type": "Feature", "properties": { "name": "Statue of Liberty" }, "geometry": { "type": "Point", "coordinates": [-74.0445, 40.6892] } } -
featurecollection-single.geojsonGeoJSON PointA FeatureCollection
display truncated — full value copies{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "type": "Point", "coordinates": [139… -
out-of-range-lat.geojsonGeoJSON PointSyntactically valid JSON — but open it to watch the validator flag the out-of-range latitude
{ "type": "Point", "coordinates": [40.7484, 200.0] }
Invalid on purpose
-
unknown-type.geojsonfails to parseThe "type" member is "Banana", not one of the seven GeoJSON geometry types.
{ "type": "Banana", "coordinates": [1, 2] }Our parser says"Banana" is not a GeoJSON geometry type. Expected one of: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection.
-
not-json.txtfails to parseThe JSON is truncated — a bracket is never closed, so it will not even parse as JSON.
{ "type": "Point", "coordinates": [1, 2Our parser saysInvalid JSON: Expected ',' or ']' after array element in JSON at position 39 (line 1 column 40). GeoJSON must be well-formed JSON.
-
missing-coordinates.geojsonfails to parseA Point object with no "coordinates" member.
{ "type": "Point" }Our parser saysPoint is missing its "coordinates" member.
-
null-feature-geometry.geojsonfails to parseA Feature whose geometry is null — legal per RFC 7946, but there is nothing to inspect.
{ "type": "Feature", "properties": {}, "geometry": null }Our parser saysThis GeoJSON Feature has a null geometry — nothing to inspect.
WKT
Well-Known Text — the human-readable OGC form (what PostGIS ST_AsText returns). Case-insensitive keywords, EMPTY geometries, and Z coordinates all round-trip.
Valid samples
-
point.wktWKT PointPoint
POINT (30 10) -
linestring.wktWKT LineStringLineString
LINESTRING (30 10, 10 30, 40 40) -
polygon.wktWKT PolygonPolygon with a hole
POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30)) -
multipolygon.wktWKT MultiPolygonMultiPolygon
MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5))) -
geometrycollection.wktWKT GeometryCollectionGeometryCollection
GEOMETRYCOLLECTION (POINT (4 6), LINESTRING (4 6, 7 10)) -
point-z.wktWKT PointPoint Z (3D)
POINT Z (30 10 5) -
point-empty.wktWKT PointPOINT EMPTY — the empty geometry
POINT EMPTY
Invalid on purpose
-
unclosed-paren.wktfails to parseThe coordinate list is never closed — a parenthesis is missing at the end.
POLYGON ((30 10, 40 40, 20 40, 10 20Our parser saysExpected ")" to close a coordinate list — check for a missing or unbalanced parenthesis at the end of the input.
-
bad-keyword.wktfails to parse"CIRCLE" is not a WKT geometry keyword.
CIRCLE (30 10)Our parser saysExpected a WKT geometry keyword (POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, or GEOMETRYCOLLECTION) near "CIRCLE (30 10)".
-
missing-coord.wktfails to parseA coordinate pair is missing a value.
POINT (30)Our parser saysExpected a coordinate (e.g. "30 10") near "30)" — a value looks missing or malformed.
EWKT
Extended WKT — WKT with an "SRID=<n>;" prefix, PostGIS’s native text output. The SRID rides along in the parsed geometry.
Valid samples
-
point.ewktEWKT PointPoint, SRID=4326 (WGS84)
SRID=4326;POINT (30 10) -
point-3857.ewktEWKT PointPoint tagged SRID=3857 (Web Mercator)
SRID=3857;POINT (30 10)Parser warningSRID 3857 is not WGS84 — coordinates were NOT reprojected. Conversions to other formats will carry these raw values and are almost certainly wrong. Reproject to EPSG:4326 first.
-
polygon.ewktEWKT PolygonPolygon with an SRID prefix
SRID=4326;POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10)) -
geometrycollection.ewktEWKT GeometryCollectionGeometryCollection with an SRID prefix
SRID=4326;GEOMETRYCOLLECTION (POINT (4 6), LINESTRING (4 6, 7 10))
Invalid on purpose
-
missing-srid.ewktfails to parseNo "SRID=…;" prefix — this is plain WKT, not EWKT.
POINT (30 10)Our parser saysEWKT must begin with an "SRID=<number>;" prefix, e.g. "SRID=4326;POINT (30 10)". This looks like plain WKT — use the WKT format instead.
-
bad-srid.ewktfails to parseThe SRID prefix is malformed, so the EWKT header cannot be read.
SRID=abc;POINT (30 10)Our parser saysEWKT must begin with an "SRID=<number>;" prefix, e.g. "SRID=4326;POINT (30 10)". This looks like plain WKT — use the WKT format instead.
WKB
Well-Known Binary — the compact hex (or base64) bytes spatial databases store and exchange. Both byte orders, Z coordinates, and base64 payloads are covered.
Valid samples
-
point.hexWKB PointPoint, little-endian hex
01010000000000000000003e400000000000002440 -
point-bigendian.hexWKB PointPoint, big-endian (byte-order flag 00)
0000000001403e0000000000004024000000000000 -
point-z.hexWKB PointPoint Z (3D)
01e90300000000000000003e4000000000000024400000000000001440 -
linestring.hexWKB LineStringLineString
0102000000030000000000000000003e40000000000000244000000000000024400000000000003e4000000000000044400000000000004440 -
polygon.hexWKB PolygonPolygon
display truncated — full value copies0103000000020000000500000000000000008041400000000000002440000000000080464000000000008046400000000000002e40000000000000444000000000000024400000000000003440000000… -
multipolygon.hexWKB MultiPolygonMultiPolygon
display truncated — full value copies010600000002000000010300000001000000040000000000000000003e40000000000000344000000000008046400000000000004440000000000000244000000000000044400000000000003e400000… -
geometrycollection.hexWKB GeometryCollectionGeometryCollection
display truncated — full value copies01070000000200000001010000000000000000003e4000000000000024400102000000030000000000000000002440000000000000244000000000000034400000000000003440000000000000244000… -
point-base64.txtWKB PointPoint encoded as base64 instead of hex
AQEAAAAAAAAAAAA+QAAAAAAAACRA
Invalid on purpose
-
bad-endian.hexfails to parseThe first byte is neither 00 nor 01, so the byte order is undefined.
4a010000000000000000003e400000000000002440Our parser saysByte 0 must be 00 (big-endian) or 01 (little-endian), got 4A — is this actually a geohash or some other plain-hex value rather than WKB?
-
odd-hex.hexfails to parseAn odd number of hex digits — the final byte is only half specified.
010100000Our parser saysHex input has an odd number of digits (9); every WKB byte is exactly two hex digits, so the last one is incomplete.
-
truncated.hexfails to parseThe buffer ends mid-coordinate — a partial copy/paste.
0101000000000000000000003e40Our parser saysWKB buffer is truncated: it ran out of bytes while reading coordinate data (decoded 14 bytes total). Re-copy the full value — a partial paste is the usual cause.
-
unknown-type.hexfails to parseThe geometry-type field is 99, which is not a known WKB type.
01630000000000000000003e400000000000002440Our parser saysBytes 1–4 encode geometry type 99 (0x00000063), which is not a known WKB type. Expected 1–7 (Point…GeometryCollection), optionally +1000/2000/3000 for Z/M/ZM, or with EWKB high-bit flags.
EWKB
Extended WKB — WKB carrying an embedded SRID (the high-bit flag PostGIS ST_AsEWKB sets).
Valid samples
-
point.hexEWKB PointPoint with an embedded SRID
0101000020e61000000000000000003e400000000000002440 -
point-srid3857.hexEWKB PointPoint tagged SRID=3857
0101000020110f00000000000000003e400000000000002440Parser warningSRID 3857 is not WGS84 — coordinates were NOT reprojected. Conversions to other formats will carry these raw values and are almost certainly wrong. Reproject to EPSG:4326 first.
-
point-z.hexEWKB PointPoint Z with an embedded SRID
01010000a0e61000000000000000003e4000000000000024400000000000001440 -
polygon.hexEWKB PolygonPolygon with an embedded SRID
display truncated — full value copies0103000020e6100000020000000500000000000000008041400000000000002440000000000080464000000000008046400000000000002e400000000000004440000000000000244000000000000034… -
point-base64.txtEWKB PointEWKB Point as base64
AQEAACDmEAAAAAAAAAAAPkAAAAAAAAAkQA==
Invalid on purpose
-
srid-flag-missing-bytes.hexfails to parseThe header sets the SRID flag but the buffer ends before the four SRID bytes.
0101000020Our parser saysEWKB header sets the SRID flag (0x20000000) but the buffer ends at byte 5, before the 4 SRID bytes that must follow the type at offset 5–8.
TWKB
Tiny WKB — a quantized, delta-encoded binary designed to shrink geometry on the wire. Precision is embedded in the header.
Valid samples
-
point.twkbTWKB PointPoint
a1009fb1d60bd087cd03 -
point-precision2.twkbTWKB PointPoint at precision 2 (coarser quantization)
4100a3bf01823b -
linestring.twkbTWKB LineStringLineString
a200039fb1d60bd087cd03cf0fce0fcf0fd00f -
polygon.twkbTWKB PolygonPolygon
a30002059fb1d60bd087cd03a01f00009e1f9f1f00009d1f05e807e607d00f0000ce0fcf0f0000cd0f -
multipolygon.twkbTWKB MultiPolygonMultiPolygon
a6000201049fb1d60bd087cd03a01f00009e1f9f1f9d1f0104ff7ccf8902a01f00009e1f9f1f9d1f -
geometrycollection.twkbTWKB GeometryCollectionGeometryCollection
a70002a1009fb1d60bd087cd03a200029fb1d60bd087cd03cf0fce0f
Invalid on purpose
-
truncated-varint.twkbfails to parseA varint’s continuation bit is set but the buffer ends — the value never completes.
a100ffOur parser saysTruncated TWKB: a varint starting at byte 2 runs past the end of the 3-byte buffer (a continuation bit is set but no byte follows).
-
bad-type-nibble.twkbfails to parseThe geometry-type nibble is 8; TWKB types only run 1–7.
0800Our parser saysByte 0 has geometry-type nibble 8; TWKB types are 1–7 (Point…GeometryCollection). This is not valid TWKB.
Encoded Polyline
Google/OSRM encoded polyline route strings — precision 5 (Directions API) and precision 6 (OSRM, Valhalla). Detection tells the two precisions apart.
Valid samples
-
google-p5.txtEncoded Polyline (precision 5) LineStringThe canonical Google precision-5 example
_p~iF~ps|U_ulLnnqC_mqNvxq`@ -
negative-p5.txtEncoded Polyline (precision 5) LineStringRoute with negative coordinates
r~ckEbrinLchA{sB -
antimeridian-p5.txtEncoded Polyline (precision 5) LineStringA route that crosses the ±180° antimeridian
_syqK_v_ia@_pR~l`scA -
single-point-p5.txtEncoded Polyline (precision 5) PointA degenerate one-point polyline
_p~iF~ps|UParser warningEncoded polyline decoded to a single coordinate; produced a Point instead of a LineString.
-
osrm-p6.txtEncoded Polyline (precision 6) LineStringOSRM precision-6 (higher resolution)
qikdcBwbepX}eWgcO`bKuk|@
Invalid on purpose
-
illegal-char.txtfails to parseContains a character outside the encoded-polyline alphabet (ASCII 63–126).
_p~i5FOur parser saysCharacter "5" (code 53) at position 4 is not a valid encoded-polyline character. Only ASCII 63–126 ('?'–'~') are used; digits, spaces, and quotes never appear.
-
truncated-escape.txtfails to parseEnds mid-character — the final byte expects a continuation that never arrives.
_p~idOur parser saysTruncated escape sequence: the polyline ends mid-character (its final byte expects a continuation). The string is incomplete.
Geohash
Base-32 strings naming a rectangular cell; each extra character zooms into a smaller cell. Single hashes and whitespace/comma-separated lists.
Valid samples
-
single-9q8yy.txtGeohash PolygonA 5-character geohash (San Francisco area)
9q8yyParser warningGeohash "9q8yy" denotes a grid cell (its bounding box at precision 5), not a hand-drawn polygon — the geometry shown is the cell's extent.
-
single-ezs42.txtGeohash PolygonThe classic Wikipedia example geohash
ezs42Parser warningGeohash "ezs42" denotes a grid cell (its bounding box at precision 5), not a hand-drawn polygon — the geometry shown is the cell's extent.
-
single-long.txtGeohash PolygonA high-precision (long) geohash
u4pruydqqvjParser warningGeohash "u4pruydqqvj" denotes a grid cell (its bounding box at precision 11), not a hand-drawn polygon — the geometry shown is the cell's extent.
-
multi-comma.txtGeohash MultiPolygonSeveral geohashes, comma-separated
dr5ru, 9q8yyParser warning2 geohashes were expanded to their grid-cell bounding boxes (a MultiPolygon of cells), not hand-drawn polygons.
Invalid on purpose
-
contains-a.txtfails to parseContains "a" — the geohash alphabet omits a, i, l and o to avoid look-alikes.
ezsa2Our parser says"a" is not a valid geohash character (position 3). The geohash alphabet omits a, i, l and o to avoid look-alike confusion. Valid characters are: 0123456789bcdefghjkmnpqrstuvwxyz.
-
contains-i.txtfails to parseContains "i", which is not in the geohash alphabet.
9q8iyOur parser says"i" is not a valid geohash character (position 3). The geohash alphabet omits a, i, l and o to avoid look-alike confusion. Valid characters are: 0123456789bcdefghjkmnpqrstuvwxyz.
-
too-long.txtfails to parse13 characters — beyond the 12-character maximum precision.
0123456789bcdOur parser saysGeohash "0123456789bcd" is 13 characters; the maximum precision is 12. Trim it to 12 characters or fewer.
H3 Cell
Uber’s hexagonal hierarchical index — 15-character hex cell ids. Includes a pentagon (every H3 resolution has twelve) and the finest resolution.
Valid samples
-
res0-hexagon.txtH3 Cell PolygonA resolution-0 base cell (hexagon)
8001fffffffffffParser warningH3 index 8001fffffffffff rendered as its resolution-0 cell boundary polygon. H3 cells are areas on the grid, not points.
-
pentagon-res0.txtH3 Cell PolygonA resolution-0 pentagon (the odd cell out)
8009fffffffffffParser warningH3 index 8009fffffffffff rendered as its resolution-0 cell boundary polygon. H3 cells are areas on the grid, not points.
-
res9.txtH3 Cell PolygonA resolution-9 cell
8928308280fffffParser warningH3 index 8928308280fffff rendered as its resolution-9 cell boundary polygon. H3 cells are areas on the grid, not points.
-
res15.txtH3 Cell PolygonA resolution-15 cell (finest)
8f2830828052d25Parser warningH3 index 8f2830828052d25 rendered as its resolution-15 cell boundary polygon. H3 cells are areas on the grid, not points.
-
uppercase.txtH3 Cell PolygonUppercase hex — accepted
8928308280FFFFFParser warningH3 index 8928308280fffff rendered as its resolution-9 cell boundary polygon. H3 cells are areas on the grid, not points.
-
multi.txtH3 Cell MultiPolygonSeveral H3 indexes together
8928308280fffff, 8928308280bffff 89283082873ffffParser warning3 H3 indexes rendered as their cell boundary polygons (MultiPolygon). H3 cells are areas on the grid, not points.
Invalid on purpose
-
wrong-length.txtfails to parse13 hex characters — an H3 index must be exactly 15.
8928308280fffOur parser says"8928308280fff" is not a valid H3 cell index. H3 indexes are 15-character hex strings with a specific bit layout (e.g. "8928308280fffff").
-
not-hex.txtfails to parseContains non-hex characters.
622236721futureOur parser says"622236721future" is not a valid H3 cell index. H3 indexes are 15-character hex strings with a specific bit layout (e.g. "8928308280fffff").
-
integer.txtfails to parseA short decimal integer — not the 15-char hex layout H3 requires.
123456789Our parser says"123456789" is not a valid H3 cell index. H3 indexes are 15-character hex strings with a specific bit layout (e.g. "8928308280fffff").
S2 Cell
Google’s spherical quad-cell tokens (the grid behind geofencing and Pokémon GO wayspots). Levels 0–30, in both hex-token and decimal-id forms.
Valid samples
-
level0-face.txtS2 Cell PolygonA level-0 face cell (one sixth of the globe)
9 -
level14.txtS2 Cell PolygonA level-14 cell
89c25a23 -
level17.txtS2 Cell PolygonA level-17 cell
89c25a220c -
level20.txtS2 Cell PolygonA level-20 cell
89c25a220cf -
level30-leaf.txtS2 Cell PolygonA level-30 leaf cell (finest)
89c25a220cf80969 -
decimal-level17.txtS2 Cell PolygonA level-17 cell as a decimal cell id (not a hex token)
9926595630954708992 -
multi-token.txtS2 Cell MultiPolygonSeveral S2 tokens together
89c25a220c 89c25a2214
Invalid on purpose
-
invalid-cell-token.txtfails to parseValid hex, but it does not decode to a real S2 cell.
ffffffffffffffffOur parser says"ffffffffffffffff" is not a valid S2 cell token. It is hex but does not decode to a real cell.
-
non-hex.txtfails to parseContains a "z" — not a hex token and not a decimal id.
89c25z3Our parser says"89c25z3" is not an S2 cell — a token is hex (0–9, a–f) and a cell id is decimal digits.
Lat/Lng Text
Loose "lat, lng" pairs copied straight from a maps app or a spreadsheet — labeled, bracketed, semicolon- or newline-separated. The parser is deliberately forgiving.
Valid samples
-
labeled-pair.txtLat/Lng Text Point"lat: …, lng: …" labeled pair
lat: 41.8781, lng: -87.6298 -
google-maps-paste.txtLat/Lng Text PointPasted straight from Google Maps
41.8781, -87.6298Parser warningBoth values are ≤90; interpreted as latitude,longitude — use the override if this is lng,lat data.
-
bracketed-tuple.txtLat/Lng Text PointA bracketed [lat, lng] tuple
[41.8781, -87.6298]Parser warningBoth values are ≤90; interpreted as latitude,longitude — use the override if this is lng,lat data.
-
semicolon-pair.txtLat/Lng Text PointSemicolon-separated pair
41.8781; -87.6298Parser warningBoth values are ≤90; interpreted as latitude,longitude — use the override if this is lng,lat data.
-
multiline-route.txtLat/Lng Text LineStringSeveral points, one per line
41.8781, -87.6298 40.7128, -74.0060 34.0522, -118.2437Parser warningBoth values are ≤90; interpreted as latitude,longitude — use the override if this is lng,lat data.
-
ambiguous-order.txtLat/Lng Text PointBoth values ≤ 90° so the order is ambiguous — open it to see the warning
41.8781, 12.4964Parser warningBoth values are ≤90; interpreted as latitude,longitude — use the override if this is lng,lat data.
Invalid on purpose
-
out-of-range.txtfails to parseBoth numbers exceed 90°, so neither can be a latitude.
200, 300Our parser saysBoth values (200, 300) exceed 90°, so neither can be a latitude — this does not look like a latitude,longitude pair.
-
odd-count.txtfails to parseAn odd number of values — coordinates come in pairs, so one is missing.
41.8781, -87.6298, 40.7128Our parser saysFound 3 numbers — an odd count. Coordinates come in latitude,longitude pairs; one value is missing.
Invalid-on-purpose geometry (semantic)
These parse as perfectly good GeoJSON, then fail our semantic validator. This is the section the "why is my GeoJSON invalid?" searches are looking for: winding-order violations, unclosed rings, self-intersections, swapped coordinates and antimeridian crossings — each printed with the validator’s stable issue code and verbatim message.
Valid samples
-
clean.geojsonGeoJSON PolygonThe baseline: a correct CCW polygon that passes validation with no issues
{ "type": "Polygon", "coordinates": [ [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[1, 1], [1, 3], [3, 3], [3, 1], [1, 1]] ] }
Invalid on purpose
-
winding-cw-exterior.geojsonfails validationThe exterior ring is clockwise; RFC 7946 wants exterior rings counterclockwise.
{ "type": "Polygon", "coordinates": [ [[0, 0], [0, 4], [4, 4], [4, 0], [0, 0]] ] }Validator ·winding-order· warning · one-click fix:rewindWinding order — ring 1 (exterior) is clockwise, but RFC 7946 wants exterior rings counterclockwise. Most renderers tolerate it; rewind to comply.
-
winding-ccw-hole.geojsonfails validationThe hole (interior ring) is counterclockwise; RFC 7946 wants holes clockwise.
{ "type": "Polygon", "coordinates": [ [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[1, 1], [3, 1], [3, 3], [1, 3], [1, 1]] ] }Validator ·winding-order· warning · one-click fix:rewindWinding order — ring 2 (hole) is counterclockwise, but RFC 7946 wants holes (interior rings) clockwise. Most renderers tolerate it; rewind to comply.
-
ring-not-closed.geojsonfails validationThe ring’s last point does not repeat its first point, so the ring is open.
{ "type": "Polygon", "coordinates": [ [[-87.63, 41.88], [-87.62, 41.88], [-87.62, 41.89], [-87.63, 41.89]] ] }Validator ·ring-not-closed· error · one-click fix:close-ringsRing not closed — ring 1 (exterior) starts at (-87.63, 41.88) but ends at (-87.63, 41.89). Close it by repeating the first point at the end.
-
multipolygon-unclosed.geojsonfails validationOne polygon inside a MultiPolygon has an unclosed ring.
{ "type": "MultiPolygon", "coordinates": [ [[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]], [[[10, 10], [11, 10], [11, 11], [10, 11]]] ] }Validator ·ring-not-closed· error · one-click fix:close-ringsRing not closed — polygon 2, ring 1 (exterior) starts at (10, 10) but ends at (10, 11). Close it by repeating the first point at the end.
-
ring-too-few-points.geojsonfails validationA ring with too few positions to enclose any area.
{ "type": "Polygon", "coordinates": [ [[0, 0], [1, 0], [0, 0]] ] }Validator ·ring-too-few-points· errorRing too small — ring 1 (exterior) has 3 positions; a closed GeoJSON ring needs at least 4 (three distinct corners plus the repeated closing point).
-
self-intersection-bowtie.geojsonfails validationA "bow-tie" polygon whose edges cross themselves.
{ "type": "Polygon", "coordinates": [ [[0, 0], [2, 2], [2, 0], [0, 2], [0, 0]] ] }Validator ·self-intersection· errorSelf-intersection — the polygon crosses itself at (1, 1). This is an invalid ring/line; most tools reject it.
-
duplicate-points.geojsonfails validationA line that repeats a consecutive point.
{ "type": "LineString", "coordinates": [[0.0, 0.0], [1.0, 1.0], [1.0, 1.0], [2.0, 2.0]] }Validator ·duplicate-consecutive-points· warning · one-click fix:dedupe-pointsDuplicate points — the line repeats 1 consecutive point (e.g. (1, 1)). Remove the repeats.
-
latlng-swapped.geojsonfails validationCoordinates written [lat, lng] instead of [lng, lat] — the latitude ends up out of range.
{ "type": "Point", "coordinates": [45.0, 122.0] }Validator ·latitude-out-of-range· error1 coordinate has a latitude outside [-90, 90].
Validator ·coordinates-possibly-swapped· warning · one-click fix:swapCoordsCoordinates look lon/lat-swapped: some latitudes exceed ±90° but would be valid longitudes. GeoJSON order is [longitude, latitude].
-
antimeridian.geojsonfails validationA segment jumps across the ±180° line; many renderers draw it the long way around.
{ "type": "LineString", "coordinates": [[170.0, 0.0], [-170.0, 0.0]] }Validator ·antimeridian-crossing· warningAntimeridian crossing — in the line, the segment (170, 0)→(-170, 0) jumps 340° of longitude and crosses the ±180° line; many renderers draw it the long way around. Split the segment at ±180° if that is not intended.
Where these come from & related tools
This corpus is the fixture set behind Cell & Shape’s geometry engine — the same valid and invalid-on-purpose samples our automated tests replay on every commit. A few places they’re especially useful:
- Universal geometry inspector — paste any sample to detect, validate, convert to every format, and render it.
- Geometry format size comparison — the measured samples in that guide make excellent test fixtures for wire-size assertions.
- WKB format explained byte-by-byte — decode the hex WKB samples above segment by segment.
- Why is my GeoJSON polygon invalid? — a deep dive on the winding-order and ring-closure cases in the semantic section.
- Point-in-polygon tester — drop a polygon sample in and test points against it.
Everything on this page runs in your browser. Copying a sample or opening it in the inspector never uploads your geometry — share links carry it in the URL hash fragment, which browsers never send to a server.
Fixture methodology and specifications
Samples are read from the same repository fixtures used by the automated test suite at build time. Valid samples are parsed and detected by the production engine; invalid samples display that engine's actual error output.
- RFC 7946 — The GeoJSON Format — GeoJSON syntax and geometry rules
- OGC Simple Feature Access — Common Architecture — WKT/WKB geometry model and encodings
- Google Encoded Polyline Algorithm Format — polyline encoding fixtures
- H3 indexing functions — H3 cell identifiers and coordinate conversion
- S2Geometry developer guide — S2 cells, tokens and coordinate types