Open rjksmith opened 3 years ago
This solves a special case of deforming regions, where it is guaranteed that the number and the ordering of the region vertices remains the same across snapshots.
A "general" deforming region would change location, shape, number of vertices, and even number of faces and holes. For example an oil spill may be decomposed into multiple smaller spills.
I agree - the number and order of vertices must be the same. However, this special case can be generalised as follows.
Generalised Deforming Region Without Holes
Consider two consecutive observations of a deforming region at times A and B. For simplicity, assume there are no holes, though this method can be extended to include them too.
WEBVMT
NOTE Start with isosceles triangle at t = 1 Deform to square at t = 5 Include redundant second point at t = 1 for deforming region First & third points change, second & fourth remain static
00:00:01.000 —> 00:00:05.000 {"polygon": {"points": [ {"lat": 50.0, "lng": 0.1}, {"lat": 50.0, "lng": 0.3}, {"lat": 50.0, "lng": 0.5}, {"lat": 50.4, "lng": 0.3} ]}} {"interp": {"to": {"points": [ {"lat": 50.2, "lng": 0.1}, {"lat": 50.0, "lng": 0.3}, {"lat": 50.2, "lng": 0.5}, {"lat": 50.4, "lng": 0.3} ]}}}
**Generalised Deforming Region With Holes**
WebVMT does not currently support holes in regions, but this feature would be simple to add and could support deforming regions using a similar method to that above. In this case, both regions must have the same number of holes though 'redundant' holes, i.e. a hole where all vertices are concurrent, could be inserted to support events when existing holes close or new holes open.
A deforming region is one whose boundary includes vertices that change location over time relative to each other. An oil slick is a real world example of this.
Such features can be represented using WebVMT with the interpolation enhancement proposed at TPAC 2020. As a simple example:
cc @mahmsakr