GIScience / orstools-qgis-plugin

Plugin for QGIS with a set of tools to use openrouteservice API´s, based on openstreetmap
https://plugins.qgis.org/plugins/ORStools/
MIT License
91 stars 31 forks source link

Alter Layer handling when requesting `extra_info` #252

Open koebi opened 1 month ago

koebi commented 1 month ago

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.