Package uk.ac.starlink.tfcat

# Class FeatureCollection

java.lang.Object
uk.ac.starlink.tfcat.TfcatObject
uk.ac.starlink.tfcat.FeatureCollection

public class FeatureCollection extends TfcatObject
Represents a TFCat FeatureCollection object.

Since:
  9 Feb 2022
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`FeatureCollection(org.json.JSONObject json, Crs crs, Bbox bbox, Map<String,Field> fieldMap, Feature[] features)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Feature[]`
`getFeatures()`
Returns the features in this collection.
`Map<String,Field>`
`getFields()`
Returns a map of field names to fields for this collection.

### Methods inherited from class uk.ac.starlink.tfcat.TfcatObject

`getBbox, getCrs, getJson, getParent, getType, purgeJson`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### FeatureCollection

public FeatureCollection(org.json.JSONObject json, Crs crs, Bbox bbox, Map<String,Field> fieldMap, Feature[] features)
Constructor.

Parameters:
  `json` - JSON object on which this is based
  `crs` - coordinate reference system, may be null
  `bbox` - bounding box defined by bbox member, may be null
  `fieldMap` - map of fields associated with this collection; may be empty but not null
  `features` - features in this collection; may be empty but not null

## Method Details

### getFeatures

public Feature[] getFeatures()
Returns the features in this collection.

Returns:
  feature array

### getFields

public Map<String,Field> getFields()
Returns a map of field names to fields for this collection.

Returns:
  field map