keplergl / kepler.gl

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
http://kepler.gl
MIT License
10.28k stars 1.73k forks source link

Bi-directional line / polygon labelling and stroke widths #1563

Open cdeverell opened 3 years ago

cdeverell commented 3 years ago

Feature Request / Purpose. Labelling / stroke width of polylines that represent bi-directional roads with data from traffic models. This would enable quick and easy visualization of traffic modelling data for sharing amongst project team members and externally who don't have access to licensed transport modelling software.

Describe the solution you'd like Ability to label a line (or line within a polygon geojson) based on directionality. For example, two lines with the same geometry, however with the source / target at opposite ends. Solution could be one label above the line and one below. See included file for example.

Ability to visualize the stroke width of a line (or line within a polygon geojson) based on directionality. As above, but stroke width extends out based on the direction of the line. See included file for example.

Describe alternatives you've considered Developing an external process to offset each line based on direction so that widths or colors can be used to visualize directional characteristics (e.g. traffic flow, speed etc.)

Additional context Screenshot of potential end solution showing bi-directional labelling and stroke widths. Kepler_FeatureRequest_Example

heshan0131 commented 3 years ago

what would be the rule for offsetting the lines?

cdeverell commented 3 years ago

Depending on the side that cars are driven on, either 90 degree or 270 degrees to the direction of the line if two lines share the same start and end points (but reversed). Not sure what the distance offset would be, may require some testing.

image