Skip to content
Novus Examples
wkt95 B

EWKT — PostGIS Extended WKT With an SRID Prefix

PostGIS's extended WKT, which prefixes the geometry with `SRID=4326;`. It is not part of the OGC standard, so a strict WKT parser rejects the whole string — while a PostGIS-aware one gets the coordinate system for free.

Preview — first 2 lineswkt
SRID=4326;POLYGON ((-12.49 47.06, -12.474 47.06, -12.474 47.069, -12.49 47.069, -12.49 47.06))

Specifications

Format
PostGIS EWKT
Crs
WGS 84 (EPSG:4326)
Coordinate Order
longitude latitude
Encoding
ASCII
Line Endings
LF
Coordinate Precision
6
Srid Prefix
SRID=4326;
Geometry Type
POLYGON
Standard
PostGIS extension, not OGC WKT
Valid
true

Testing contract

Expected to pass
Scenario
Parse the value with a strict OGC WKT parser and then with an EWKT-aware one.
Expected result
The strict parser rejects the SRID prefix; the EWKT-aware parser returns the polygon tagged with EPSG:4326.

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

“EWKT — PostGIS Extended WKT With an SRID Prefix” is a deterministic Novus Examples fixture for Geospatial, Serialization testing, Conversion testing. 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: ASCII · LF · PostGIS EWKT. 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.

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