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

Ignore some roads for the editor #66

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tordans
Copy link
Collaborator

@tordans tordans commented Feb 2, 2022

With this change, the following roads will be ignored when loading data for the editor:

  • service=emergency_access
  • service=parking_aisle
  • service=driveway
  • And also access=private

At least for Berlin, there should never be parking data needed for those roads, since they are implicitly no parking.

Is this the same where you are mapping? If not, I would change this PR to move those configuration in a local settings file per country.


Update: Converted to draft

I am not sure anymore this change actually does what I want it to do. I would still love to year your feedback on the general idea (and maybe config), but will update here once I know that this is working.

Update 2: The codes does what I want it to do now.

The question is, though, if this is nice enough to be used.

  • A new feature in this branch is c35e826 => What would be a clean way to re-render the dropdown? Or how could this code be refactored to fit into the style of the app? – Or should I remove it again?

  • 3e273e6 filters the roads described above. => Is this approach OK?

  • Also, I would love to learn how the data fetching actually works with the osm.org API. Where does the script specify the condition of which data is included? (Like the overpass query did.)

There is an implicit no parking (or even no stopping?) on emergency_access.
@tordans tordans changed the title Ignore some types of roads Ignore some roads for the editor Feb 2, 2022
@tordans tordans marked this pull request as draft February 2, 2022 19:34
This function was not used anymore.
In getUrl(), the option to use overpass is only given in viewerMode. But the Fetch options dropdown suggests is can be used in both modes.

With this change, the dropdown is hidden unless it actually does something.

WIP => However, this solution feels too hacky to use this way. I had to remove and re-add the fetch controls in order to get a re-render going. Is there a nicer way to do this?
Some service roads and roads without access should not be visible in the editor UI. This will filter those roads.
@tordans
Copy link
Collaborator Author

tordans commented Feb 2, 2022

I will leave this as draft, since it's not merge-ready but it would be great to get some feedback on the questions in 'Update 2'.

@zlant
Copy link
Owner

zlant commented Feb 3, 2022

Road filtering must be here https://github.com/zlant/parking-lanes/blob/master/src/parking/interface.ts#L175
Only roads without parking tags can be ignored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants