Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COLUMN_ID = 0 COLUMN_NAME = 1 COLUMN_HIGHWAY = 2 COLUMN_LAT = 3 COLUMN_LON = 4 COLUMN_YEAR_BUILT = 5 COLUMN_LAST_MAJOR_REHAB = 6 COLUMN_LAST_MINOR_REHAB = 7 COLUMN_NUM_SPANS

COLUMN_ID = 0 COLUMN_NAME = 1 COLUMN_HIGHWAY = 2 COLUMN_LAT = 3 COLUMN_LON = 4 COLUMN_YEAR_BUILT = 5 COLUMN_LAST_MAJOR_REHAB = 6 COLUMN_LAST_MINOR_REHAB = 7 COLUMN_NUM_SPANS = 8 COLUMN_SPAN_DETAILS = 9 COLUMN_DECK_LENGTH = 10 COLUMN_LAST_INSPECTED = 11 COLUMN_BCI = 12

INDEX_BCI_YEARS = 0 INDEX_BCI_SCORES = 1 MISSING_BCI = -1.0

EARTH_RADIUS = 6371

def find_bridges_in_radius(bridges: List[list], lat: float, lon: float, radius: int, exclusions: List[int]) -> List[int]: """Return the IDs of the bridges that are within radius kilometres from location (lat, lon). Include bridge IDs that are exactly radius kilometres away. The bridge IDs in exclusions are not included in the result.

Preconditions: - (lat, lon) is a valid location on Earth - radius > 0

>>> example_bridges = create_example_bridges() >>> find_bridges_in_radius(example_bridges, 43.10, -80.15, 50, []) [1, 2] >>> find_bridges_in_radius(example_bridges, 43.10, -80.15, 50, [1, 2]) [] """

Anyone know how to solve this function?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

Which team solution is more likely to be pursued and why?

Answered: 1 week ago

Question

4. I can tell when team members dont mean what they say.

Answered: 1 week ago