public boolean isFitForAggregation(Point point) { boolean result = false; for (String propertyName : GlobalProperties.getPropertiesOfInterestDatabase().keySet()) { Object numberObject = point.getProperty(propertyName); if (numberObject instanceof Number) { result = result || !Utils.isNumberObjectNullOrZero((Number) numberObject); } else { /* * not a number, we cannot aggregate this currently */ result = result || false; } } /* * also check for bbox */ if (bbox != null) { Coordinate pointCoordinate = new Coordinate(point.getX(), point.getY()); if (!bbox.contains(Utils.geometryFactory.createPoint(pointCoordinate))) { return false; } } return result; }