Yes.
Please use dataStore.getFeatureSource( typeName ).getCount( Query.ALL );
It should be able to give you an answer based on the number of records (rather
than reading the contents).
--
Jody Garnett
On Saturday, 2 April 2011 at 12:17 AM, LSA wrote:
> I use something like:
> public static int getCount(ShapefileDataStore shapefileDataStore) throws
> IOException{
> return shapefileDataStore.getCount(new
> DefaultQuery(shapefileDataStore.getTypeNames()[0], Filter.INCLUDE));
> }
>
> , but creating and opening ShapefileDataStore is slow.
>
> Is it possible to perform this in faster manner?
>
> Thanks,
> Sergey
>
> ------------------------------------------------------------------------------
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself;
> WebMatrix provides all the features you need to develop and
> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users