Skip to content

Conversation

@wael6954
Copy link

@wael6954 wael6954 commented Sep 17, 2025

What this pull request accomplishes:

  • Updates miovison.api.intersections table with values for new cameras
  • Updates miovison.api.intersections table with values for null values in some existing cameras
  • Updated readme.md to reflect simpler process for next time

Issue(s) this solves:

What, in particular, needs to reviewed:

in [volumes/miovision/sql/updates]

  • update-date.sql
  • update-int_id-px-geom.sql
  • update-intersection_name.sql
  • update-leg_restricted.sql
  • update-street_cross.sql
  • update-street_main.sql

in [volumes/miovision/update_intersections]

  • readme.md

@wael6954 wael6954 requested a review from gabrielwol September 17, 2025 14:59
@wael6954 wael6954 self-assigned this Sep 17, 2025
@wael6954 wael6954 linked an issue Sep 17, 2025 that may be closed by this pull request
@wael6954 wael6954 changed the base branch from master to 1080-automatically-add-miovision-intersections September 17, 2025 15:04
GROUP BY intersection_uid;

-- Create index
CREATE INDEX idx_temp_intersection_uid ON temp_min_dates(intersection_uid);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice update on this sql. You don't need to add an index here because this is a very small table. Indexes work like textbook indexes, to help identify which chapter/page to look at, but in this example your textbook is one paragraph.

@@ -0,0 +1,12 @@
UPDATE miovision_api.intersections
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try combining the s_leg_restricted and n_leg_restricted queries. You can easily update multiple columns like UPDATE x=y, a=b, and add an else clause for the values that don't need to be updated. Same for cross st/ main st queries.

@@ -0,0 +1,37 @@
WITH intersections(id, intersection_name_api) AS (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fluff your sql please! Will send notion instructions.

@wael6954 wael6954 requested a review from gabrielwol September 17, 2025 17:23
Comment on lines +3 to +11
('3a6c4b1b-91cc-4600-8b9e-f3416839397b', 'The Queensway and The East Mall'),
('ae52ca3c-9a25-4c2c-a726-24388616fe54', 'Lawrence Ave E and Fortune Gate'),
('c85d49f2-bd4a-4649-b967-ce24e39ac102', 'Lawrence Ave E and Galloway Rd'),
('0f37f5c0-9eb0-45d8-80cf-bd3d3718c2d4', 'Lawrence Ave E and Mossbank Dr'),
('0b4e1e39-a9e9-46a3-895f-0f21924c0e54', 'Lawrence Ave E and Scarborough Golf Club Road'),
('01150688-deb1-4565-a0da-236ed77cad12', 'Orton Park Rd and Lawrence Ave E'),
('0726384f-e753-4826-9ef2-72a817776ca5', 'Overture Rd and Lawrence Ave E'),
('843d1d1f-5350-4aaf-a764-ec8ebf847673', 'Greenholm Circuit and Lawrence Ave E'),
('5de86391-7559-48e3-aa46-7cfe0b28bd05', 'The Queensway and The West Mall')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I was QCing this one I noticed 3 intersections were being tagged to the same intersection at Lawrence/Yonge.
Needed to change the abbreviations to get correct matches: Greenholm Crct, Scarborough Golf Club Rd, Fortune Gt.

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.

Updating Miovision Intersection Details

2 participants