Package uk.ac.starlink.tfcat
Class Feature
java.lang.Object
uk.ac.starlink.tfcat.TfcatObject
uk.ac.starlink.tfcat.Feature
Represents a TFCat Feature object.
- Since:
- 9 Feb 2022
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Feature
public Feature(org.json.JSONObject json, Crs crs, Bbox bbox, Geometry<?> geometry, String id, org.json.JSONObject properties) Constructor.- Parameters:
json
- JSON object with "type":"Feature" on which this is basedcrs
- coordinate reference system, may be nullbbox
- bounding box, may be nullgeometry
- geometry content, may be nullid
- identifier string, may be nullproperties
- properties object, may be null
-
-
Method Details
-
getGeometry
Returns this feature's geometry.- Returns:
- geometry, may be null
-
getId
Returns this feature's identifier.- Returns:
- id string, may be null
-
getProperties
public org.json.JSONObject getProperties()Returns this featurs's properties object.- Returns:
- properties object, may be null
-
purgeJson
public void purgeJson()Description copied from class:TfcatObject
Removes any reference to the original parsed JSON from this object. This may be useful for purposes of efficiency following a parse if the TFCat objects are to be long-lived.- Overrides:
purgeJson
in classTfcatObject
-