OpenMap-java / openmap

OpenMap is an Open Source JavaBeans-based programmer's toolkit. Using OpenMap, you can quickly build applications and applets that access data from legacy databases and applications.
http://openmap-java.org
Other
73 stars 43 forks source link

SpatialIndexHandler::checkSpatialIndexEntries does not work for shape files with "empty" records #46

Open cmadsen opened 6 years ago

cmadsen commented 6 years ago

The code in SpatialIndexHandler::checkSpatialIndexEntries assumes the length of spatialIndex and bufferedList are equal:

        Iterator<?> entryIt = spatialIndex.entryIterator();
        Iterator<?> omgIt = bufferedList.iterator();
        while (entryIt.hasNext() && omgIt.hasNext()) {

but when the shape file contains empty records this is not the case.

This is only a problem if buffered is set to true in SpatialIndexHandler.