locationtech/geomesa — pull request #130 by aannex-ccri (2014-07-17 20:38:18+00:00)
Title: geomesa-108 work in progress

This WIP is for Geomesa-108, adding support to the DensityIterator for non-point geometries. The geometries now supported include: Points, MultiPoints, LineStrings, MultiLineStrings, Polygons, and MultiPolygons. Polygons and Lines are approached in different ways in this WIP:

Lines and MultiLines are *drawn* using the bresenham's line algorithm to create points along the line between any two points in a linestring sequence of points.

Polygons and MultiPolygons are *drawn* by first constructing a geotools Oblong grid of rectangles over the extent of the Envelope provided, as an iterator. The resulting grid is then intersected with the given polygon, and the centroids of intersecting grid rectangles are then counted as *hits* in the result table.

Currently there is an issue with non-point geometries being duplicated, as well as an issue with the Oblong grid not making exactly as many rectangles as I expected. So explicit tests are not exactly written yet.