elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.73k stars 8.14k forks source link

[Maps] Add dynamic day and night overlay #60231

Closed pingoolefoo closed 1 year ago

pingoolefoo commented 4 years ago

Describe the feature: When creating a real-time map of the activity of a company, it might be useful to display the day / night cycle so that anyone can easily correlate the activity with the daylight cycle.

Ideally, we could have a shaded overlay with civil twilight, nautical twilight, astronomical twilight and night.

Describe a specific use case for the feature: This kind of map can be very useful when dealing with planes & transportation scheduling, preview

Side note: I've also found this project: rossengeorgiev/nite-overlay

elasticmachine commented 4 years ago

Pinging @elastic/kibana-gis (Team:Geo)

thomasneirynck commented 4 years ago

@pingoolefoo thanks for the feature request. I assume it would be dynamically linked to the time-picker?

Do you have an idea on how this layer should behave when a time-range is selected that stretches multiple days/hours?

pingoolefoo commented 4 years ago

@thomasneirynck I was initially thinking of this as a somewhat "real-time" map, but your point is completely valid.

To me, it can be linked with the time-picker if and only if data fits in narrow time buckets. To display larger timescales, one might have to use some sort of animation to show the evolution of the dataset.

jsanz commented 4 years ago

This layer (maybe we could consider it a basemap extension?) would only make sense if there's something like a time slider that represents a moment in time inside the wider range expressed in the general Kibana time picker.

The discussion around a time slider is captured at #27714 so unless a better UI can be defined I'd say a feature like this is blocked.

pingoolefoo commented 4 years ago

A feature like this can effectively be considered at first as a basemap extension to represent a moment in time. I do believe that the time slider can be added at a later time, as the elasticians & the greater elastic community come with a better ui.

nreese commented 4 years ago

A feature like this can effectively be considered at first as a basemap extension to represent a moment in time. I do believe that the time slider can be added at a later time, as the elasticians & the greater elastic community come with a better ui.

+1. I would not block a day/night layer by a time slider. Kibana already has a time picker that could be used to adjust the time.

I think it would make sense to have an EMS service that accepts a time range and returns day/night cycle raster tiles for that range. If the range is over 24 hours then the service could just return 400 code. On the Kibana side, the layer could disable itself when the selected time range is greater than 24 hours just like layers show/hide based on zoom level.

jsanz commented 4 years ago

Maybe we could compute the overlay for the max/min boundaries of the time picker, when they don't span for more than 24 hours, and then use the midpoint of the range if it's smaller than something like an hour?

pingoolefoo commented 4 years ago

Maybe we could compute the overlay for the max/min boundaries of the time picker, when they don't span for more than 24 hours, and then use the midpoint of the range if it's smaller than something like an hour?

Good idea. Doing so will introduce some approximations but will be good enough for most scenarios.

nickpeihl commented 4 years ago

Would we need to invert the layer when displayed over the Dark road map? 😅

Maybe we could compute the overlay for the max/min boundaries of the time picker, when they don't span for more than 24 hours, and then use the midpoint of the range if it's smaller than something like an hour?

The point-in-time we use for the overlay must be blatantly obvious to the user in the UI (and maybe separately configurable), especially when looking at a large time range in Kibana.

I think it would make sense to have an EMS service that accepts a time range and returns day/night cycle raster tiles for that range. If the range is over 24 hours then the service could just return 400 code. On the Kibana side, the layer could disable itself when the selected time range is greater than 24 hours just like layers show/hide based on zoom level.

I think it could also be accomplished on the client. The code to create a GeoJSON polygon is not computationally heavy. Then it's just a matter adding a new overlay layer containing the calculated GeoJSON polygon on the map. Leaflet.Terminator is another example we could draw from.

nreese commented 4 years ago

I think it could also be accomplished on the client. The code to create a GeoJSON polygon is not computationally heavy.

+1, Keeping everything local would be great.

Schiffsradar commented 2 years ago

Here is a Website that uses a Leaflet Map with Day and Night Layer. Link to Website There you can see the shaded overlay with civil twilight, nautical twilight, astronomical twilight and night.

elasticmachine commented 1 year ago

Pinging @elastic/kibana-presentation (Team:Presentation)

nreese commented 1 year ago

In order to provide better transparency of priorities, issues that will not be prioritized within the next 24 months are being closed.

Tracking request in Maps ice box https://github.com/elastic/kibana/issues/154870