Cell & Shape

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.geojson
    GeoJSON Point

    Point

    { "type": "Point", "coordinates": [-73.9857, 40.7484] }
  • linestring.geojson
    GeoJSON LineString

    LineString

    { "type": "LineString", "coordinates": [[-0.1276, 51.5072], [2.3522, 48.8566], [12.4964, 41.9028]] }
  • polygon.geojson
    GeoJSON Polygon

    Polygon 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.geojson
    GeoJSON GeometryCollection

    GeometryCollection

    {
      "type": "GeometryCollection",
      "geometries": [
        { "type": "Point", "coordinates": [30.0, 10.0] },
        { "type": "LineString", "coordinates": [[10.0, 10.…
    display truncated — full value copies
  • feature.geojson
    GeoJSON Point

    A Feature wrapping a geometry + properties

    {
      "type": "Feature",
      "properties": { "name": "Statue of Liberty" },
      "geometry": { "type": "Point", "coordinates": [-74.0445, 40.6892] }
    }
  • featurecollection-single.geojson
    GeoJSON Point

    A FeatureCollection

    {
      "type": "FeatureCollection",
      "features": [
        {
          "type": "Feature",
          "properties": {},
          "geometry": { "type": "Point", "coordinates": [139…
    display truncated — full value copies
  • out-of-range-lat.geojson
    GeoJSON Point

    Syntactically 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.geojson fails to parse

    The "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.txt fails to parse

    The JSON is truncated — a bracket is never closed, so it will not even parse as JSON.

    { "type": "Point", "coordinates": [1, 2
    Our parser says

    Invalid JSON: Expected ',' or ']' after array element in JSON at position 39 (line 1 column 40). GeoJSON must be well-formed JSON.

  • missing-coordinates.geojson fails to parse

    A Point object with no "coordinates" member.

    { "type": "Point" }
    Our parser says

    Point is missing its "coordinates" member.

  • null-feature-geometry.geojson fails to parse

    A Feature whose geometry is null — legal per RFC 7946, but there is nothing to inspect.

    { "type": "Feature", "properties": {}, "geometry": null }
    Our parser says

    This 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.wkt
    WKT Point

    Point

    POINT (30 10)
  • linestring.wkt
    WKT LineString

    LineString

    LINESTRING (30 10, 10 30, 40 40)
  • polygon.wkt
    WKT Polygon

    Polygon with a hole

    POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))
  • multipolygon.wkt
    WKT MultiPolygon

    MultiPolygon

    MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))
  • geometrycollection.wkt
    WKT GeometryCollection

    GeometryCollection

    GEOMETRYCOLLECTION (POINT (4 6), LINESTRING (4 6, 7 10))
  • point-z.wkt
    WKT Point

    Point Z (3D)

    POINT Z (30 10 5)
  • point-empty.wkt
    WKT Point

    POINT EMPTY — the empty geometry

    POINT EMPTY

Invalid on purpose

  • unclosed-paren.wkt fails to parse

    The coordinate list is never closed — a parenthesis is missing at the end.

    POLYGON ((30 10, 40 40, 20 40, 10 20
    Our parser says

    Expected ")" to close a coordinate list — check for a missing or unbalanced parenthesis at the end of the input.

  • bad-keyword.wkt fails to parse

    "CIRCLE" is not a WKT geometry keyword.

    CIRCLE (30 10)
    Our parser says

    Expected a WKT geometry keyword (POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, or GEOMETRYCOLLECTION) near "CIRCLE (30 10)".

  • missing-coord.wkt fails to parse

    A coordinate pair is missing a value.

    POINT (30)
    Our parser says

    Expected 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.ewkt
    EWKT Point

    Point, SRID=4326 (WGS84)

    SRID=4326;POINT (30 10)
  • point-3857.ewkt
    EWKT Point

    Point tagged SRID=3857 (Web Mercator)

    SRID=3857;POINT (30 10)
    Parser warning

    SRID 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.ewkt
    EWKT Polygon

    Polygon with an SRID prefix

    SRID=4326;POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10))
  • geometrycollection.ewkt
    EWKT GeometryCollection

    GeometryCollection with an SRID prefix

    SRID=4326;GEOMETRYCOLLECTION (POINT (4 6), LINESTRING (4 6, 7 10))

Invalid on purpose

  • missing-srid.ewkt fails to parse

    No "SRID=…;" prefix — this is plain WKT, not EWKT.

    POINT (30 10)
    Our parser says

    EWKT 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.ewkt fails to parse

    The SRID prefix is malformed, so the EWKT header cannot be read.

    SRID=abc;POINT (30 10)
    Our parser says

    EWKT 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.hex
    WKB Point

    Point, little-endian hex

    01010000000000000000003e400000000000002440
  • point-bigendian.hex
    WKB Point

    Point, big-endian (byte-order flag 00)

    0000000001403e0000000000004024000000000000
  • point-z.hex
    WKB Point

    Point Z (3D)

    01e90300000000000000003e4000000000000024400000000000001440
  • linestring.hex
    WKB LineString

    LineString

    0102000000030000000000000000003e40000000000000244000000000000024400000000000003e4000000000000044400000000000004440
  • polygon.hex
    WKB Polygon

    Polygon

    0103000000020000000500000000000000008041400000000000002440000000000080464000000000008046400000000000002e40000000000000444000000000000024400000000000003440000000…
    display truncated — full value copies
  • multipolygon.hex
    WKB MultiPolygon

    MultiPolygon

    010600000002000000010300000001000000040000000000000000003e40000000000000344000000000008046400000000000004440000000000000244000000000000044400000000000003e400000…
    display truncated — full value copies
  • geometrycollection.hex
    WKB GeometryCollection

    GeometryCollection

    01070000000200000001010000000000000000003e4000000000000024400102000000030000000000000000002440000000000000244000000000000034400000000000003440000000000000244000…
    display truncated — full value copies
  • point-base64.txt
    WKB Point

    Point encoded as base64 instead of hex

    AQEAAAAAAAAAAAA+QAAAAAAAACRA

Invalid on purpose

  • bad-endian.hex fails to parse

    The first byte is neither 00 nor 01, so the byte order is undefined.

    4a010000000000000000003e400000000000002440
    Our parser says

    Byte 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.hex fails to parse

    An odd number of hex digits — the final byte is only half specified.

    010100000
    Our parser says

    Hex input has an odd number of digits (9); every WKB byte is exactly two hex digits, so the last one is incomplete.

  • truncated.hex fails to parse

    The buffer ends mid-coordinate — a partial copy/paste.

    0101000000000000000000003e40
    Our parser says

    WKB 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.hex fails to parse

    The geometry-type field is 99, which is not a known WKB type.

    01630000000000000000003e400000000000002440
    Our parser says

    Bytes 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.hex
    EWKB Point

    Point with an embedded SRID

    0101000020e61000000000000000003e400000000000002440
  • point-srid3857.hex
    EWKB Point

    Point tagged SRID=3857

    0101000020110f00000000000000003e400000000000002440
    Parser warning

    SRID 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.hex
    EWKB Point

    Point Z with an embedded SRID

    01010000a0e61000000000000000003e4000000000000024400000000000001440
  • polygon.hex
    EWKB Polygon

    Polygon with an embedded SRID

    0103000020e6100000020000000500000000000000008041400000000000002440000000000080464000000000008046400000000000002e400000000000004440000000000000244000000000000034…
    display truncated — full value copies
  • point-base64.txt
    EWKB Point

    EWKB Point as base64

    AQEAACDmEAAAAAAAAAAAPkAAAAAAAAAkQA==

Invalid on purpose

  • srid-flag-missing-bytes.hex fails to parse

    The header sets the SRID flag but the buffer ends before the four SRID bytes.

    0101000020
    Our parser says

    EWKB 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.twkb
    TWKB Point

    Point

    a1009fb1d60bd087cd03
  • point-precision2.twkb
    TWKB Point

    Point at precision 2 (coarser quantization)

    4100a3bf01823b
  • linestring.twkb
    TWKB LineString

    LineString

    a200039fb1d60bd087cd03cf0fce0fcf0fd00f
  • polygon.twkb
    TWKB Polygon

    Polygon

    a30002059fb1d60bd087cd03a01f00009e1f9f1f00009d1f05e807e607d00f0000ce0fcf0f0000cd0f
  • multipolygon.twkb
    TWKB MultiPolygon

    MultiPolygon

    a6000201049fb1d60bd087cd03a01f00009e1f9f1f9d1f0104ff7ccf8902a01f00009e1f9f1f9d1f
  • geometrycollection.twkb
    TWKB GeometryCollection

    GeometryCollection

    a70002a1009fb1d60bd087cd03a200029fb1d60bd087cd03cf0fce0f

Invalid on purpose

  • truncated-varint.twkb fails to parse

    A varint’s continuation bit is set but the buffer ends — the value never completes.

    a100ff
    Our parser says

    Truncated 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.twkb fails to parse

    The geometry-type nibble is 8; TWKB types only run 1–7.

    0800
    Our parser says

    Byte 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.txt
    Encoded Polyline (precision 5) LineString

    The canonical Google precision-5 example

    _p~iF~ps|U_ulLnnqC_mqNvxq`@
  • negative-p5.txt
    Encoded Polyline (precision 5) LineString

    Route with negative coordinates

    r~ckEbrinLchA{sB
  • antimeridian-p5.txt
    Encoded Polyline (precision 5) LineString

    A route that crosses the ±180° antimeridian

    _syqK_v_ia@_pR~l`scA
  • single-point-p5.txt
    Encoded Polyline (precision 5) Point

    A degenerate one-point polyline

    _p~iF~ps|U
    Parser warning

    Encoded polyline decoded to a single coordinate; produced a Point instead of a LineString.

  • osrm-p6.txt
    Encoded Polyline (precision 6) LineString

    OSRM precision-6 (higher resolution)

    qikdcBwbepX}eWgcO`bKuk|@

Invalid on purpose

  • illegal-char.txt fails to parse

    Contains a character outside the encoded-polyline alphabet (ASCII 63–126).

    _p~i5F
    Our parser says

    Character "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.txt fails to parse

    Ends mid-character — the final byte expects a continuation that never arrives.

    _p~id
    Our parser says

    Truncated 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.txt
    Geohash Polygon

    A 5-character geohash (San Francisco area)

    9q8yy
    Parser warning

    Geohash "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.txt
    Geohash Polygon

    The classic Wikipedia example geohash

    ezs42
    Parser warning

    Geohash "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.txt
    Geohash Polygon

    A high-precision (long) geohash

    u4pruydqqvj
    Parser warning

    Geohash "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.txt
    Geohash MultiPolygon

    Several geohashes, comma-separated

    dr5ru, 9q8yy
    Parser warning

    2 geohashes were expanded to their grid-cell bounding boxes (a MultiPolygon of cells), not hand-drawn polygons.

Invalid on purpose

  • contains-a.txt fails to parse

    Contains "a" — the geohash alphabet omits a, i, l and o to avoid look-alikes.

    ezsa2
    Our 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.txt fails to parse

    Contains "i", which is not in the geohash alphabet.

    9q8iy
    Our 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.txt fails to parse

    13 characters — beyond the 12-character maximum precision.

    0123456789bcd
    Our parser says

    Geohash "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.txt
    H3 Cell Polygon

    A resolution-0 base cell (hexagon)

    8001fffffffffff
    Parser warning

    H3 index 8001fffffffffff rendered as its resolution-0 cell boundary polygon. H3 cells are areas on the grid, not points.

  • pentagon-res0.txt
    H3 Cell Polygon

    A resolution-0 pentagon (the odd cell out)

    8009fffffffffff
    Parser warning

    H3 index 8009fffffffffff rendered as its resolution-0 cell boundary polygon. H3 cells are areas on the grid, not points.

  • res9.txt
    H3 Cell Polygon

    A resolution-9 cell

    8928308280fffff
    Parser warning

    H3 index 8928308280fffff rendered as its resolution-9 cell boundary polygon. H3 cells are areas on the grid, not points.

  • res15.txt
    H3 Cell Polygon

    A resolution-15 cell (finest)

    8f2830828052d25
    Parser warning

    H3 index 8f2830828052d25 rendered as its resolution-15 cell boundary polygon. H3 cells are areas on the grid, not points.

  • uppercase.txt
    H3 Cell Polygon

    Uppercase hex — accepted

    8928308280FFFFF
    Parser warning

    H3 index 8928308280fffff rendered as its resolution-9 cell boundary polygon. H3 cells are areas on the grid, not points.

  • multi.txt
    H3 Cell MultiPolygon

    Several H3 indexes together

    8928308280fffff, 8928308280bffff
    89283082873ffff
    Parser warning

    3 H3 indexes rendered as their cell boundary polygons (MultiPolygon). H3 cells are areas on the grid, not points.

Invalid on purpose

  • wrong-length.txt fails to parse

    13 hex characters — an H3 index must be exactly 15.

    8928308280fff
    Our 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.txt fails to parse

    Contains non-hex characters.

    622236721future
    Our 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.txt fails to parse

    A short decimal integer — not the 15-char hex layout H3 requires.

    123456789
    Our 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.txt
    S2 Cell Polygon

    A level-0 face cell (one sixth of the globe)

    9
  • level14.txt
    S2 Cell Polygon

    A level-14 cell

    89c25a23
  • level17.txt
    S2 Cell Polygon

    A level-17 cell

    89c25a220c
  • level20.txt
    S2 Cell Polygon

    A level-20 cell

    89c25a220cf
  • level30-leaf.txt
    S2 Cell Polygon

    A level-30 leaf cell (finest)

    89c25a220cf80969
  • decimal-level17.txt
    S2 Cell Polygon

    A level-17 cell as a decimal cell id (not a hex token)

    9926595630954708992
  • multi-token.txt
    S2 Cell MultiPolygon

    Several S2 tokens together

    89c25a220c 89c25a2214

Invalid on purpose

  • invalid-cell-token.txt fails to parse

    Valid hex, but it does not decode to a real S2 cell.

    ffffffffffffffff
    Our parser says

    "ffffffffffffffff" is not a valid S2 cell token. It is hex but does not decode to a real cell.

  • non-hex.txt fails to parse

    Contains a "z" — not a hex token and not a decimal id.

    89c25z3
    Our 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.txt
    Lat/Lng Text Point

    "lat: …, lng: …" labeled pair

    lat: 41.8781, lng: -87.6298
  • google-maps-paste.txt
    Lat/Lng Text Point

    Pasted straight from Google Maps

    41.8781, -87.6298
    Parser warning

    Both values are ≤90; interpreted as latitude,longitude — use the override if this is lng,lat data.

  • bracketed-tuple.txt
    Lat/Lng Text Point

    A bracketed [lat, lng] tuple

    [41.8781, -87.6298]
    Parser warning

    Both values are ≤90; interpreted as latitude,longitude — use the override if this is lng,lat data.

  • semicolon-pair.txt
    Lat/Lng Text Point

    Semicolon-separated pair

    41.8781; -87.6298
    Parser warning

    Both values are ≤90; interpreted as latitude,longitude — use the override if this is lng,lat data.

  • multiline-route.txt
    Lat/Lng Text LineString

    Several points, one per line

    41.8781, -87.6298
    40.7128, -74.0060
    34.0522, -118.2437
    Parser warning

    Both values are ≤90; interpreted as latitude,longitude — use the override if this is lng,lat data.

  • ambiguous-order.txt
    Lat/Lng Text Point

    Both values ≤ 90° so the order is ambiguous — open it to see the warning

    41.8781, 12.4964
    Parser warning

    Both values are ≤90; interpreted as latitude,longitude — use the override if this is lng,lat data.

Invalid on purpose

  • out-of-range.txt fails to parse

    Both numbers exceed 90°, so neither can be a latitude.

    200, 300
    Our parser says

    Both values (200, 300) exceed 90°, so neither can be a latitude — this does not look like a latitude,longitude pair.

  • odd-count.txt fails to parse

    An odd number of values — coordinates come in pairs, so one is missing.

    41.8781, -87.6298, 40.7128
    Our parser says

    Found 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.geojson
    GeoJSON Polygon

    The 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.geojson fails validation

    The 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: rewind

    Winding order — ring 1 (exterior) is clockwise, but RFC 7946 wants exterior rings counterclockwise. Most renderers tolerate it; rewind to comply.

  • winding-ccw-hole.geojson fails validation

    The 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: rewind

    Winding order — ring 2 (hole) is counterclockwise, but RFC 7946 wants holes (interior rings) clockwise. Most renderers tolerate it; rewind to comply.

  • ring-not-closed.geojson fails validation

    The 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-rings

    Ring 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.geojson fails validation

    One 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-rings

    Ring 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.geojson fails validation

    A ring with too few positions to enclose any area.

    {
      "type": "Polygon",
      "coordinates": [
        [[0, 0], [1, 0], [0, 0]]
      ]
    }
    Validator · ring-too-few-points · error

    Ring 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.geojson fails validation

    A "bow-tie" polygon whose edges cross themselves.

    {
      "type": "Polygon",
      "coordinates": [
        [[0, 0], [2, 2], [2, 0], [0, 2], [0, 0]]
      ]
    }
    Validator · self-intersection · error

    Self-intersection — the polygon crosses itself at (1, 1). This is an invalid ring/line; most tools reject it.

  • duplicate-points.geojson fails validation

    A 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-points

    Duplicate points — the line repeats 1 consecutive point (e.g. (1, 1)). Remove the repeats.

  • latlng-swapped.geojson fails validation

    Coordinates 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 · error

    1 coordinate has a latitude outside [-90, 90].

    Validator · coordinates-possibly-swapped · warning · one-click fix: swapCoords

    Coordinates look lon/lat-swapped: some latitudes exceed ±90° but would be valid longitudes. GeoJSON order is [longitude, latitude].

  • antimeridian.geojson fails validation

    A 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 · warning

    Antimeridian 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.

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.

Frequently asked questions

Can I use these in my test suite?
Yes. These fixtures are small, hand-authored geometry samples derived from public specifications (RFC 7946 GeoJSON, OGC WKT/WKB, the encoded-polyline algorithm, and the H3/S2/geohash references) and well-known public-domain example coordinates. They carry no usage restrictions — copy any of them into your own unit tests, fixtures, or documentation, no attribution required. They contain no proprietary data and nothing that ever leaves your browser: this page reads them from the same open corpus our own suite runs against.
Why include invalid geometries?
Because the hard part of writing a robust geometry pipeline is the error path, not the happy path. Real inputs arrive with clockwise exterior rings, unclosed rings, self-intersections, lon/lat swapped, truncated WKB buffers and geohashes with illegal characters. Each invalid-on-purpose sample here is paired with the exact error our validator produces, so you can assert against the same failure modes your users will hit — and see, in plain language, what is actually wrong with each one.
What formats are covered?
Every format the inspector understands: GeoJSON, WKT and EWKT, WKB and EWKB (hex and base64), TWKB, Google/OSRM encoded polyline (precision 5 and 6), geohash, Uber H3, Google S2, and loose lat/lng text. Plus a dedicated section of geometries that are valid JSON but fail semantic validation (winding order, ring closure, self-intersection, antimeridian crossing).
How do I load a sample into the inspector?
Click "Open in Inspector" on any sample. It builds a shareable link that carries the geometry in the URL hash fragment (never sent to a server) and drops it straight into the universal inspector — detected, validated, converted to every other format, and rendered on a map. Invalid samples work too: opening one reproduces the live error message shown here.