new Rectangle(minX, minY, maxX, maxY, srid)
This class defines a simple 2-d rectangle.
Parameters:
Name | Type | Description |
---|---|---|
minX |
float | Specifies the lower bound of the X dimension |
minY |
float | Specifies the lower bound of the Y dimension |
maxX |
float | Specifies the upper bound of the X dimension |
maxY |
float | Specifies the upper bound of the Y dimension |
srid |
int | An integer that specifies the spatial reference identifier (coordinate system), |
Returns:
An instance of OM.geometry.Rectangle.
Extends
Methods
-
densify()
-
Densify a simple geodetic or projected linestring or polygon.
MapViewer renders geodetic shapes as if they are in a two-dimentional cartesian coordinate
system, in which longitude is the X axis and latitude is the Y axis. Oracle Spatial treats
such shapes differently and always takes the spherical shape of the Earth into consideration.
A straight line with two end points is straight when being rendered by MapViewer, while it
is an arc on the Earth surface when being processed by Spatial. As the result, the result
of a spatial query with a geodetic geometry as the filter might not match the geometry shape
rendered by MapViewer. The discrepency becomes prominent when the geodetic geometry spans
across a large area. Similar discrepency can be seen when the filtering geometry of the
spatial query is in a projected system and the data been queried is geodetic.This method can be used to address this problem. It densifies a simple linestring
or polygon by linearly interpolating additional points into line segments that expand more
than 1 longitude degree. The densified geometry will result in minimal discrepency when being
rendered on the map and used in spatial queries.You only need to call this method explicitly to get the densified geometry when the filter
geometry is used in a dynamic JDBC theme based vector layer. There is no need to call this method
for geometry query paremeters used with a predefined theme based vecotor layer.- Inherited From:
Returns:
The densified geoemtry.
- Type
- OM.geometry.Geometry
-
getArea()
-
Gets the total area of this rectangle. The value
is always positive.- Overrides:
-
getCenter()
-
Get center point of the rectangle
Returns:
the center point of the rectangle
- Type
- OM.geometry.Point
-
getHeight()
-
Get the rectangle's height
Returns:
the height of rectangle
- Type
- float
-
getLength()
-
Gets the total length of this rectangle.
- Overrides:
-
getMaxX()
-
Get the maximum X ordinate value
Returns:
The max X ordinate value
- Type
- float
-
getMaxY()
-
Get the maximum Y ordinate value
Returns:
The max Y ordinate value
- Type
- float
-
getMBR()
-
Get the minimum bounding rectangle (MBR) of the geometry object.
- Inherited From:
Returns:
The MBR of the geometry as a Rectangle object.
-
getMinX()
-
Get the minimum X ordinate value
Returns:
The minimum X ordinate
- Type
- float
-
getMinY()
-
Get the minimum Y ordinate value
Returns:
The minimum XY ordinate
- Type
- float
-
getOrdinates()
-
Get the coordinates of the geometry object.
- Inherited From:
Returns:
the coordinates.
- Type
- Array
-
getSRID()
-
Get the SRID of the geometry object.
- Inherited From:
Returns:
SRID.
- Type
- int
-
getType()
-
Get the type of the geometry object.
The type string is one of the constants defined in OM.GeomTypes. e.g. "Point", "LineString", or "Polygon".- Inherited From:
Returns:
geometry type.
- Type
- String
-
getWidth()
-
Get the rectangle's width
Returns:
the width of rectangle
- Type
- float
-
setRectangle(minX, minY, maxX, maxY)
-
Set the rectangle's lower-left and upper-right coordinates and SRID.
Parameters:
Name Type Description minX
float Specifies the lower bound of the X dimension.
minY
float Specifies the lower bound of the Y dimension.
maxX
float Specifies the upper bound of the X dimension.
maxY
float Specifies the upper bound of the Y dimension.
Returns:
void}
- Type
- None
-
toGML()
-
Returns the GML string of this geometry.
-
toString()
-
This method is used to convert geometry object to a geoJSON compliant string.
- Inherited From:
-
toWKT()
-
Returns the WKT String of this geometry.
-
transform(toSrid, callBack, mcsURL, dataSource, optObj)
-
Transform a geometry from one coordinate system to another.
If the original SRID and destination SRID are one of following
values: 8307, 4326, 54004, 53004, 3785, and 3857, then the transformation will be
done at the client side.
Otherwise the map client sends a request to the map tile server, which invokes Oracle
Spatial utilities to perform coordinate system transformation and returns the
result to the client.Parameters:
Name Type Description toSrid
int The toSrid specifies the SRID of the destination coordinate system.
callBack
function The call back function that is executed after the
coordinate system transformation is finished.mcsURL
string An optional parameter that specifies the URL of the map tile
server to be used to perform the coordinate system transformation.
If this parameter is omitted, the map tile server associated
with the first map tile layer is used.dataSource
String An optional parameter. It's the name of the MapViewer
data source inside which the server side length calculation is to be performed.
If omitted, the data source associated with the first map tile layer added is used.optObj
Object An optional parameter, for example, {bdutil: bdutil}.
- Inherited From:
Returns:
The resulting Geometry object when transformation in client. Null when
transformation in server side.- Type
- OM.geometry.Geometry