Skip to content

Add an option to map-match to accept a GeoJSON feature collection #4

@thehoneymad

Description

@thehoneymad

Description:
We will enhance the MapMatch command to accept one or more GeoJSON files as input. Each GeoJSON file must be a Feature Collection, containing only LineString or MultiLineString Features. Any other types of Features will be ignored during processing.

The system will validate the file extension, ensuring only GeoJSON files are accepted. Files with no eligible features (i.e., no LineStrings or MultiLineStrings) will pass validation but will not trigger any map matching.


Acceptance Criteria:

  • The MapMatch command should accept one or more GeoJSON files as input.
  • Each GeoJSON file must be a valid Feature Collection.
  • The command should:
    • Process only LineString and MultiLineString Features in the Feature Collection.
    • Ignore any other feature types without throwing errors.
  • Add validation for file extension:
    • Only accept files with the .geojson extension.
    • Invalid file types must fail validation with an appropriate error message.
  • If no eligible features (LineStrings or MultiLineStrings) are found in a file, the validation should succeed, but a message should indicate that no features will be map matched.
  • Ensure that appropriate logging and feedback are provided to the user regarding the number of eligible features being processed.
  • Update the README to document the usage of the MapMatch command, including the expected input format (GeoJSON Feature Collections) and validation behavior.
  • Add automated tests to:
    • Verify that only LineString and MultiLineString features are processed.
    • Test the validation logic for accepting valid GeoJSON files and rejecting invalid ones.
    • Ensure correct handling of files with no eligible features.

Additional Resources:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions