Class Feature


public class Feature extends TfcatObject
Represents a TFCat Feature object.
Since:
9 Feb 2022
Author:
Mark Taylor
  • 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 based
      crs - coordinate reference system, may be null
      bbox - bounding box, may be null
      geometry - geometry content, may be null
      id - identifier string, may be null
      properties - properties object, may be null
  • Method Details

    • getGeometry

      public Geometry<?> getGeometry()
      Returns this feature's geometry.
      Returns:
      geometry, may be null
    • getId

      public String 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 class TfcatObject