Class PolygonBased

    • Field Detail

      • m_AreaType

        protected AreaType m_AreaType
        how to calculate the area.
      • m_Fallback

        protected boolean m_Fallback
        whether to fallback on bounding box.
      • m_BoundingBoxFallbackRatio

        protected double m_BoundingBoxFallbackRatio
        the ratio used for determining whether to fall back from polygon on bbox.
    • Constructor Detail

      • PolygonBased

        public PolygonBased()
    • Method Detail

      • setAreaType

        public void setAreaType​(AreaType value)
        Sets what area to use.
        Parameters:
        value - the type
      • getAreaType

        public AreaType getAreaType()
        Returns what area to use.
        Returns:
        the type
      • areaTypeTipText

        public String areaTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFallback

        public void setFallback​(boolean value)
        Sets whether to fall back on the bounding box if no polygon available.
        Specified by:
        setFallback in interface OptionalBoundingBoxFallbackSupporter
        Parameters:
        value - true if to use
      • setBoundingBoxFallbackRatio

        public void setBoundingBoxFallbackRatio​(double value)
        Sets the ratio between shape area over bbox area. If below the bbox is used instead of the polygon.
        Specified by:
        setBoundingBoxFallbackRatio in interface BoundingBoxFallbackSupporter
        Parameters:
        value - the ratio
      • getBoundingBoxFallbackRatio

        public double getBoundingBoxFallbackRatio()
        Returns the ratio between shape area over bbox area. If below the bbox is used instead of the polygon.
        Specified by:
        getBoundingBoxFallbackRatio in interface BoundingBoxFallbackSupporter
        Returns:
        the ratio
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • toGeometry

        protected org.locationtech.jts.geom.Geometry toGeometry​(LocatedObject obj)
        Turns the object into a shape.
        Parameters:
        obj - the object to convert
        Returns:
        the shape