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

Dynamic Color Mapping Based on Attribute Values #16

Open
MisterGC opened this issue Jul 13, 2023 · 2 comments
Open

Dynamic Color Mapping Based on Attribute Values #16

MisterGC opened this issue Jul 13, 2023 · 2 comments
Labels
Styling Touches erdblick WASM style sheet processing. Unrefined

Comments

@MisterGC
Copy link
Contributor

Current Situation: Currently, the MapViewer does not have an automated feature for generating a dynamic color map based on the attribute values within the map. This constraint restricts the users' ability to visualize and understand the diversity of attribute values distributed across the map in an efficient way.

Desired Enhancement:

The visualization feature should be upgraded to generate dynamic color maps based on the attribute values of the chosen feature. This feature will be an improvement over the current manually assigned color schemes or static color mappings. Upon selection of an attribute, the system would automatically determine a color scale based on the range of the attribute values, mapping each value to a corresponding color within that scale.

For example, if a user chooses the "speed limit" attribute on a city map, the system would calculate the range of speed limits across the map and assign a color scale accordingly. Lower speed limits might be rendered in cooler tones, while higher speed limits could be represented in warmer tones.

User Customization:

In addition to the automatic color mapping based on attribute values, users should have the flexibility to customize the generated color scale. The interface should allow users to easily adjust the color range, assign specific colors to certain values, and modify the gradient according to their preferences.

Filter Integration:

An extension to this enhancement could be the integration with filter statements. Users can apply the color mapping in conjunction with a filter, such as displaying the speed limit-based coloring only on highways while graying out other road types. This additional functionality would allow users to focus on specific map features and perform a more focused analysis.

Key Advantages:

  1. Quick Identification of Patterns and Outliers: This dynamic color mapping feature can help users visually identify patterns, trends, and anomalies, such as a wrong speed limit assigned within a city zone.

  2. Adaptive to Displayed Map Features: The color mapping will adjust based on the attributes of the currently displayed features, enhancing user comprehension of the given view.

  3. User-friendly: This feature simplifies the analysis of map features by doing away with the need for users to manually set value ranges and color schemes, yet allowing them the flexibility to customize the color scale if desired.

This enhancement, allowing for dynamic color mapping based on attribute values, would render MapViewer a more effective and intuitive tool for visual data analysis. It would help users to better understand complex spatial data through easy-to-grasp color-based visualizations.

@josephbirkner josephbirkner added the Styling Touches erdblick WASM style sheet processing. label Sep 29, 2023
@josephbirkner
Copy link
Collaborator

josephbirkner commented Sep 29, 2023

So, in summary, the idea is that the color field of the style can be a filter-expression like:

colorMap(functionalRoadClass, 1, "red", 2, "blue", ...) or
colorMap(**.speedLimitKmh, 0, "red", 100, "blue", 255, green)

The function would automatically apply interpolation between the colors where no exact match is found, and clamp to the first/last color for outliers?

@fklebert
Copy link

The function would automatically apply interpolation between the colors where no exact match is found, and clamp to the first/last color for outliers?

Why does it not simply throw an error if an unsupported color is used?

@josephbirkner josephbirkner added this to the 0.3.0 milestone Sep 29, 2023
@MisterGC MisterGC removed this from the 0.3.0 milestone Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Styling Touches erdblick WASM style sheet processing. Unrefined
Projects
None yet
Development

No branches or pull requests

3 participants