Package org.goplanit.utils.zoning
Interface Zone
-
- All Superinterfaces:
Cloneable
,Comparable<IdAble>
,ExternalIdAble
,IdAble
,ManagedId
- All Known Subinterfaces:
OdZone
,TransferZone
- All Known Implementing Classes:
OdZoneImpl
,TransferZoneImpl
,ZoneImpl
public interface Zone extends ExternalIdAble, ManagedId
Zone represent a geographical area with a centroid which in turn represent the single point of departure of all traffic in the zone- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static Logger
LOGGER
the loggerstatic Class<Zone>
ZONE_ID_CLASS
the class to use for the id generation
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addInputProperty(String key, Object value)
Add a property from the original input that is not part of the readily available membersZone
clone()
Create a shallow copy of this entityCentroid
getCentroid()
Returns the centroid of this zonedefault org.locationtech.jts.geom.Envelope
getEnvelope()
collect the envelope (bounding box) of this zone's geometry.org.locationtech.jts.geom.Geometry
getGeometry()
Collect the geometry (outer border) of this zonedefault Class<Zone>
getIdClass()
Each managed id class is expected to generate its ids based on its class signature.Object
getInputProperty(String key)
collect a propertyString
getName()
Name of the zonedefault boolean
hasCentroid()
verify if centroid is presentdefault boolean
hasGeometry()
verify if the zone has a geometrydefault boolean
hasInputProperty(String key)
Verify if input property existsdefault boolean
hasName()
Verify if a name has been setvoid
setGeometry(org.locationtech.jts.geom.Geometry geometry)
set the geometry (outer border) of this zone, can be a polygon, but also a line stringvoid
setName(String name)
Name of the zone-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds, resetChildManagedIdEntities
-
-
-
-
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 propertyvalue
- 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
-
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
-
clone
Zone clone()
Create a shallow copy of this 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 interfaceManagedId
- 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
-
-