Skip to content
Novus Examples
txt280 B

EWKB — PostGIS Hex With an Embedded SRID

PostGIS EWKB, where the SRID is carried by OR-ing 0x20000000 into the geometry-type word and appending the code. A strict OGC WKB reader sees type 0x20000001 instead of 1 and either fails or, worse, reports an unknown geometry type.

Preview — first 3 linestxt
POINT SRID=4326	0101000020E6100000105839B4C8F628C0D578E92631884740
POLYGON SRID=4326	0103000020E610000001000000050000007B14AE47E1FA28C048E17A14AE874740A69BC420B0F228C048E17A14AE874740A69BC420B0F228C046B6F3FDD48847407B14AE47E1FA28C046B6F3FDD48847407B14AE47E1FA28C048E17A14AE874740

Specifications

Format
PostGIS EWKB as hexadecimal text
Crs
WGS 84 (EPSG:4326)
Coordinate Order
longitude latitude
Encoding
ASCII
Line Endings
LF
Coordinate Precision
6
Records
2
Srid
4326
Type Flag
0x20000000 OR-ed into the geometry type
Standard
PostGIS extension, not OGC WKB
Delimiter
tab

Testing contract

Expected to pass
Scenario
Decode with an OGC WKB reader, then with an EWKB-aware one.
Expected result
The EWKB reader returns a Point tagged EPSG:4326; the strict OGC reader reports geometry type 536870913 rather than 1, making the extension flag visible.

What is a .txt file?

TXT is a plain-text file containing unformatted character data with no styling or structure beyond line breaks. Its interpretation depends on character encoding, most commonly UTF-8, and on line-ending convention. It is the most universal and portable text container.

How to use this file

Use an example TXT to test encoding detection, line-ending (LF versus CRLF) handling, and any tool that reads or streams raw text input.

How to use this file for testing

“EWKB — PostGIS Hex With an Embedded SRID” 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: 2 records · ASCII · LF. 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.