类 Shape

    • 构造器详细资料

      • Shape

        public Shape()
        Contructor
      • Shape

        public Shape​(org.locationtech.jts.geom.Geometry geometry)
        Constructor
        参数:
        geometry - Geometry
    • 方法详细资料

      • getShapeType

        public abstract ShapeTypes getShapeType()
        Get shape type
        返回:
        Shape type
      • isVisible

        public boolean isVisible()
        Get if visible
        返回:
        is visible or not
      • setVisible

        public void setVisible​(boolean isTrue)
        Set visible
        参数:
        isTrue - True or not
      • isSelected

        public boolean isSelected()
        Get if the shape is selected
        返回:
        Boolean
      • setSelected

        public void setSelected​(boolean isTrue)
        Set selected
        参数:
        isTrue - True or not
      • isEditing

        public boolean isEditing()
        Get if is editing
        返回:
        Boolean
      • setEditing

        public void setEditing​(boolean value)
        Set if is editing
        参数:
        value - Boolean
      • getExtent

        public Extent getExtent()
        Get extent
        返回:
        extent Extent
      • setExtent

        public void setExtent​(Extent aExtent)
        Set extent
        参数:
        aExtent - Extent
      • getLegendIndex

        public int getLegendIndex()
        Get legend index
        返回:
        Legend index
      • setLegendIndex

        public void setLegendIndex​(int value)
        Set legend index
        参数:
        value - Legend index
      • getValue

        public double getValue()
        Get value
        返回:
        Value
      • setValue

        public void setValue​(double value)
        Set value
        参数:
        value - Value
      • getPoints

        public java.util.List<? extends PointD> getPoints()
        Get points
        返回:
        point list
      • setPoints

        public void setPoints​(java.util.List<? extends PointD> points)
        Set points
        参数:
        points - point list
      • addVertice

        public void addVertice​(int vIdx,
                               PointD vertice)
        Add a vertice
        参数:
        vIdx - Vertice index
        vertice - The vertice
      • removeVerice

        public void removeVerice​(int vIdx)
        Remove a vertice
        参数:
        vIdx - Vertice index
      • moveVertice

        public void moveVertice​(int vIdx,
                                double newX,
                                double newY)
        Vertice edited update
        参数:
        vIdx - Vertice index
        newX - New X
        newY - New Y
      • move

        public void move​(double xShift,
                         double yShift)
        Move the shape
        参数:
        xShift - X shift
        yShift - Y shift
      • reverse

        public void reverse()
        Reverse points direction
      • toGeometry

        public abstract org.locationtech.jts.geom.Geometry toGeometry​(org.locationtech.jts.geom.GeometryFactory factory)
        To geometry method
        参数:
        factory - GeometryFactory
        返回:
        Geometry
      • toGeometry

        public org.locationtech.jts.geom.Geometry toGeometry()
        To geometry method
        返回:
        Geometry
      • geometry2Shape

        public static Shape geometry2Shape​(org.locationtech.jts.geom.Geometry geo)
      • intersection

        public Shape intersection​(Shape b)
        Get intersection shape
        参数:
        b - Other shape
        返回:
        Intersection shape
      • union

        public Shape union​(Shape b)
        Get union shape
        参数:
        b - Other shape
        返回:
        Union shape
      • difference

        public Shape difference​(Shape b)
        Get difference shape
        参数:
        b - Other shape
        返回:
        Difference shape
      • symDifference

        public Shape symDifference​(Shape b)
        Get system difference shape
        参数:
        b - Other shape
        返回:
        System difference shape
      • buffer

        public Shape buffer​(double distance)
        Get buffer shape
        参数:
        distance - Distance
        返回:
        Buffered shape
      • convexHull

        public Shape convexHull()
        Get convexhull shape
        返回:
        Convexhull shape
      • split

        public java.util.List<Shape> split​(Shape line)
        Split shape
        参数:
        line - Split line
        返回:
        Splitted shapes
      • reform

        public Shape reform​(Shape line)
        Reform the shape by a line
        参数:
        line - The line
        返回:
        Result shape
      • crosses

        public boolean crosses​(Shape other)
        Is shapes cross each other or not
        参数:
        other - Other shape
        返回:
        Cross or not
      • contains

        public boolean contains​(Shape other)
        If this shape contains another one
        参数:
        other - Other shape
        返回:
        Contains or not
      • coveredBy

        public boolean coveredBy​(Shape other)
        If this shape covered by another one
        参数:
        other - Other shape
        返回:
        Covered by or not
      • covers

        public boolean covers​(Shape other)
        If this shape covers another one
        参数:
        other - Other shape
        返回:
        Covers or not
      • disjoint

        public boolean disjoint​(Shape other)
        If this shape disjoint another one
        参数:
        other - Other shape
        返回:
        Disjoint or not
      • equals

        public boolean equals​(Shape other)
        If this shape equals another one
        参数:
        other - Other shape
        返回:
        Equals or not
      • intersects

        public boolean intersects​(Shape other)
        If this shape intersects another one
        参数:
        other - Other shape
        返回:
        Intersects or not
      • overlaps

        public boolean overlaps​(Shape other)
        If this shape overlaps another one
        参数:
        other - Other shape
        返回:
        Overlaps or not
      • touches

        public boolean touches​(Shape other)
        If this shape touches another one
        参数:
        other - Other shape
        返回:
        Touches or not
      • within

        public boolean within​(Shape other)
        If this shape within another one
        参数:
        other - Other shape
        返回:
        Within or not
      • clone

        public java.lang.Object clone()
        Clone
        覆盖:
        clone 在类中 java.lang.Object
        返回:
        Shape object
      • cloneValue

        public void cloneValue​(Shape other)
        Clone value
        参数:
        other - Other shape