[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] Get features
|
If you are not a tool you can get a context by calling
ApplicationGIS.createContext(). (You need udig 1.1.0).
Or you can use the following snippet if you are not using 1.1.0
FeatureCollection collection=layer.getResource(FeatureSource.class,
null).getFeatures(
layer.createBBoxFilter(bbox, null));
Martin Giljohann wrote:
Did you try IAbstractContext#getFeaturesInBbox ?
// in AbstractModalTool subtype
IAbstractContext ctx = getContext();
// create/access layer + envelope before...
FeatureResults results = ctx.getFeaturesInBbox(layer, envelope);
This seems to work for me.
Regards
Martin
IƱigo Telleria Elola wrote:
I would like to know if it exists any posibility to get only the elements
are displayed in uDig. I want to say I can have 100 elements in a layer. But
if I zoom in the map then in the uDig 40 elements are displayed. I want to
obtain these 40 elements. It's possible? Because with this:
FeatureSource featureSource = layer.getResource(FeatureSource.class,
null);
FeatureResults featureResults = featureSource.getFeatures();
I get all the elements there are in the layer.
Thanks in advances.
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel