Skip to content

Relationship validation/schema is not IMDF compliant #3

@jillesvangurp

Description

@jillesvangurp

Summary

The in-app IMDF validator rejects relationship features that follow the current IMDF relationship model.

Evidence

  • src/lib/imdf/validate.ts:115 hard-requires relationship geometry to be null.
  • src/lib/imdf/validate.ts:192 validates a required references array for relationship features.
  • src/lib/imdf/featureCatalog.ts:209 defines relationship required fields as category, numeric direction, and references.

Why this is a bug

Current IMDF relationship features are modeled with origin, intermediary, and destination references, and geometry may be null or present as GeoJSON. The current validator/schema rejects those features.

Reference: https://docs.ogc.org/cs/20-094/relationship/index.html

Reproduction

  1. Create/import a relationship feature that uses origin + destination references (no references array), with direction as "directed" or "undirected".
  2. Run through validateImdfDatasetFiles (directly or via archive import).
  3. Observe errors for missing properties.references and/or geometry requirements.

Expected

  • Accept IMDF relationship fields (origin, optional intermediary, destination, string direction enum).
  • Allow relationship geometry to be null or a valid GeoJSON geometry.

Impact

Interoperability with spec-conformant IMDF datasets is broken; valid relationship data is rejected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions