Render features as a FeatureCollection.
552961
def geojson(self):
        """"""
        return {
            "type": "FeatureCollection",
            "features": [f.geojson(i) for i, f in self._features.items()]
        }
1333915
private void iterateFeatures(VectorLayer layer, SnappingMode handler) {
		if (currentBounds != null && currentBounds.equals(mapModel.getMapView().getBounds(), 0)) {
			List<Feature> feats = featureCache.get(layer);
			if (feats != null) {
				handler.execute(feats);
			}
		} else {
			retrieveFeatures();
		}
	}
917143
def as_feature(data):
    
    if not isinstance(data, (Feature, FeatureCollection)):
        if is_featurelike(data):
            data = Feature(**data)
        elif has_features(data):
            data = FeatureCollection(**data)
        elif isinstance(data, collections.Sequence):
            data = FeatureCollection(features=data)
        elif has_layer(data):
            data = LayerCollection(data)
        elif has_coordinates(data):
            data = Feature(geometry=data)
        elif isinstance(data, collections.Mapping) and not data:
            data = Feature()
    return data
1322078
def _get_vars_to_collections(variables):
  """"""
  var_to_collections = collections.defaultdict(lambda: [])
  if isinstance(variables, dict):
    variables = list(v for _, v in variable_map_items(variables))
  for graph in set(v.graph for v in variables):
    for collection_name in list(graph.collections):
      entries = set(entry for entry in graph.get_collection(collection_name)
                    if isinstance(entry, tf.Variable))
      # For legacy reasons, tf.GraphKeys.GLOBAL_VARIABLES == "variables".
      # Correcting for this here, to avoid confusion.
      if collection_name == tf.GraphKeys.GLOBAL_VARIABLES:
        collection_name = "global_variables"
      for var in entries.intersection(variables):
        var_to_collections[var].append(collection_name)
  return var_to_collections
1168686
def _parse_dict(features, new_names):
        """"""
        feature_collection = OrderedDict()
        for feature_type, feature_names in features.items():
            try:
                feature_type = FeatureType(feature_type)
            except ValueError:
                ValueError('Failed to parse {}, keys of the dictionary have to be instances '
                           'of {}'.format(features, FeatureType.__name__))

            feature_collection[feature_type] = feature_collection.get(feature_type, OrderedDict())

            if feature_names is ...:
                feature_collection[feature_type] = ...

            if feature_type.has_dict() and feature_collection[feature_type] is not ...:
                feature_collection[feature_type].update(FeatureParser._parse_feature_names(feature_names, new_names))

        return feature_collection
706018
def build_feature_collection(node, name=None):
    
    # Initialize
    geojson = {
      'type': 'FeatureCollection',
      'features': [],
    }

    # Build features
    for placemark in get(node, 'Placemark'):
        feature = build_feature(placemark)
        if feature is not None:
            geojson['features'].append(feature)

    # Give the collection a name if requested
    if name is not None:
        geojson['name'] = name

    return geojson
175117
function addFeatures() {
        const features = {};
        for (const spec in filters.specs) {
            features[parseResults.specs.specTable[spec].feature] = true;
        }
        filters.features = features;
    }
938027
def render_collection(collection, member_fields, view = nil, context: Attributor::DEFAULT_ROOT_CONTEXT)
      render(collection, [member_fields], view, context: context)
    end
1062164
public void addFeatures(List<Feature> features) {
		numFeatures += features.size();
		for (Feature feature : features) {
			featureListGrid.addFeature(feature);
		}
		if (sortFeatures) {
			featureListGrid.sort(sortFieldName, sortDirGWT);
		}
		
		if (exportCsvHandler instanceof ExportFeatureListToCsvHandler) {
			((ExportFeatureListToCsvHandler) exportCsvHandler).setFeatures(features);
		}
	}
91563
def render(options)
      options = options_for_render(options)
      links = links_for_render(options)

      LinkCollection.new(context, links, options)
    end
676023
private String getFeatureString(Set<String> featureNames) {
        StringBuilder featureBuilder = new StringBuilder();

        if (featureNames != null) {
            Iterator<String> iter = featureNames.iterator();
            while (iter.hasNext()) {
                featureBuilder.append(iter.next());
                if (iter.hasNext())
                    featureBuilder.append(',');
            }
        }
        return featureBuilder.toString();
    }
163783
public static List<SimpleFeature> featureCollectionToList( SimpleFeatureCollection collection ) {
        List<SimpleFeature> featuresList = new ArrayList<SimpleFeature>();
        if (collection == null) {
            return featuresList;
        }
        SimpleFeatureIterator featureIterator = collection.features();
        while( featureIterator.hasNext() ) {
            SimpleFeature feature = featureIterator.next();
            featuresList.add(feature);
        }
        featureIterator.close();
        return featuresList;
    }
27597
def render(self, display):
        """"""
        # to handle changing objects / callable
        if self.text != self._last_text:
            self._render()

        display.blit(self._surface, (self.topleft, self.size))
433214
def graphviz(self, highlight=None, maximal_label=None, topdown=None,
            filename=None, directory=None, render=False, view=False):
        """"""
        return visualize.featuresystem(self, highlight, maximal_label,
            topdown, filename, directory, render, view)
571445
public void addFeatures(Collection<String> featuresToAdd) {
        if (featuresToAdd == null) return;
        for (String feature : featuresToAdd) {
            addFeature(feature);
        }
    }
457412
def copyFeatures(self, featureSource):
        
        if featureSource in self.sources:
            src, loc = self.sources[featureSource]
            if isinstance(src.features.text, str):
                self.font.features.text = u""+src.features.text
            elif isinstance(src.features.text, unicode):
                self.font.features.text = src.features.text
1068462
function decodify (featureCollection, code, properties) {
  var feature = find(featureCollection.features, {'id': code});

  if (feature) {
    feature.properties = properties;
  }

  return feature;
}