Skip to content

exportImdfDataset coerces section/geofence features into unit #7

@jillesvangurp

Description

@jillesvangurp

Summary

exportImdfDataset silently coerces non-level polygons (section, geofence, etc.) into unit exports and rewrites relationship parent feature types.

Evidence

  • src/lib/imdf/export.ts:450-452 includes all non-level polygons in unitSourceFeatures.
  • src/lib/imdf/export.ts:544-548 exports all of those as feature_type: "unit".
  • src/lib/imdf/export.ts:639-643 rewrites section/geofence parents to feature_type: "unit" in generated relationships.

Why this is a bug

Feature typing is not preserved. A dataset containing sections or geofences is transformed into units on export, causing semantic corruption and lossy round trips.

Reproduction

  1. Build features containing section and/or geofence polygons.
  2. Call exportImdfDataset(...).
  3. Inspect unit.geojson and relationship.geojson; section/geofence semantics are collapsed to unit.

Expected

Preserve each IMDF feature type in its proper collection and relationship references.

Impact

Loss of meaning and incorrect downstream behavior for consumers relying on section/geofence semantics.

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