Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segment restructure #203

Merged
merged 6 commits into from
May 30, 2024
Merged

Segment restructure #203

merged 6 commits into from
May 30, 2024

Conversation

brad-richardson
Copy link
Contributor

@brad-richardson brad-richardson commented May 29, 2024

Description

Storing road data as JSON carries a number of issues and was always considered a "stop gap" during rapid feature iteration for transportation. As we approach GA, we need to properly schematize this data. It is proposed that this also includes some structure simplification ("flattening") for ease of querying, whereas before a priority was making the JSON nicely human-readable. I've left in road as-is to allow us to ship both deliveries for one release to ease migration.

Here is the high level schema change:

Old JSON path New column
road.restrictions.speed_limits speed_limits
road.restrictions.access access_restrictions
road.restrictions.prohibited_transitions prohibited_transitions
road.surface road_surface
road.flags road_flags
road.width width_rules
road.lanes lanes
road.level level_rules

Additionally, for the non-geometry vehicle scoping block (when: vehicle:), we will simplify that frequently used structure as follows (note that this is a breaking change for consumers of this data):

speed_limits:
  when:
    ...
    vehicle:
      - dimension: <axle_count, height, length, weight, width>
        comparison: <greater_than, greater_than_equal, equal, less_than, less_than_equal>
        value: str
        unit: str

vs previously:

speed_limits:
  when:
    ...
    vehicle:
      axle_count:
        is_more_than:
          value:
          unit:
        is_less_than:
          ...
        ...
        ...
      height:
        ...
      length:
        ...
      weight:
        ...
      width:
        ...

See additional context in this discussion

Reference

  1. RFC: Transportation structured columns #184
  2. https://github.com/OvertureMaps/tf-transportation/issues/229

Testing

Updated all examples and counterexamples to reflect changes, including copying subproperties out of road to separate properties.

Checklist

  1. Add relevant examples.
  2. Add relevant counterexamples.
  3. Update any counterexamples that became obsolete. For example, if a counterexample uses property A but is not intended to test property A's validity, and you made a schema change that invalidates property A in that counterexample, fix the counterexample to align it with your schema change.
  4. Update in-schema documentation using plain English written in complete sentences, if an update is required.
  5. Update Docusaurus documentation, if an update is required.
  6. Review change with Overture technical writer to ensure any advanced documentation needs will be taken care of, unless the change is trivial and would not affect the documentation.

Documentation Website

Docs preview for this PR.

ibnt1
ibnt1 previously approved these changes May 29, 2024
schema/transportation/segment.yaml Show resolved Hide resolved
schema/transportation/segment.yaml Show resolved Hide resolved
@vcschapp vcschapp merged commit ff1d5b3 into dev May 30, 2024
2 checks passed
@vcschapp vcschapp deleted the segment-restructure branch May 30, 2024 20:07
@BruceHarold
Copy link

Any problem using float to model speed limit vehicle dimension values?

vcschapp pushed a commit that referenced this pull request Jun 12, 2024
* Flatten road wip

* Flatten road wip

* Fixes and update examples

* Fix and add descriptions

* Update docs, add deprecation comments

* Fix bad merge, separate segment and conditional road properties

---------

Co-authored-by: Brad Richardson <[email protected]>
@brad-richardson brad-richardson mentioned this pull request Jun 13, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants