I am trying to display the current position of every device registered in my geomesa-accumulo database through geoserver's WPS. Since each device sends its position every X seconds. I am using geomesa's TrackLabel process to get the last position of each device, the WPS process setup is:
track: device_id
dtg : date_time
Using I run the process and display the results using leaflet. But, I think the results are not what I expected, because if I run the following query in jupyter notebook:
spark.sql("select device_id, date_time, position from positions where device_id = 145 order by date_time desc limit 1").show()
It returns that the last position was at 2016-05-17 20:47 but the TrackLabel process says 2016-03-05 20:12.
My questions: If this the correct approach, then what am I missing? Or what should be the correct approach for this problem?
Since you're querying the entire dataset, you may be hitting the WFS result limit. See here for details