-
Notifications
You must be signed in to change notification settings - Fork 2
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
VRN Realtime Pull Converter: Park and Ride #137
base: main
Are you sure you want to change the base?
Conversation
import_parking_site_exceptions: list[ImportParkingSiteException] = [] | ||
|
||
response = requests.get( | ||
url='https://spatial.vrn.de/data/rest/services/Hosted/p_r_parkapi_static/FeatureServer/5/query?where=objectid%3E0&outFields=*&returnGeometry=true&f=geojson', |
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.
This line is too long
for feature_input in feature_inputs: | ||
static_parking_site_inputs_by_uid[str(feature_input.properties.vrn_sensor_id)] = feature_input.to_static_parking_site_input() | ||
|
||
for realtime_vrn_p_r_input in realtime_vrn_p_r_inputs: |
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.
Is it by purpose that you ignore all datasets which don't have realtime data?
parking_site_uid = str(realtime_vrn_p_r_input.uid) | ||
if parking_site_uid in static_parking_site_inputs_by_uid: | ||
# Update realtime data with only parking places having static data | ||
realtime_vrn_p_r_input.uid = static_parking_site_inputs_by_uid[parking_site_uid].uid |
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.
Why do you do it this way?
The Verkehrsverbund Rhein-Neckar wants to bundle the data sources and make it available via one Interface (their GIS-System), which conforms with Open Data License Germany. Therefore, Instead of pulling data from 3 different data providers' APIs (as it is currently programmed in this converter) only one data source will be used. I will suspend the development of this converter till November when the new real-time interface will be ready. |
Please keep in mind to rebase it as soon as it gets ready, as there was a ruff update which changed formatting rules. |
This PR integrates the Park and Ride realtime data from Verkehrsverbund Rhein-Neckar GmbH. The converter pulls static data made available via a URL, and the realtime data are pulled from Multiguide API and Sonah API, and bundled together.