Package qupath.lib.io

Class FeatureCollection

java.lang.Object
qupath.lib.io.FeatureCollection

public class FeatureCollection extends Object
Class to wrap a collection of objects to indicate they should be export as a GeoJSON "FeatureCollection".
Author:
Pete Bankhead
  • Method Details

    • getIncludeChildren

      public boolean getIncludeChildren()
      If true, include child objects nested within the output.
      Returns:
    • getPathObjects

      public Collection<? extends PathObject> getPathObjects()
      Get the objects being wrapped.
      Returns:
    • wrap

      public static FeatureCollection wrap(Collection<? extends PathObject> pathObjects)
      Wrap a collection of PathObjects as a FeatureCollection, ignoring nested (child) objects. The purpose of this is to enable exporting a GeoJSON FeatureCollection that may be reused in other software.
      Parameters:
      pathObjects - a collection of path objects to store in a feature collection
      Returns:
      a feature collection that can be used with GsonTools
      See Also:
    • wrap

      public static FeatureCollection wrap(Collection<? extends PathObject> pathObjects, boolean includeChildObjects)
      Wrap a collection of PathObjects as a FeatureCollection. The purpose of this is to enable exporting a GeoJSON FeatureCollection that may be reused in other software.
      Parameters:
      pathObjects - a collection of path objects to store in a feature collection
      includeChildObjects - if true, include child object in the feature collection.
      Returns:
      a feature collection that can be used with GsonTools