Skip to content

Return the hexadecimal WKB of every type as its string alone - #46

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:gen/hexwkb-string-alone
Nov 1, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:gen/hexwkb-string-alone

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A MEOS function returning a string whose length it writes through its
one size_t output parameter returns the string alone: the hexadecimal
WKB and EWKB writers of every type, 26 functions, among them
temporal_as_hexwkb, tspatial_as_hexewkb, set_as_hexwkb and
npoint_as_hexwkb. The length is the string's own, as GoMEOS's
tools/objectgen.py and MEOS.NET's object layer drop it, so
temporal_as_hexwkb(temp, variant) is a str, not a (str, int) pair. The generator reads the shape from the catalog, a char * return
with a size_t * in shape.outParams, the string twin of the byte buffer
returned as bytes.

Witness: the 26 writers annotated tuple[str, size_t *] and answered the
pair, so PyMEOS reads [0] at each of its twenty calls; each now
annotates str and answers the string.

Measured: generated from one catalog of MobilityDB aabe426a2e before and
after, the surfaces differ in those 26 functions alone; the smoke test
checks five annotations and that set_as_hexwkb answers the hexadecimal
form of the bytes set_as_wkb answers, and passes on the wheel built
against the libmeos of that commit, where PyMEOS on the branch of the
same name passes 4855 tests.

A MEOS function returning a string whose length it writes through its
one size_t output parameter returns the string alone: the hexadecimal
WKB and EWKB writers of every type, 26 functions, among them
temporal_as_hexwkb, tspatial_as_hexewkb, set_as_hexwkb and
npoint_as_hexwkb. The length is the string's own, as GoMEOS's
tools/objectgen.py and MEOS.NET's object layer drop it, so
temporal_as_hexwkb(temp, variant) is a str, not a (str, int) pair. The generator reads the shape from the catalog, a char * return
with a size_t * in shape.outParams, the string twin of the byte buffer
returned as bytes.

Witness: the 26 writers annotated tuple[str, size_t *] and answered the
pair, so PyMEOS reads [0] at each of its twenty calls; each now
annotates str and answers the string.

Measured: generated from one catalog of MobilityDB aabe426a2e before and
after, the surfaces differ in those 26 functions alone; the smoke test
checks five annotations and that set_as_hexwkb answers the hexadecimal
form of the bytes set_as_wkb answers, and passes on the wheel built
against the libmeos of that commit, where PyMEOS on the branch of the
same name passes 4855 tests.
@estebanzimanyi
estebanzimanyi merged commit f132fbe into MobilityDB:master Nov 1, 2026
4 checks passed
@estebanzimanyi
estebanzimanyi deleted the gen/hexwkb-string-alone branch November 1, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant