WKT — Intentionally Invalid: Four Malformed Values
Intentionally invalid: four WKT strings that each break in a different way — a point with one ordinate, a line whose last vertex is ragged, a polygon missing a closing bracket, and a misspelled keyword. Good parsers report which line and which character failed.
POINT (-12.482)
LINESTRING (-12.482 47.064, -12.451)
POLYGON ((-12.490 47.060, -12.474 47.060, -12.474 47.069)
POLYGN (-12.482 47.064)
Specifications
- Format
- OGC Well-Known Text
- Crs
- WGS 84 (EPSG:4326)
- Coordinate Order
- longitude latitude
- Encoding
- ASCII
- Line Endings
- LF
- Coordinate Precision
- 6
- Records
- 4
- Valid
- false
- Defects
- missing ordinate, ragged vertex, unbalanced parenthesis, misspelled keyword
- Note
- intentionally invalid — each line fails for a different reason
Testing contract
Expected to fail- Scenario
- Parse each line and collect the errors.
- Expected result
- All four lines are rejected with distinct, positioned errors; no line is silently repaired into a valid geometry.
What is a .wkt file?
WKT (Well-Known Text) is the OGC's human-readable encoding for geometry and for coordinate reference systems. Geometry WKT spells out a type and its coordinates — POINT, LINESTRING, POLYGON, and their MULTI and GEOMETRYCOLLECTION forms — while CRS WKT nests PROJCS, GEOGCS, DATUM, and PARAMETER clauses. Its binary counterpart, WKB, encodes the same geometry model compactly.
How to use this file
Use an example .wkt file to test geometry parsers and CRS handling, exercising polygons with interior rings, empty geometries, coordinate precision, and the difference between WKT geometry and WKT coordinate-system definitions.
How to use this file for testing
“WKT — Intentionally Invalid: Four Malformed Values” is a deterministic Novus Examples fixture for Geospatial, Error handling, Schema validation. GeoJSON, GPX, and KML files with points, lines, polygons, and tracks — for testing map tools, route parsers, and geo importers.
Documented properties for this file: 4 records · ASCII · LF · intentionally invalid. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Geospatial fixtures publish one invented territory across formats, with the coordinate reference system and feature counts documented in specs. Convert or reproject and diff against the twin in the same group; edge-case geometries state exactly which assumption they are built to break.
Related files
- geojsonGeoJSON — Intentionally Invalid: Coordinates as JSON StringsIntentionally invalid: the file is perfectly good JSON but the coordinates are quoted strings, which RFC 7946 does not allow. It is exactly what a CSV-to-GeoJSON script produces when it forgets to cast, and a permissive reader will coerce it and hide the bug.

- geojsonGeoJSON — Intentionally Invalid: Latitude Outside -90 to 90Intentionally invalid: latitude 95, five degrees past the north pole. This is the value that appears when longitude and latitude have been swapped somewhere upstream, so catching it early usually finds an axis-order bug rather than a data-entry one.

- geojsonGeoJSON — Intentionally Invalid: Longitude Outside -180 to 180Intentionally invalid: a point at longitude 200. It is a plausible-looking number that usually comes from adding an offset without wrapping, and it survives JSON schema checks that only test for `number`.

- geojsonGeoJSON — Intentionally Invalid: Ring With Only Three PositionsIntentionally invalid: a ring of three positions that closes back on itself and therefore encloses nothing. RFC 7946 requires at least four positions for a linear ring, and this is the shape a simplification pass produces when it over-thins a small polygon.

- wktWKT — M (measured) GeometryA point with an M (measure) ordinate rather than a Z. Written without the tag this is indistinguishable from a Z geometry, and a parser that assumes the third ordinate is elevation silently converts a 345-second measure into a 345-metre altitude.

- geojsonGeoJSON — Antimeridian Line Split per RFC 7946The same transect cut at the 180th meridian into a two-part MultiLineString, which is what RFC 7946 section 3.1.9 recommends. The split latitude is the linear interpolation of the unsplit twin, so the two files describe the same ground path.

Generated by generation/geospatial.py. Free for any use, no attribution required — license.