Package cn.mapway.geo.shared.vector
Class Box
java.lang.Object
cn.mapway.geo.shared.vector.Box
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable,Serializable
public class Box
extends Object
implements Serializable, com.google.gwt.user.client.rpc.IsSerializable
Box
这个box里 判断的前提是 坐标轴方向 为 向上 和 向右
- Author:
- zhangjianshe <zhangjianshe@gmail.com>
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncenter()clone()voidvoidexpand(double scale) 按比例扩展voidexpand(double x, double y) voiddoubledoublegetWidth()doubleheight()voidinflate(double dx, double dy) booleanboolean判断两个 box是否相交boolean判断坐标是否在 wgs84范围内voidmagnify(double scale) static voidmaxPoint()voidmerge(double minx, double maxx, double miny, double maxy) voidminPoint()voidoffset(double ox, double oy) voidsetValue(double xmin, double ymin, double xmax, double ymax) toString()toWKT()doublewidth()
-
Field Details
-
xmin
public double xmin -
ymin
public double ymin -
xmax
public double xmax -
ymax
public double ymax
-
-
Constructor Details
-
Box
public Box()初始化 -
Box
public Box(double xmin, double ymin, double xmax, double ymax)
-
-
Method Details
-
setValue
public void setValue(double xmin, double ymin, double xmax, double ymax) -
width
public double width() -
height
public double height() -
minPoint
-
maxPoint
-
offset
public void offset(double ox, double oy) -
magnify
public void magnify(double scale) -
inflate
public void inflate(double dx, double dy) -
center
-
toString
-
toGeoJSON
-
toWKT
-
merge
public void merge(double minx, double maxx, double miny, double maxy) -
clone
-
expand
public void expand(double x, double y) -
isInWgs84
public boolean isInWgs84()判断坐标是否在 wgs84范围内- Returns:
-
getWidth
public double getWidth() -
getHeight
public double getHeight() -
expand
按比例扩展- Parameters:
scale-- Returns:
-
toViewBox
-
main
-