Tabnine Logo
EmptyFeatureCollection
Code IndexAdd Tabnine to your IDE (free)

How to use
EmptyFeatureCollection
in
org.geotools.data.store

Best Java code snippets using org.geotools.data.store.EmptyFeatureCollection (Showing top 19 results out of 315)

origin: geotools/geotools

public SimpleFeatureCollection subCollection(Filter filter) {
  if (filter.equals(Filter.INCLUDE)) {
    return this;
  }
  if (filter.equals(Filter.EXCLUDE)) {
    return new EmptyFeatureCollection(schema);
  }
  return new SubFeatureCollection(this, filter);
}
origin: geotools/geotools

public SimpleFeatureCollection subCollection(Filter filter) {
  if (filter == Filter.INCLUDE) {
    return this;
  }
  if (filter == Filter.EXCLUDE) {
    return new EmptyFeatureCollection(schema);
  }
  // Formally new SubFeatureCollection(this, filter);
  return new FilteringSimpleFeatureCollection(this, filter);
}
origin: geotools/geotools

/**
 * Sublist of this sublist!
 *
 * <p>Implementation will ensure this does not get out of hand, order is maintained and only
 * indexed once.
 */
public SimpleFeatureCollection subList(Filter subfilter) {
  if (filter.equals(Filter.INCLUDE)) {
    return this;
  }
  if (filter.equals(Filter.EXCLUDE)) {
    return new EmptyFeatureCollection(schema);
  }
  return new SubFeatureList(collection, ff.and(filter, subfilter), sort.get(0));
}
origin: geotools/geotools

  @Override
  public SimpleFeatureCollection subCollection(Filter filter) {
    // get the new target envelope
    Envelope filterEnvelope = getEnvelope(filter);
    Envelope subEnvelope = queryBounds;
    if (filterEnvelope != null) {
      subEnvelope = subEnvelope.intersection(queryBounds);
    }
    if (subEnvelope.isNull()) {
      return new EmptyFeatureCollection(targetSchema);
    }
    // mix filters
    Query subQuery = new Query(query);
    Filter baseFilter = query.getFilter();
    if (baseFilter != null && !Filter.INCLUDE.equals(baseFilter)) {
      Filter mixed = ff.and(baseFilter, filter);
      subQuery.setFilter(mixed);
    }
    return new CachingFeatureCollection(subEnvelope, sourceSchema, targetSchema, subQuery);
  }
}
origin: geotools/geotools

@Override
public SimpleFeatureCollection subCollection(Filter filter) {
  if (filter == Filter.INCLUDE) {
    return this;
  } else if (filter == Filter.EXCLUDE || query.getFilter() == Filter.EXCLUDE) {
    return new EmptyFeatureCollection(getSchema());
  }
  Query q = new Query(query);
  if (query.getFilter() == Filter.INCLUDE) {
    q.setFilter(filter);
  } else {
    FilterFactory ff = CommonFactoryFinder.getFilterFactory();
    Filter combined = ff.and(filter, q.getFilter());
    q.setFilter(combined);
  }
  return new TransformFeatureCollection(source, transformer, q);
}
origin: geotools/geotools

return new EmptyFeatureCollection(getSchema());
origin: geotools/geotools

return new EmptyFeatureCollection(getSchema());
origin: org.geotools/gt-wfs

/**
 * @see org.geotools.data.FeatureSource#getFeatures(org.geotools.data.Query)
 */
public SimpleFeatureCollection getFeatures( Query query )
    throws IOException {
  SimpleFeatureType schema = getSchema();
  String typeName = schema.getTypeName();
  if (query.getTypeName() == null) { // typeName unspecified we will
    // "any" use a default
    Query Query = new Query(query);
    Query.setTypeName(typeName);
    query = Query;
  }
  if (!typeName.equals(query.getTypeName())) {
    return new EmptyFeatureCollection(schema);
  } else {
    return new DefaultFeatureResults(this, query);
  }
}
origin: org.geotools/gt-data

@Override
public SimpleFeatureCollection subCollection(Filter filter) {
  // get the new target envelope
  Envelope filterEnvelope = getEnvelope(filter);
  Envelope subEnvelope = queryBounds;
  if(filterEnvelope != null) {
    subEnvelope = subEnvelope.intersection(queryBounds);
  }
  if(subEnvelope.isNull()) {
    return new EmptyFeatureCollection(targetSchema);
  }
  
  // mix filters
  Query subQuery = new Query(query);
  Filter baseFilter = query.getFilter();
  if(baseFilter != null && !Filter.INCLUDE.equals(baseFilter)) {
    Filter mixed = ff.and(baseFilter, filter);
    subQuery.setFilter(mixed); 
  }
  
  return new CachingFeatureCollection(subEnvelope, sourceSchema, targetSchema, subQuery);
}

origin: org.geoserver.community/gs-oseo-core

@Override
public FeatureCollection<FeatureType, Feature> getFeatures(Query query) throws IOException {
  // first get the ids of the features we are going to return, no joins to support paging
  Query idsQuery = mapToSimpleCollectionQuery(query, false);
  // idsQuery.setProperties(Query.NO_PROPERTIES); (no can do, there are mandatory fields)
  SimpleFeatureCollection idFeatureCollection =
      getDelegateCollectionSource().getFeatures(idsQuery);
  Set<FeatureId> ids = new LinkedHashSet<>();
  idFeatureCollection.accepts(f -> ids.add(f.getIdentifier()), null);
  // if no features, return immediately
  SimpleFeatureCollection fc;
  if (ids.isEmpty()) {
    fc = new EmptyFeatureCollection(getDelegateCollectionSource().getSchema());
  } else {
    // the run a joined query with the specified ids
    Query dataQuery = mapToSimpleCollectionQuery(query, true);
    dataQuery.setFilter(FF.id(ids));
    fc = getDelegateCollectionSource().getFeatures(dataQuery);
  }
  return new MappingFeatureCollection(schema, fc, this::mapToComplexFeature);
}
origin: org.geoserver.extension/ogr

} else {
  SimpleFeatureType simplifiedShema = buildShapefileCompatible(originalSchema);
  return writeShapefile(tempDir, new EmptyFeatureCollection(simplifiedShema));
origin: org.geoserver.extension/gs-ogr-wfs

} else {
  SimpleFeatureType simplifiedShema = buildShapefileCompatible(originalSchema);
  return writeShapefile(tempDir, new EmptyFeatureCollection(simplifiedShema));
origin: org.geotools/gt2-main

return new EmptyFeatureCollection( featureType );
origin: org.geotools/gt2-postgis-versioned

  return new EmptyFeatureCollection(schema);
  return new EmptyFeatureCollection(schema);
Filter revisionFilter = ff.id(revisionIdSet);
origin: org.geotools/gt-transform

@Override
public SimpleFeatureCollection subCollection(Filter filter) {
  if (filter == Filter.INCLUDE) {
    return this;
  } else if (filter == Filter.EXCLUDE || query.getFilter() == Filter.EXCLUDE) {
    return new EmptyFeatureCollection(getSchema());
  }
  Query q = new Query(query);
  if (query.getFilter() == Filter.INCLUDE) {
    q.setFilter(filter);
  } else {
    FilterFactory ff = CommonFactoryFinder.getFilterFactory();
    Filter combined = ff.and(filter, q.getFilter());
    q.setFilter(combined);
  }
  return new TransformFeatureCollection(source, transformer, q);
}
origin: org.geotools/gt2-main

return new EmptyFeatureCollection( schema );
origin: org.geotools/gt-main

return new EmptyFeatureCollection( schema );
origin: org.geotools/gt-main

return new EmptyFeatureCollection(getSchema());
origin: org.geotools/gt-main

return new EmptyFeatureCollection( getSchema() );
org.geotools.data.storeEmptyFeatureCollection

Most used methods

  • <init>

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • JTextField (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now