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

Alter Layer handling when requesting extra_info #252

Open
koebi opened this issue May 17, 2024 · 0 comments
Open

Alter Layer handling when requesting extra_info #252

koebi opened this issue May 17, 2024 · 0 comments

Comments

@koebi
Copy link
Collaborator

koebi commented May 17, 2024

The current behaviour when requesting extra_info is to have one feature per line segment in the output line that has the requested extra_info-values as attributes.

For longer routes, this results in a lot of features.
The intuitive assumption, however, would be that all features where the extra_info attribute combination doesn't change are dissolved into one feature, especially when only requesting one extra_info.

When shorter routes are requested with multiple parameters in extra_info, there are a lot of attribute combinations, so dissolving wouldn't change much.

Additionally, dissolving can be done using QGIS builtin processing tools.

There exist a few different approaches to address this issue:

  1. [Current] do not dissolve and leave the task to the user
  2. Dissolve only when one extra_info is requested. This could even be forced by setting allowMultiple=False on the processing parameter.
  3. Return one layer per requested extra_info and dissolve that
  4. Dissolve on every change of extra_info attribute combination

For every approach, dissolving could be made optional via another parameter.

There might be use cases, where the non-dissolved output is the wanted output, so every dissolve would have to be undone.

koebi added a commit that referenced this issue May 17, 2024
koebi added a commit that referenced this issue May 17, 2024
Add extra_info to advanced parameters in directions processing algorithms.
When requesting extra_info, a layer is created with one feature per line segment,
containing the requested extra_info as attributes.

Requested extra_info that is not available (such as OSMID or green atm) will result in an empty attribute column, with a log message accompanying it.

The returned layer could be optimized, this is discussed in #252 .

Some extra_info is decoded from the API-returned integers into human-readable strings, so different field types are needed. This needs to be updated, if the API ever changes.
Currently, not all extra_info where this would be available is covered.

The csv extra_info needs csv_column and csv_factor, a corresponding hint is on the latter two parameters

Co-authored-by: Merydian <Tillfrankenbach@web.de>
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

No branches or pull requests

1 participant