Class MapCircle

    • Constructor Detail

      • MapCircle

        public MapCircle​(Point2D<?,​?> point)
        Create a new map element.
        Parameters:
        point - is a location component of the circle in the geo-referenced space.
      • MapCircle

        public MapCircle​(double x,
                         double y)
        Create a new map element.
        Parameters:
        x - is a location component of the circle in the geo-referenced space.
        y - is a location component of the circle in the geo-referenced space.
      • MapCircle

        public MapCircle​(Point2D<?,​?> point,
                         double radius)
        Create a new map element.
        Parameters:
        point - is a location component of the circle in the geo-referenced space.
        radius - is the radius
      • MapCircle

        public MapCircle​(double x,
                         double y,
                         double radius)
        Create a new map element.
        Parameters:
        x - is a location component of the circle in the geo-referenced space.
        y - is a location component of the circle in the geo-referenced space.
        radius - is the radius
      • MapCircle

        public MapCircle​(AttributeCollection attributeSource,
                         Point2D<?,​?> point)
        Create a new map element.
        Parameters:
        attributeSource - is the provider of the attributes for this element.
        point - is a location component of the circle in the geo-referenced space.
      • MapCircle

        public MapCircle​(AttributeCollection attributeSource,
                         double x,
                         double y)
        Create a new map element.
        Parameters:
        attributeSource - is the provider of the attributes for this element.
        x - is a location component of the circle in the geo-referenced space.
        y - is a location component of the circle in the geo-referenced space.
      • MapCircle

        public MapCircle​(AttributeCollection attributeSource,
                         Point2D<?,​?> point,
                         double radius)
        Create a new map element.
        Parameters:
        attributeSource - is the provider of the attributes for this element.
        point - is a location component of the circle in the geo-referenced space.
        radius - is the radius
      • MapCircle

        public MapCircle​(AttributeCollection attributeSource,
                         double x,
                         double y,
                         double radius)
        Create a new map element.
        Parameters:
        attributeSource - is the provider of the attributes for this element.
        x - is a location component of the circle in the geo-referenced space.
        y - is a location component of the circle in the geo-referenced space.
        radius - is the radius
      • MapCircle

        public MapCircle​(UUID id,
                         Point2D<?,​?> point)
        Create a new map element.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        point - is a location component of the circle in the geo-referenced space.
        Since:
        4.0
      • MapCircle

        public MapCircle​(UUID id,
                         double x,
                         double y)
        Create a new map element.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        x - is a location component of the circle in the geo-referenced space.
        y - is a location component of the circle in the geo-referenced space.
        Since:
        4.0
      • MapCircle

        public MapCircle​(UUID id,
                         Point2D<?,​?> point,
                         double radius)
        Create a new map element.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        point - is a location component of the circle in the geo-referenced space.
        radius - is the radius
        Since:
        4.0
      • MapCircle

        public MapCircle​(UUID id,
                         double x,
                         double y,
                         double radius)
        Create a new map element.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        x - is a location component of the circle in the geo-referenced space.
        y - is a location component of the circle in the geo-referenced space.
        radius - is the radius
        Since:
        4.0
      • MapCircle

        public MapCircle​(UUID id,
                         AttributeCollection attributeSource,
                         Point2D<?,​?> point)
        Create a new map element.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        attributeSource - is the provider of the attributes for this element.
        point - is a location component of the circle in the geo-referenced space.
        Since:
        4.0
      • MapCircle

        public MapCircle​(UUID id,
                         AttributeCollection attributeSource,
                         double x,
                         double y)
        Create a new map element.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        attributeSource - is the provider of the attributes for this element.
        x - is a location component of the circle in the geo-referenced space.
        y - is a location component of the circle in the geo-referenced space.
        Since:
        4.0
      • MapCircle

        public MapCircle​(UUID id,
                         AttributeCollection attributeSource,
                         Point2D<?,​?> point,
                         double radius)
        Create a new map element.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        attributeSource - is the provider of the attributes for this element.
        point - is a location component of the circle in the geo-referenced space.
        radius - is the radius
        Since:
        4.0
      • MapCircle

        public MapCircle​(UUID id,
                         AttributeCollection attributeSource,
                         double x,
                         double y,
                         double radius)
        Create a new map element.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        attributeSource - is the provider of the attributes for this element.
        x - is a location component of the circle in the geo-referenced space.
        y - is a location component of the circle in the geo-referenced space.
        radius - is the radius
        Since:
        4.0
    • Method Detail

      • equals

        @Pure
        public boolean equals​(MapElement element)
        Replies if the specified objects is the same as this one.
        Overrides:
        equals in class MapPonctualElement
        Parameters:
        element - the element to compare to.
        Returns:
        true if the given element is equal to this object, otherwise false
      • getRadius

        @Pure
        public double getRadius()
        Replies the radius.
        Returns:
        the radius.
      • getDiameter

        @Pure
        public double getDiameter()
        Replies the diameter.
        Returns:
        the diameter.
      • setRadius

        public void setRadius​(double radius)
        Set the radius.
        Parameters:
        radius - the new radius
      • setDiameter

        public void setDiameter​(double diameter)
        Set the diameter.
        Parameters:
        diameter - the new diameter
      • distance

        @Pure
        public <OT extends MapPonctualElement> double distance​(OT another_point)
        Replies the distance between this MapPoint and another_point.
        Overrides:
        distance in class MapPonctualElement
        Type Parameters:
        OT - is the type of the given point.
        Parameters:
        another_point - another point.
        Returns:
        the distance between the given point and this point.
      • getDistance

        @Pure
        public double getDistance​(Point2D<?,​?> point)
        Replies the distance between this MapCircle and point.
        Overrides:
        getDistance in class MapPonctualElement
        Parameters:
        point - the point to compute the distance to.
        Returns:
        the distance. Should be negative if the point is inside the circle.
      • intersects

        @Pure
        public boolean intersects​(Shape2D<?,​?,​?,​?,​?,​? extends Rectangle2afp<?,​?,​?,​?,​?,​?>> rectangle)
        Replies if this element has an intersection with the specified rectangle.
        Specified by:
        intersects in class MapElement
        Parameters:
        rectangle - the rectangle
        Returns:
        true if this MapElement is intersecting the specified area, otherwise false