Revision 9512 org.gvsig.online/trunk/org.gvsig.online/org.gvsig.online.lib/org.gvsig.online.lib.impl/src/main/java/org/gvsig/online/lib/impl/TilesCalculator.java

View differences:

TilesCalculator.java
261 261
    private List<Cell> calculateCells(int cellSize, Iterator<Geometry> geoms) {
262 262
        Set<Cell> cells = new HashSet<>();
263 263

  
264
        while(geoms.hasNext()){
265
           cells.addAll(calculateCell(cellSize, geoms.next()));
264
        while (geoms.hasNext()) {
265
            Geometry g = geoms.next();
266
            if (g != null) {
267
                cells.addAll(calculateCell(cellSize, g));
268
            }
266 269
        }
267 270
        List<Cell> orderedCells = new ArrayList<>(cells);
268 271
        Collections.sort(orderedCells);

Also available in: Unified diff