Class GeoJsonFeature<G extends org.locationtech.jts.geom.Geometry,P>

java.lang.Object
org.bremersee.geojson.model.UnknownAware
org.bremersee.geojson.GeoJsonFeature<G,P>
Type Parameters:
G - the geometry type parameter
P - the properties type parameter

public class GeoJsonFeature<G extends org.locationtech.jts.geom.Geometry,P> extends org.bremersee.geojson.model.UnknownAware
A GeoJSON object with the type Feature (see rfc7946 section 3.2).
Author:
Christian Bremer
  • Constructor Summary

    Constructors
    Constructor
    Description
    GeoJsonFeature(String id, double[] bbox, G geometry, P properties)
    Instantiates a new geo json feature.
    GeoJsonFeature(String id, G geometry, boolean calculateBounds, P properties)
    Instantiates a new geo json feature.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    double[]
    Return the bounding box of the GeoJSON object or null if there is no such object (see Bounding Box).
    Return the geometry object of this GeoJSON feature.
    Return the id of this GeoJSON feature or null if there is no id available.
    Gets properties.
    final String
    Gets type.
    int
     
     

    Methods inherited from class org.bremersee.geojson.model.UnknownAware

    canEqual, findUnknown, findUnknownList, findUnknownMap, hasUnknown, unknown, unknown, unknown

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • GeoJsonFeature

      public GeoJsonFeature(String id, double[] bbox, G geometry, P properties)
      Instantiates a new geo json feature.
      Parameters:
      id - the id
      bbox - the bbox
      geometry - the geometry
      properties - the properties
    • GeoJsonFeature

      public GeoJsonFeature(String id, G geometry, boolean calculateBounds, P properties)
      Instantiates a new geo json feature.
      Parameters:
      id - an optional id
      geometry - the geometry of the GeoJson feature
      calculateBounds - if true the bounding box will be calculated otherwise the bounding box will be null
      properties - a map with named objects that are associated with the GeoJSON feature
  • Method Details

    • getType

      public final String getType()
      Gets type.
      Returns:
      the type
    • getId

      public String getId()
      Return the id of this GeoJSON feature or null if there is no id available.
      Returns:
      the id of this GeoJSON feature
    • getBbox

      public double[] getBbox()
      Return the bounding box of the GeoJSON object or null if there is no such object (see Bounding Box).
      Returns:
      the bounding box
    • getGeometry

      public G getGeometry()
      Return the geometry object of this GeoJSON feature.
      Returns:
      the geometry
    • getProperties

      public P getProperties()
      Gets properties.
      Returns:
      the properties
    • toString

      public String toString()
      Overrides:
      toString in class org.bremersee.geojson.model.UnknownAware
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.bremersee.geojson.model.UnknownAware
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class org.bremersee.geojson.model.UnknownAware