org.gvsig.gdal.prov.ogr-getfeaturecount.patch

Francisco Puga, 11/02/2016 10:11 PM

Download (726 Bytes)

View differences:

src/main/java/org/gvsig/gdal/prov/ogr/OGRDataStoreProvider.java (working copy)
491 491

  
492 492
            @Override
493 493
            public Object run() throws Exception {
494

  
495
                return getLayer().GetFeatureCount(0);
494
                int featureCount = getLayer().GetFeatureCount(0);
495
                if (featureCount == -1) {
496
                	featureCount = getLayer().GetFeatureCount();
497
                }
498
				return featureCount;
496 499
            }
497 500
        })).longValue();
498 501
    }