The poseidon viewer can now extract time range, but because ospy.utils.viewer_to_range() was written before that, it needs a little extra lines of code to accomplish that.
The following example illustrates how to extract time range, taken from work - in -progress tutorial for Poseidon viewer interface:
from poseidon_viewer import get_shapes
import json, jmespath
# From the Poseidon-viewer save to disk function:
shapes = json.loads(get_shapes())
ps = jmespath.search('features[?geometry.type==\'Point\'].{type:geometry.type, coordinates:geometry.coordinates,timeFrom:properties.timeFrom,timeTo:properties.timeTo}', shapes)
this_time = ps[0]['timeFrom'][:-1]
lons, lats = ospy.utils.viewer_to_range(ps)
Description
The poseidon viewer can now extract time range, but because
ospy.utils.viewer_to_range()
was written before that, it needs a little extra lines of code to accomplish that.The following example illustrates how to extract time range, taken from work - in -progress tutorial for Poseidon viewer interface:
Proposed new feature:
this requires a minimal change to
viewer_to_range
... i will work on this early next week...