Skip to content

Generate the npoint network-point family (tnpoint, npoint, nsegment) - #238

Merged
estebanzimanyi merged 2 commits into
MobilityDB:mainfrom
estebanzimanyi:feat/duck-npoint-family
Jul 31, 2026
Merged

Generate the npoint network-point family (tnpoint, npoint, nsegment)#238
estebanzimanyi merged 2 commits into
MobilityDB:mainfrom
estebanzimanyi:feat/duck-npoint-family

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Registers the npoint temporal family — the 2D-planar twin of cbuffer. Both inherit Spatial<T> and are non-geodetic; the only difference is that npoint carries no SRID/geometry of its own — a route id resolves against the fixed ways road network. This gives tnpoint the whole inherited Spatial<T> + Temporal<T> surface (205 registrations) generated from the catalog.

  • src/npoint/tnpoint.{cpp,hpp}npoint/nsegment/tnpoint BLOB types, the <-> VARCHAR casts, and fixed-struct blob marshalling (palloc(sizeof), like Span/STBoxNpoint {rid,pos} and Nsegment {rid,pos1,pos2} are fixed size).
  • GeneratorNpoint/Nsegment in the PTR_IN/PTR_RET base-value maps; NpointTypes::tnpoint() in the temporal type maps; tnpoint/npoint/nsegment in REGISTERED_FAMILIES; the blob↔struct marshaller helpers in the preamble.
  • ways network wiring — the ways.csv (100 routes, SRID 5676) is embedded as src/ways_csv.inc and installed at load via ConfigureMeosWaysCsvOnce (env override WAYS_CSV), mirroring the SRID-CSV wiring. Without it npoint has no route resolution (SRID 0).

Adds test/sql/tnpoint.test (SRID and position interpolation over the ways network).

The MEOS side is fully ready (T_NPOINT/T_NSEGMENT/T_TNPOINT, meos_npoint.h); this is a pure binding-side family registration, modelled on the existing cbuffer family.

Registers the npoint temporal family — the 2D-planar twin of cbuffer. Both
inherit Spatial<T> and are non-geodetic; the only difference is that npoint
carries no SRID/geometry of its own — a route id resolves against the fixed
`ways` road network. This gives tnpoint the whole inherited Spatial<T> and
Temporal<T> surface (205 registrations) generated from the catalog.

- src/npoint/tnpoint.{cpp,hpp}: npoint/nsegment/tnpoint BLOB types, the
  <-> VARCHAR casts, and fixed-struct blob marshalling (palloc(sizeof), like
  Span/STBox — Npoint {rid,pos} and Nsegment {rid,pos1,pos2} are fixed size).
- Generator: Npoint/Nsegment in the PTR_IN/PTR_RET base-value maps;
  NpointTypes::tnpoint() in the temporal type maps; tnpoint/npoint/nsegment in
  REGISTERED_FAMILIES; the blob<->struct marshaller helpers in the preamble.
- ways network wiring: the ways.csv (100 routes, SRID 5676) is embedded as
  src/ways_csv.inc and installed at load via ConfigureMeosWaysCsvOnce (env
  override WAYS_CSV), mirroring the SRID-CSV wiring. Without it npoint has no
  route resolution (SRID 0).

Adds test/sql/tnpoint.test (SRID and position interpolation over the ways
network).
src/index/rtree_module.cpp.merged and src/include/index/rtree_module.hpp.merged
are leftover merge artifacts accidentally committed (the .cpp.merged still
contains raw conflict markers). They are not referenced by the build (CMake
compiles rtree_module.cpp / includes rtree_module.hpp) — pure junk, removed.
@estebanzimanyi
estebanzimanyi force-pushed the feat/duck-npoint-family branch from 7dfa774 to 604b8a5 Compare July 31, 2026 10:56
@estebanzimanyi
estebanzimanyi merged commit 6fda90c into MobilityDB:main Jul 31, 2026
9 checks passed
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