Skip to content

Investigate location extraction failures caused by duplicate admin levels #965

Description

@cka-y

Describe the bug

As part of the location extraction process, when a stop is mapped to a location with duplicate administrative levels (e.g., two countries or two subdivisions), the match is discarded and the stop is treated as unmatched. This logic was designed under the assumption that a single latitude/longitude point should not belong to multiple locations at the same administrative level . For instance, a stop cannot be in both Canada and the U.S., or in both Quebec and Ontario.

While this generally helps prevent incorrect data, we’ve identified some feeds where all stops are unmatched. This raises concerns about potentially losing all location data for those feeds.

Feeds impacted (identified so far):

  • mdb-1111
  • mdb-716

Steps/Code to Reproduce

Run the location extraction for the problematic feeds and inspect the logs.

Expected Results

The location extraction is unsuccessful because no stop is considered to have a valid match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions