Package org.opengis.filter

Examples of org.opengis.filter.FilterFactory2.property()


            if( selection != NONE ){
                if ( selection instanceof String){
                    String propertyName = (String) selection;
                    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
                   
                    return ff.property( propertyName );
                }
            }
        }
        if( spinner.isEnabled() ){
            int number = spinner.getSelection();
View Full Code Here


    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
   
    SimpleFeatureType featureType = editLayer.getSchema();   
    String geomName = featureType.getGeometryDescriptor().getLocalName();
   
    PropertyName attributeExpr = ff.property(geomName);
    BBOX filter = ff.bbox(attributeExpr, bounds);
   
    FeatureSource<SimpleFeatureType, SimpleFeature> source = editLayer.getResource(FeatureSource.class, monitor);   
    return source.getFeatures(filter);
}
View Full Code Here

    try {

      SimpleFeatureType schema = selectedLayer.getSchema();
      String typeName = schema.getGeometryDescriptor().getLocalName();

      intersectsFilter = ff.intersects(ff.property(typeName), ff.literal(trimmingLineInLayerCrs));
    } catch (IllegalFilterException e) {
      throw (RuntimeException) new RuntimeException().initCause(e);
    }

    if (Filter.EXCLUDE.equals(filter)) {
View Full Code Here

                    String.class.isAssignableFrom(attributeDescriptor.getType().getBinding()));

            assertNotNull(hotlinkDescriptor.getType() != null);
        }
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        SimpleFeatureCollection features = featureStore.getFeatures(ff.equals(ff.property("STATE"),
                ff.literal("Tasmania")));
        SimpleFeatureIterator iterator = features.features();
        assertTrue("Tasmania found", iterator.hasNext());
        SimpleFeature tasmania = iterator.next();
View Full Code Here

  }
  @SuppressWarnings("unchecked")
  private FeatureIterator<SimpleFeature> getAffectedFeatures(SimpleFeature feature) throws IOException {
    FilterFactory2 filterFactory = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());
    String geomAttName = feature.getFeatureType().getGeometryDescriptor().getLocalName();
    PropertyName geomPropertyExpression = filterFactory.property(geomAttName);
    Literal literalGeomExpression = filterFactory.literal(feature.getDefaultGeometry());
    Touches filter = filterFactory.touches(geomPropertyExpression, literalGeomExpression);
   
    IProgressMonitor monitor =
      getContext().getActionBars().getStatusLineManager().getProgressMonitor();
View Full Code Here

    private SimpleFeatureIterator squares(ReferencedEnvelope bounds, double size)
            throws IOException {

        // Limit squares to bounding box
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Filter filter = ff.bbox(ff.property(GEOM), bounds);

        // Align bound to square size and expand by 150%
        bounds = align(bounds, size, 1.6);

        // Create grid for given bounds
View Full Code Here

            for (AttributeDescriptor descriptor : featureType.getAttributeDescriptors()) {
                Definition definition = new Definition();

                definition.name = descriptor.getLocalName();
                definition.binding = descriptor.getType().getBinding();
                definition.expression = ff.property(descriptor.getName());

                list.add(definition);
            }
        }
        return list;
View Full Code Here

    }

    private org.opengis.filter.Filter createGeometryTypeFilter( String geomName, String type )
            throws IllegalFilterException {
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Function function = ff.function("geometryType", ff.property(geomName));
        return ff.equal(function, ff.literal(type)); //$NON-NLS-1$
    }

    private boolean writeToShapefile(SimpleFeatureCollection fc, SimpleFeatureType type, File file ) throws IOException {
       
View Full Code Here

        try {

            SimpleFeatureType schema = layer.getSchema();
            Name geom = getGeometryAttDescriptor(schema).getName();
           
            Filter bboxFilter =factory.bbox(factory.property(geom), boundingBox);
           

            return bboxFilter;
        } catch (Exception e) {
            ProjectPlugin.getPlugin().log(e);
View Full Code Here

                   
                    Filter getFInfoFilter = null;
                    try {
                        GeometryDescriptor geometryDescriptor = schema.getGeometryDescriptor();
                        String localName = geometryDescriptor.getLocalName();
                        getFInfoFilter = ff.intersects(ff.property(localName), ff.literal(pixelRect));
                    } catch (IllegalFilterException e) {
                        e.printStackTrace();
                        throw new WmsException(null, "Internal error : " + e.getMessage());
                    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.