com.supermap.data
Class GeoRectangle
- java.lang.Object
-
- com.supermap.data.Geometry
-
- com.supermap.data.GeoRectangle
-
-
Constructor Summary
Constructors Constructor and Description GeoRectangle()
Constructs a new GeoRectangle object.GeoRectangle(GeoRectangle geoRectangle)
Initializes a new instance identical to the given GeoRectangle object.GeoRectangle(Point2D center, double width, double height, double angle)
Creates a new GeoRectangle object according to the specified arguments.GeoRectangle(Rectangle2D rectangle, double rotation)
Create a new Rectangle2D object according to a Rectangle2D object. the default rotation angle is 0.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GeoRectangle
clone()
Returns a copy of the current GeoRectangle object.GeoLine
convertToLine()
Converts the GeoRectangle object to the GeoLine object.GeoRegion
convertToRegion()
Converts the GeoRectangle object to the GeoRegion object.void
dispose()
Disposes the resources occupied by the object.Point2D
getCenter()
Returns the center of the GeoRectangle object.double
getHeight()
Returns the height of the GeoRectangle object, that is the height before rotating.double
getRotation()
Returns the rotation angle of the GeoRectangle object.double
getWidth()
Returns the width of the GeoRectangle object, that is the width before rotating.void
setCenter(Point2D value)
Sets the center point of the GeoLegend object.void
setHeight(double value)
Sets the height of the GeoRectangle object, that is the height before rotating.void
setRotation(double value)
Sets the rotation angle of the GeoRectangle object.void
setWidth(double value)
Sets the width of the GeoRectangle object, that is the width before rotating.
-
-
-
Constructor Detail
-
GeoRectangle
public GeoRectangle()
Constructs a new GeoRectangle object.
-
GeoRectangle
public GeoRectangle(GeoRectangle geoRectangle)
Initializes a new instance identical to the given GeoRectangle object.- Parameters:
geoRectangle
- The given GeoRectangle object.
-
GeoRectangle
public GeoRectangle(Point2D center, double width, double height, double angle)
Creates a new GeoRectangle object according to the specified arguments.- Parameters:
center
- Centerwidth
- The width of the front two-dimensional rectangular geometry.height
- The height of the GeoRectangle object before rotating.angle
- The rotation angle of the GeoRectangle object. The pivot point is the center of the GeoRectangle object.
-
GeoRectangle
public GeoRectangle(Rectangle2D rectangle, double rotation)
Create a new Rectangle2D object according to a Rectangle2D object. the default rotation angle is 0.- Parameters:
rectangle
- The Rectangle Objectrotation
- The rotation angle of the GeoRectangle object. The pivot point is the center of the GeoRectangle object.
-
-
Method Detail
-
convertToLine
public GeoLine convertToLine()
Converts the GeoRectangle object to the GeoLine object.- Returns:
- The line geometrical object.
-
convertToRegion
public GeoRegion convertToRegion()
Converts the GeoRectangle object to the GeoRegion object.- Returns:
- The region geometrical object.
-
getCenter
public Point2D getCenter()
Returns the center of the GeoRectangle object.- Returns:
- the center of the GeoRectangle object.
- Default:
- The default value is {X = 0,Y = 0}.
-
setCenter
public void setCenter(Point2D value)
Sets the center point of the GeoLegend object.- Parameters:
value
- The center of the GeoRectangle object.
-
getWidth
public double getWidth()
Returns the width of the GeoRectangle object, that is the width before rotating.- Returns:
- Returns the width of the GeoRectangle object.
- Default:
- The default value is 1.
-
setWidth
public void setWidth(double value)
Sets the width of the GeoRectangle object, that is the width before rotating.- Parameters:
value
- The width of the GeoRectangle object.
-
getHeight
public double getHeight()
Returns the height of the GeoRectangle object, that is the height before rotating.- Returns:
- Returns the width of the GeoRectangle object.
- Default:
- The default value is 1.
-
setHeight
public void setHeight(double value)
Sets the height of the GeoRectangle object, that is the height before rotating.- Parameters:
value
- The width of the GeoRectangle object.
-
getRotation
public double getRotation()
Returns the rotation angle of the GeoRectangle object. The pivot point is the center of the GeoRectangle object.The rotation angle of the GeoRectangle object after being stored with the data engine. The accuracy is 0.1 degrees. The rotation angle accuracy doesn't change for the GeoRectangle object constructed by the constructor.
- Returns:
- Return the rotation angle of the GeoRectangle object.
- Default:
- The default value is 0.
-
setRotation
public void setRotation(double value)
Sets the rotation angle of the GeoRectangle object. The pivot point is the center of the GeoRectangle object.- Parameters:
value
- Return the rotation angle of the GeoRectangle object.
-
clone
public GeoRectangle clone()
Returns a copy of the current GeoRectangle object.
-
-