Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Using Geomesa Density Iterator

Hi Vaibhav,

The density iterator is used to generate heatmaps. Usually it is triggered via SLD - see the tutorial here:

http://www.geomesa.org/documentation/tutorials/geomesa-examples-gdelt.html#heatmaps

In general, the density iterator 'bins' points into a grid (of pixels) and adds up the weights (counts) in each pixel. This way, instead of sending back all the features to the client, we send back a reduced set, with one feature per pixel.

If you'd like to trigger it directly through the API, you can set hints in your Query object like so:

https://github.com/locationtech/geomesa/blob/geomesa-1.2.1/geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/iterators/DensityIteratorTest.scala#L49-L53

Note: you will need to 'decode' the results to get back the simple features-per-pixel.

Although not shown here, you can also specify a 'weight' hint to use a numeric attribute or CQL _expression_ to weight your features, instead of just counting them.

This example is scala code - we don't have a java interoperability layer for the density iterator, as it's not a normal use case to call directly. You can still call it, you just might need some funky syntax to access the scala classes.

Thanks,

Emilio

On 05/09/2016 12:38 AM, vaibhav.thapliyal wrote:
Dear all,

I have some questions regarding the geomesa Density Iterator:
  • What is its use case? 
  • How do I use it using the JAVA API?
  • Is the DensityIterator used to calculate the spatial densities, in the geomesa-spark example? 

Thanks
Vaibhav



_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.locationtech.org/mailman/listinfo/geomesa-users


Back to the top