com.supermap.data

Class GeoRegion3D



  • public class GeoRegion3D
    extends Geometry3D
    The polygon geometry class is derived from the Geometry3D class.

    This class is generally represented using one or more sets of points.he GeoRegion3D object can have one or multiple parts, and each part is represented by an ordered set of points . Note that the start point and endpoint in an ordered set of points that form a part is identical. You can add, delete and modify a part of the GeoRegion.

    • Constructor Detail

      • GeoRegion3D

        public GeoRegion3D()
        Constructs a new GeoRegion3D object.
      • GeoRegion3D

        public GeoRegion3D(Point3Ds points)
        Creates a new GeoRegion object according to the specified arguments.
        Parameters:
        points - The ordered set of points used to create the GeoRegion.
        Throws:
        java.lang.IllegalArgumentException - if the count of points in the ordered point colection is less than 3.
      • GeoRegion3D

        public GeoRegion3D(GeoRegion3D region3D)
        Initializes a new instance identical to the given GeoRegion object.
        Parameters:
        region3D - The specified GeoRegion object.
    • Method Detail

      • dispose

        public void dispose()
        Release the resource occupy by this object.
        Overrides:
        dispose in class Geometry
      • getArea

        public double getArea()
        Returns the area of the GeoRegion3D object. If a GeoRegion3D objects has many subobjects, its area is the sum of all the subobjects.
        Returns:
        The area of the GeoRegion3D object.
        Default:
        The default value is 0.0.
      • getPartCount

        public int getPartCount()
        Returns the count of parts of the GeoRegion3D object. After being cleared, the count of the parts is 0.
        Returns:
        The count of the parts of the GeoRegion3D object.
        Default:
        The default value is 0.0.
      • addPart

        public int addPart(Point3Ds points)
        Appends a part to this GeoRegion object.
        Parameters:
        points - the ordered point collection that forms the parts.
        Returns:
        If successful, this method will return the index number of the new added part, otherwise it will return -1.
        Throws:
        java.lang.IllegalArgumentException - if the count of points in the ordered point colection is less than 3.
      • convertToLine

        public GeoLine3D convertToLine()
        Converts the GeoRegion3D object to a GeoLine3D object. Returns the GeoLine3D object if succeed.
        Returns:
        A GeoLine3D object, if succeeded.
      • getPart

        public Point3Ds getPart(int index)
        Returns the subobject with the specified index in the GeoLine object, return the subobject in form of a ordered point collection.
        Parameters:
        index - The subobject index.
        Returns:
        the ordered point collection that composes the parts.
        Throws:
        java.lang.IndexOutOfBoundsException - If the serial number crossed.
      • indexOf

        public int indexOf(Point3Ds part)
        Gets the index of the specified part of the GeoRegion3D.
        Parameters:
        part - The specified subobject.
        Returns:
        Returns the index of the specified TextPart3D object.
      • clone

        public GeoRegion3D clone()
        Returns a copy of the current GeoRegion3D object.
        Specified by:
        clone in class Geometry
        Returns:
        The new GeoText3D object generated from the clone operation.
      • isEmpty

        public boolean isEmpty()
        Returns whether the GeoRegion object is empty, that is whether it has on subobjects. For the number of sub objects, see the getPartCount() method.
        Overrides:
        isEmpty in class Geometry
        Returns:
        Returns true if the object is empty.