Interface Zone

    • Field Detail

      • LOGGER

        static final Logger LOGGER
        the logger
      • ZONE_ID_CLASS

        static final Class<Zone> ZONE_ID_CLASS
        the class to use for the id generation
    • Method Detail

      • addInputProperty

        void addInputProperty​(String key,
                              Object value)
        Add a property from the original input that is not part of the readily available members
        Parameters:
        key - key (name) of the input property
        value - value of the input property
      • getInputProperty

        Object getInputProperty​(String key)
        collect a property
        Parameters:
        key - for the property
        Returns:
        property itself
      • getCentroid

        Centroid getCentroid()
        Returns the centroid of this zone
        Returns:
        centroid of this zone
      • setGeometry

        void setGeometry​(org.locationtech.jts.geom.Geometry geometry)
        set the geometry (outer border) of this zone, can be a polygon, but also a line string
        Parameters:
        geometry - of the zone
      • getGeometry

        org.locationtech.jts.geom.Geometry getGeometry()
        Collect the geometry (outer border) of this zone
        Returns:
        geometry of the zone
      • getGeometry

        default org.locationtech.jts.geom.Geometry getGeometry​(boolean considerCentroid)
        Collect the geometry of this zone and allow it to return its internal centroid location in case it has no geometry of its own by means of provided flag.
        Parameters:
        considerCentroid - when false centroid geometry is ignored, when true it is returned in case no explicit geoemetry is set
        Returns:
        geometry of the zone
      • setName

        void setName​(String name)
        Name of the zone
        Parameters:
        name - of the zone
      • getName

        String getName()
        Name of the zone
        Returns:
        name of the zone
      • shallowClone

        Zone shallowClone()
        Create a shallow copy of this entity
        Specified by:
        shallowClone in interface IdAble
        Returns:
        shallow copy of entity
      • deepClone

        Zone deepClone()
        An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code
        Specified by:
        deepClone in interface IdAble
        Returns:
        deep copy of entity
      • getIdClass

        default Class<Zone> getIdClass()
        Each managed id class is expected to generate its ids based on its class signature. To be able to generate the correct id the class used for id generation is to be provided via this method call.
        Specified by:
        getIdClass in interface ManagedId
        Returns:
        idClass to use for generating ids for instances of this idable derived class
      • hasGeometry

        default boolean hasGeometry()
        verify if the zone has a geometry
        Returns:
        true if available, false otherwise
      • hasCentroid

        default boolean hasCentroid()
        verify if centroid is present
        Returns:
        true when present, false otherwise
      • hasName

        default boolean hasName()
        Verify if a name has been set
        Returns:
        true when present, false otherwise
      • hasInputProperty

        default boolean hasInputProperty​(String key)
        Verify if input property exists
        Parameters:
        key - to check
        Returns:
        truw when present, false otherwise
      • getEnvelope

        default org.locationtech.jts.geom.Envelope getEnvelope()
        collect the envelope (bounding box) of this zone's geometry. In case, the zone has no geometry we revert to using the geometry (location) of its centroid.
        Returns:
        envelope of the zone