locationtech/geomesa — pull request #164 by aannex-ccri (2014-07-28 20:00:53+00:00)
Title: GEOMESA-108 Density Iterator for non-point geometries

Made more fixes as per WIP comments, added GridSnapTest(s). The intent of this ticket was to allow for polygons and line strings to be rasterized as point geometries are in the density iterator. However, currently results are inaccurate due to intersections between the geoms and the geohashes being counted twice. This will need to be looked into further.

Polygons are handled by creating a polygon grid corresponding to the raster cells in the density iterator, for each of the rectangles that intersect the target geometry the corresponding cell in the raster is increased by one. Due to rounding errors, the number of returned cells covering a given bbox may be lower than the expected number.

Linestrings are handled by generating a sequence of points between any two given vertices that fall into raster cells via the Bresenham Line Algorithm

MultiPolygons, Multilinestrings, and Multipoints are also handled by iterating over the available geometries in the given multigeom.

A small set of tests were written for GridSnap, however this will likely need to be improved and expanded.

NOTE: this includes a new dependency org.geotools.grid
NOTE2: this is a newer version of a previous PR, but due to git-badness it had to be dropped.

fixed typos and used suggestions from previous PRs.