Package qupath.lib.io
Class FeatureCollection
java.lang.Object
qupath.lib.io.FeatureCollection
Class to wrap a collection of objects to indicate they should be export as a GeoJSON "FeatureCollection".
- Author:
- Pete Bankhead
-
Method Summary
Modifier and TypeMethodDescriptionboolean
If true, include child objects nested within the output.Collection
<? extends PathObject> Get the objects being wrapped.static FeatureCollection
wrap
(Collection<? extends PathObject> pathObjects) Wrap a collection of PathObjects as a FeatureCollection, ignoring nested (child) objects.static FeatureCollection
wrap
(Collection<? extends PathObject> pathObjects, boolean includeChildObjects) Wrap a collection of PathObjects as a FeatureCollection.
-
Method Details
-
getIncludeChildren
public boolean getIncludeChildren()If true, include child objects nested within the output.- Returns:
-
getPathObjects
Get the objects being wrapped.- Returns:
-
wrap
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 collectionincludeChildObjects
- if true, include child object in the feature collection.- Returns:
- a feature collection that can be used with
GsonTools
-