-
Notifications
You must be signed in to change notification settings - Fork 244
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
Added a new end point that determines a road type according to lon and lat #1583
base: dev
Are you sure you want to change the base?
Conversation
…d lat coordinates.
Codecov Report
@@ Coverage Diff @@
## dev #1583 +/- ##
==========================================
- Coverage 52.71% 51.09% -1.62%
==========================================
Files 62 62
Lines 6031 6012 -19
==========================================
- Hits 3179 3072 -107
- Misses 2852 2940 +88
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Work!
I added some comments for you to address - what do you think?
@@ -791,6 +792,68 @@ def is_anonymous(self): | |||
def get_id(self): | |||
return self.id | |||
|
|||
class WazeAllerts(Base): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waze alerts table exists (See class WazeAlert in this file)
What there's a need in another one?
from sys import maxsize | ||
@user_optional | ||
def get_road_type(lat: float, lon: float): | ||
offset = 0.00001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you decide on the offset size (0.00001)?
In general - I suggest using geographical query instead of the query below -see geom.intersects here
In this case - I think that using both the geographical query and the road_number / street name together can be very powerful - just using one of them is not enought.
However - we can start with geographical query and improve it.
No description provided.