-
Notifications
You must be signed in to change notification settings - Fork 1
Prototyping notes
- this will base on the swt viewer from the geotools codebase
- it will be necessary to make the viewer time aware
- steps:
- mark certain file extentions as time aware, in order to be able to identify layers that can handle time (they also should be able to supply the start and end timestamp)
- read the files (gpx, rep, etc.) into featurecollections that have a common time field (timestamp in the examples provided)
- I would keep the timestamp field both as long (date.getTime()) and as readable time string. The first for the filtering and the second for the labels
- add the featurecollections the usual way to the MapContent (as already done in the swt example)
- when time constraints are applied, apply them as filters to the maplayers
Ian, this is a bit different from how you were imagining it in your object model, I guess. But given the possibility to interact with filters instead of tinkling on the renderers, is a bit plus in my opinion.
Styling is a bit of a problem, since both the lines and the points with labels are needed. Also both should be filtered by the time filters.
The only option I see here (apart of writing a new renderer, which I would rather avoid), is to create always two featurelayers, which will then be both added, but represent the same dataset.
I don't see a way to create the requirement "just show current location, with fading trail going back 10 minutes". I don't think there is an existing way to create fading lines based on properties from the attributes. This, I think, would need a custom renderer.
Implementation of how to use filters to render by a given time interval constraint. The class also shows how to render the same dataset as double layer of points and lines.
The style part is handled apart in this file. Most probably it will be necessary to handle style in a custom way for these kind of datasets, sinc ethey will need to be optimized after user requirement.