1

I noticed at the bottom of this GeoMesa Cassandra page:

http://www.geomesa.org/documentation/1.3.0/user/cassandra/geoserver.html

that it says:

"Also remember that all queries to a Cassandra layer must include both a bbox component and a date/time between component as part of the CQL filter."

How does this effect compatibility with WMS compliant tools/apis (ie using the geoserver rest api to access layers) such as Leaflet.js and the QGIS time manager plugin? What I would like to do is implement an automatic playback (ie - like playing a movie) for a range of time, displaying the layers across a particular time period with data stored in Cassandra via GeoMesa, but obviously I want to use Leaflet.js and/or the QGIS time manager plugin to automatically supply the updated time parameters to implement this. It seems though that the statement above as it applies to GeoMesa and Cassandra would not comply with the WMS standard which Leaflet.js and the time manager plugin are following.

Am I incorrect in this assessment of GeoMesa and how it stores/exposes data to/from Cassandra? If I am incorrect, is it possible to use the open source tools that I have mentioned for autoplayback which follow the WMS standard?

Thanks.

1 Answers1

3

Full query support was added to the GeoMesaa Cassandra implementation starting in version 1.3.1. However, even in earlier versions, the Cassandra data store is still WMS compliant when installed in GeoServer. It won't return data for queries that don't have both a bounding box and a time range, but as long as you satisfy those requirements, you can call it from leaflet or qgis.

Emilio Lahr-Vivaz
  • 1,439
  • 6
  • 5
  • Thanks for responding, Emilio. I just realized by looking at the REST call that the bbox parm is added due to the layer creation/configuration (sorry I did not understand this). But what about the time parameter, meaning if I add "Time" on the "Dimensions" layer tab in GeoServer, choose a time attribute, and then add "&TIME=2018-01-08T00:00:00.0Z/2018-01-08T23:59:59.999Z" to the end, nothing is displayed. For the time dimension I have "Presentation" as "List" and default value as "Use smallest domain". If this should be another question, lmk and I will enter, but I think it is relevant here.ty – user1930364 Feb 27 '18 at 14:49
  • Is the time attribute you've chosen the primary date that is indexed by geomesa? See [here](http://www.geomesa.org/documentation/user/datastores/index_config.html#setting-the-indexed-date-attribute) – Emilio Lahr-Vivaz Feb 27 '18 at 16:14
  • When you say primary date, do you mean the attribute that I am setting for this: simpleFeatureType.getUserData().put(SimpleFeatureTypes.DEFAULT_DATE_KEY, "myDateTime"). Is that what you are referring to? If so, yes that is the attribute I am trying to use for time in the GeoServer layer definition. Note that I am not setting an index on any of the attributes. In the simple feature type attribute definition my time attribute is simply defined as "myDateTime:Date". And that is the one I am trying to use as the time field. Should I set :index=full on myDateTime? Thanks again – user1930364 Feb 27 '18 at 16:47
  • yes, that is the primary date. you don't need to use 'index=full' to use the primary spatio-temporal index - that would create a date-only index, although that isn't implemented in Cassandra until geomesa 1.3.1. – Emilio Lahr-Vivaz Feb 27 '18 at 17:03
  • Does your query have a bounding box that is smaller than the whole world? If the bounding box is -180,-90,180,90 then it doesn't count as an actual filter. – Emilio Lahr-Vivaz Feb 27 '18 at 17:05
  • Is there a reason you are using an older version of geomesa? You picked the last version that doesn't have full Cassandra support. I would suggest trying the latest release, currently 2.0.0-m.1. – Emilio Lahr-Vivaz Feb 27 '18 at 17:06
  • A couple of things - I double checked, and I am indeed setting :index=full on the time attribute. It sounds like I should remove that. As far as the bounding box goes, for "Native" I am just choosing "Compute from data" on the GeoServer layer creation screen, which gives me: Min X: -180, Min Y: -90, Max X: 180, Max Y: 90 and for "Lat/Lon" BBox I choose "Compute from native bounds", and that gives me the same values that I just listed. Is this incorrect? If so, what could I reduce them too for testing, let's say if all of my polygons are in US / Europe? And yes I can try upgrading to 2.0.0-m.1 – user1930364 Feb 27 '18 at 17:23
  • you don't need to modify the bounds on the layer screen, but you need to modify the bounds in the geoserver request URL – Emilio Lahr-Vivaz Feb 27 '18 at 17:46
  • I just noticed that you mentioned polygons - I believe that 1.3.0 Cassandra only supports point geometries. If you are using polygons you'll need to update to a newer version. – Emilio Lahr-Vivaz Feb 27 '18 at 18:23
  • What if I were to simply reduce the bbox boundaries on the layer screen? Would that be sufficient to capture the data just leaving bbox alone and then just letting Leaflet.js and the qgis time manager plugin update just the TIME parameters? Or are you saying that the geomesa bbox param somehow must be changed with every request? But why, especially if the layer images are progressing in time in the same general area. As an example, what if I just wanted to set the bbox to the region of southern Louisiana here (last vid): https://anitagraser.com/2015/08/10/using-timemanager-for-wms-t-layers/ ty – user1930364 Feb 27 '18 at 18:42
  • Or even setting the layer boundaries to the whole of the US should also be sufficient in this case, no? I guess what I am saying is what am I changing the bbox parms *to* each time (can you give me an example) if I am just trying to do a visual autoplay for the same region in a time series? Thanks again – user1930364 Feb 27 '18 at 18:46
  • the bounding box doesn't have to change, but you have to have a bounding box that is smaller than the whole world. you example of always sending a bounding box for Louisiana would be fine. – Emilio Lahr-Vivaz Feb 27 '18 at 19:16
  • I added a smaller bounding box now to the layer config, and I got a little further, but the time query never returns anything when the timestamp portion of the query is specified. When I click a point in openlayer preview the time field reads: 1/8/18 9:42 AM. This query works but it returns everything for the day: &TIME=2018-01-08/2018-01-08 and this time parameter does not return anything at all: &TIME=2018-01-08T09:40:00.0Z/2018-01-08T09:43:00.0Z As noted from OL preview, I have a row with 09:42:00 in the data, and I tried &TIME=2018-01-08T09:40Z/2018-01-08T09:43Z and a few other variations. – user1930364 Feb 27 '18 at 21:26
  • Emilio - thank you very much for the insight on reducing the bounding box. As it turned out, my time values in the query were wrong. Thanks again! – user1930364 Feb 28 '18 at 14:00