@Override public Geometry next() { Polygon input_polygon = (Polygon) (m_bufferer.m_geometry); if (m_index < input_polygon.getPathCount()) { int ind = m_index; double area = input_polygon.calculateRingArea2D(m_index); assert (area > 0); m_index++; while (m_index < input_polygon.getPathCount()) { double hole_area = input_polygon .calculateRingArea2D(m_index); if (hole_area > 0) break;// not a hole m_index++; } if (ind == 0 && m_index == input_polygon.getPathCount()) { return m_bufferer.bufferPolygonImpl_(input_polygon, 0, input_polygon.getPathCount()); } else { return m_bufferer.bufferPolygonImpl_(input_polygon, ind, m_index); } } return null; }
@Override public Geometry next() { Polygon input_polygon = (Polygon) (m_bufferer.m_geometry); if (m_index < input_polygon.getPathCount()) { int ind = m_index; double area = input_polygon.calculateRingArea2D(m_index); assert (area > 0); m_index++; while (m_index < input_polygon.getPathCount()) { double hole_area = input_polygon .calculateRingArea2D(m_index); if (hole_area > 0) break;// not a hole m_index++; } if (ind == 0 && m_index == input_polygon.getPathCount()) { return m_bufferer.bufferPolygonImpl_(input_polygon, 0, input_polygon.getPathCount()); } else { return m_bufferer.bufferPolygonImpl_(input_polygon, ind, m_index); } } return null; }