public class Extent extends Geometry
Geometry.GeometryType
Modifier and Type | Method and Description |
---|---|
Extent |
centerAt(Point point)
A new extent is returned with the same width and height centered at the argument point.
|
boolean |
contains(Extent extent)
When "true", the geometry in the argument is contained in this extent.
|
boolean |
contains(Point point)
When "true", the geometry in the argument is contained in this extent.
|
static Extent |
create(double xmin,
double ymin,
double xmax,
double ymax,
SpatialReference ref)
Creates a new Extent object.
|
static Extent |
create(com.google.gwt.core.client.JavaScriptObject json)
Creates a new Extent object using a JSON object.
|
Extent |
expand(float factor)
Expands the extent by the factor given.
|
Point |
getCenter()
Returns the center point of the extent in map units.
|
float |
getHeight()
Distance between ymin and ymax.
|
float |
getWidth()
Distance between xmin and xmax.
|
float |
getXMax()
Top-right X-coordinate of an extent envelope.
|
float |
getXMin()
Bottom-left X-coordinate of an extent envelope.
|
float |
getYMax()
Top-right Y-coordinate of an extent envelope.
|
float |
getYMin()
Bottom-left Y-coordinate of an extent envelope.
|
boolean |
intersects(Extent extent)
Returns true if the input geometry intersects this extent.
|
boolean |
intersects(Multipoint multipoint)
Returns true if the input geometry intersects this extent.
|
boolean |
intersects(Point point)
Returns true if the input geometry intersects this extent.
|
boolean |
intersects(Polygon polygon)
Returns true if the input geometry intersects this extent.
|
boolean |
intersects(Polyline polyline)
Returns true if the input geometry intersects this extent.
|
Extent |
offset(double dx,
double dy)
Offsets the current extent.
|
java.lang.String |
toNiceString()
Returns extent as a formated String
|
Extent |
union(Extent extent)
Expands this extent to include the extent of the argument.
|
Extent |
update(double xmin,
double ymin,
double xmax,
double ymax,
SpatialReference ref)
Updates this extent with the specified parameters.
|
fromJson, geographicToWebMercator, getExtentForScale, getJson, getJsonType, getLength, getLineIntersection, getScale, getSpatialReference, getType, isClockwise, setSpatialReference, toJson, toMapGeometry, toMapPoint, toScreenGeometry, toScreenPoint, webMercatorToGeographic
public static Extent create(double xmin, double ymin, double xmax, double ymax, SpatialReference ref)
xmin
- - Bottom-left X-coordinate of an extent envelope.ymin
- - Bottom-left Y-coordinate of an extent envelope.xmax
- - Top-right X-coordinate of an extent envelope.ymax
- - Top-right Y-coordinate of an extent envelope.ref
- - Spatial reference of the geometry.public static Extent create(com.google.gwt.core.client.JavaScriptObject json)
json
- - JSON object representing the geometry.public final java.lang.String toNiceString()
public final float getXMax()
public final float getXMin()
public final float getYMax()
public final float getYMin()
public final Extent centerAt(Point point)
point
- - Centers the extent on the specified x,y location.public final boolean contains(Point point)
point
- public final boolean contains(Extent extent)
extent
- public final Extent expand(float factor)
factor
- - The mulitplier value.public final Point getCenter()
public final float getHeight()
public final float getWidth()
public final boolean intersects(Extent extent)
extent
- public final boolean intersects(Point point)
point
- public final boolean intersects(Multipoint multipoint)
multipoint
- public final boolean intersects(Polygon polygon)
polygon
- public final boolean intersects(Polyline polyline)
polyline
- public final Extent offset(double dx, double dy)
dx
- - The offset distance in map units for the x-coordinate.dy
- - The offset distance in map units for the y-coordinate.public final Extent union(Extent extent)
extent
- - Expands this extent to include the extent of the argument.public final Extent update(double xmin, double ymin, double xmax, double ymax, SpatialReference ref)
xmin
- - Bottom-left X-coordinate of an extent envelope.ymin
- - Bottom-left Y-coordinate of an extent envelope.xmax
- - Top-right X-coordinate of an extent envelope.ymax
- - Top-right Y-coordinate of an extent envelope.ref
- - Spatial reference of the geometry.