Class Index

Global Variables

Classes


Class MVSdoGeometry

MVSdoGeometry defines a 2-D geometry object that is similar to the SQL SDO_GEOMETRY type in Oracle Spatial or Locator. Currently supported geometry types and the corresponding type codes are:

   POINT        1
   LINE/CURVE   2
   POLYGON      3
   MULTICURVE   6
   MULTIPOLYGON 7
  

Class Summary
Constructor Attributes Constructor Name and Description
 
MVSdoGeometry(gtype, srid, sdo_elem_info, sdo_ordinates, sdo_point)
Method Summary
Method Attributes Method Name and Description
<static>  
MVSdoGeometry.createCircle(cx, cy, radius, srid)
This is a static function that creates a new circle MVSdoGeometry object.
<static>  
MVSdoGeometry.createCirclePolygon(cx, cy, radius, srid)
This is a static function that creates a polygon that approximates a circle.
<static>  
MVSdoGeometry.createGeodeticCirclePolygon(longitude, latitude, radius, srid)
This is a static function that creates a polygon that approximates a circle in a geodetic coordinate system.
<static>  
MVSdoGeometry.createLineString(ordinatesArray, srid)
This is a static function that creates a new simple line string MVSdoGeometry object.
<static>  
MVSdoGeometry.createPoint(x, y, srid)
This is a static method that creates a new point MVSdoGeometry object.
<static>  
MVSdoGeometry.createPointAtBearing(longitude, latitude, bearing, distance, srid)
This is a static function that creates a point geometry that is at the specified distance and bearing from the start point.
<static>  
MVSdoGeometry.createPolygon(ordinatesArray, srid)
This is a static function that creates a new simple polygon MVSdoGeometry object.
<static>  
MVSdoGeometry.createRectangle(minX, minY, maxX, maxY, srid)
This is a static function that creates a new rectangle MVSdoGeometry object.
<static>  
MVSdoGeometry.createRectangleByGCD(minLon, minLat, width, height, srid)
This is a static function that creates a new rectangle in a geodetic coordinate system.
 
This method densifies a simple geodetic or projected linestring or polygon.
 
getArea(unit, transformToGeodetic, foiURL, callBack, dataSource)
The method calculates the area of the MVSdoGeometry object.
<static>  
MVSdoGeometry.getDistance(x1, y1, x2, y2, srid, unit, transformToGeodetic, foiURL, callBack)
The method calculates the distance between two points.
 
This method gets the geometry type of the geometry object.
 
getLength(unit, transformToGeodetic, foiURL, callBack, dataSource)
The method calculates the perimeter/length of the MVSdoGeometry object.
 
This method gets the minimum bounding rectangle (MBR) of the geometry object.
 
This method gets the ordinates of the geometry object.
 
This method gets the X coordinate of a point geometry object.
 
This method gets the Y coordinate of a point geometry object.
Class Detail
MVSdoGeometry(gtype, srid, sdo_elem_info, sdo_ordinates, sdo_point)
Parameters:
{int} gtype
an integer that specifies the geometry type code (1, 2, 3, 6, or 7).
{int} srid
an integer that specifies the spatial reference identifier (coordinate system), such as 8307 for the standard longitude/latitude (WGS 84) coordinate system.
{Array} sdo_elem_info
an integer array that specifies the geometry element information.
{Array} sdo_ordinates
an float number array that specifies the coordinates of the vertices.
{MVSdoPointType} sdo_point
an MVSdoPointType object that specifies the point type geometry (and that only applies to points).
Returns:
The newly created MVSdoGeometry object.
Method Detail
<static> {MVSdoGeometry} MVSdoGeometry.createCircle(cx, cy, radius, srid)
This is a static function that creates a new circle MVSdoGeometry object.
Parameters:
{float} cx
cx specifies the X coordinate of the center of the circle.
{float} cy
cy specifies the Y coordinate of the center of the circle.
{float} radius
radius specifies the radius of the circle.
{int} srid
srid specifies the spatial reference identifier (coordinate system) of the geometry.
Returns:
A circle MVSdoGeometry object.

<static> {MVSdoGeometry} MVSdoGeometry.createCirclePolygon(cx, cy, radius, srid)
This is a static function that creates a polygon that approximates a circle. The radius of circle is specified in the default data unit of the coordinate system where the circle polygon is defined.
Parameters:
{float} cx
cx specifies the X coordinate of the center of the circle.
{float} cy
cy specifies the Y coordinate of the center of the circle.
{float} radius
radius specifies the radius of the circle.
{int} srid
srid specifies the spatial reference identifier (coordinate system) of the geometry.
Returns:
A polygon MVSdoGeometry object.

<static> {MVSdoGeometry} MVSdoGeometry.createGeodeticCirclePolygon(longitude, latitude, radius, srid)
This is a static function that creates a polygon that approximates a circle in a geodetic coordinate system. The center of the circle is specified by latitude and longitude. The radius of circle is specified by the Great Circle Distance on earth in meters.
Parameters:
{float} longitude
longitude specifies the circle center longitude.
{float} latitude
latitude specifies the circle center latitude.
{float} radius
radius specifies the circle radius in meters.
{int} srid
srid specifies the spatial reference identifier (coordinate system) of the geometry. Only geodetic coordinate system is allowed.
Returns:
A polygon MVSdoGeometry object.

<static> {MVSdoGeometry} MVSdoGeometry.createLineString(ordinatesArray, srid)
This is a static function that creates a new simple line string MVSdoGeometry object.
Parameters:
{Array} ordinatesArray
ordinatesArray is a floating point number array that specifies the coordinates of the line string geometry.
{int} srid
srid specifies the spatial reference identifier (coordinate system) of the geometry.
Returns:
A line string MVSdoGeometry object.

<static> {MVSdoGeometry} MVSdoGeometry.createPoint(x, y, srid)
This is a static method that creates a new point MVSdoGeometry object.
Parameters:
{float} x
x specifies the X coordinate of the point geometry.
{float} y
y specifies the Y coordinate of the point geometry.
srid
Returns:
A point MVSdoGeometry object.

<static> {MVSdoGeometry} MVSdoGeometry.createPointAtBearing(longitude, latitude, bearing, distance, srid)
This is a static function that creates a point geometry that is at the specified distance and bearing from the start point. The start point is specified by latitude and longitude. The distance from the start point is specified in meters calculated as Great Circle Distance on earth.
Parameters:
{float} longitude
longitude specifies the circle center longitude.
{float} latitude
latitude specifies the circle center latitude.
{float} bearing
bearing specifies number of radians, measured clockwise from North. Must be in the range of either -pi to pi or 0 to 2*pi.
{float} distance
distance specifies number of meters from the start point along the initial bearing direction to the computed destination point.
{int} srid
srid specifies the spatial reference identifier (coordinate system) of the geometry. Only geodetic coordinate system is allowed.
Returns:
A polygon MVSdoGeometry object.

<static> {MVSdoGeometry} MVSdoGeometry.createPolygon(ordinatesArray, srid)
This is a static function that creates a new simple polygon MVSdoGeometry object.
Parameters:
{Array} ordinatesArray
ordinatesArray is a floating point number array that specifies the coordinates of the polygon geometry.
{int} srid
srid specifies the spatial reference identifier (coordinate system) of the geometry.
Returns:
A polygon MVSdoGeometry object.

<static> {MVSdoGeometry} MVSdoGeometry.createRectangle(minX, minY, maxX, maxY, srid)
This is a static function that creates a new rectangle MVSdoGeometry object.
Parameters:
{float} minX
minX specifies the lower bound of the X dimension
{float} minY
minY specifies the lower bound of the Y dimension
{float} maxX
maxX specifies the upper bound of the X dimension
{float} maxY
maxY specifies the upper bound of the Y dimension
{int} srid
srid specifies the spatial reference identifier (coordinate system) of the geometry.
Returns:
A rectangle MVSdoGeometry object.

<static> {MVSdoGeometry} MVSdoGeometry.createRectangleByGCD(minLon, minLat, width, height, srid)
This is a static function that creates a new rectangle in a geodetic coordinate system. The rectangle is specified by its lower-left corner, width and height. The lower-left corner must be specified by latitude and longitude. The width and height must be specified by the Greate Circle Distance on earth in meters.
Parameters:
{float} minLon
minLon specifies the lower bound of longitude
{float} minLat
minLat specifies the lower bound of latitude
{float} width
width specifies the width of the rectangle in meters
{float} height
height specifies the height of the rectangle in meters
{int} srid
srid specifies the spatial reference identifier (coordinate system) of the geometry. Only geodetic coordinate system is allowed.
Returns:
A rectangle MVSdoGeometry object.

{MVSdoGeometry} densify()
This method densifies 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 descrepency becomes prominent when the geodetic geometry spans across a large area. Similar descrepency 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 descrepency 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 FOI layer. There is no need to call this method for geometry query paremeters used with a predefined theme based FOI layer.

This method only modifies simple geodetic or projected linestrings and polygons. It returns the geometry unchanged if the geometry is not in a geodetic or projected coordinate system, or the geometry is not a simple linestring or polygon.


getArea(unit, transformToGeodetic, foiURL, callBack, dataSource)
The method calculates the area of the MVSdoGeometry object.

If the geometry is defined in a geodetic system, the Earth ellipsoid area is returned as the result. If the geometry is defined in a projected system, by default the Cartesian area is returned as the result. But you can also choose to get the Earth ellipsoid surface area instead. The area is actually calculated by the FOI server that invokes the spatial area function inside an Oracle database server. In order to make it work, the default datasource defined with the MapViewer instance where the FOI server is running must support the input area unit and the necessary coordinate system transformation that needs to be performed to calculate the ellipsoid surface area.

This method invokes server side Oracle Spatial utilities to calculate geometry area. When XMLHTTP/XMLHttpRequest objects are enabled, the request for area calculation is sent in synchronous mode and the application javascript code following this method call will not be executed until the geometry area is returned from the server. When XMLHTTP/XMLHttpRequest objects are disabled, the request is sent in asynchronous mode without pausing for the server side response. In this case, all application code that depends on the server side area computation result should be packed into a call back function so that it can be executed only after the result is returned. When the call back function is invoked after the result is returned, the geometry area is passed into the call back function as the only parameter.

Please refer to MVMapView#enableXMLHTTP for more information.

Parameters:
{String} unit
unit specifies the area measurement unit, such as "sq_meter". It must be valid unit defined in the MDSYS.SDO_AREA_UNITS table. If omitted, "sq_meter" is used for geodetic systems and the coordinate system default area unit is used for other type of coordinate systems.
{boolean} transformToGeodetic
transformToGeodetic is an optional parameter that specifies whether to convert the projected coordinates to geodetic coordinates and calculate the ellipsoid surface area. It can be true (convert to geodetic) or false (do not convert to geodetic). This parameter may be used only for geometry defined in a projected systems.
{String} foiURL
foiURL specifies the URL of the FOI server, which should be in the form http://host:port/mapviewer/foi. If omitted, the URL of the FOI server is derived from the MapViewer base URL.
{function} callBack
the call back function that is execuated after the area calculation is finished.
{String} dataSource
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 base map added is used.
See:
MVMapView#enableXMLHTTP

<static> {float} MVSdoGeometry.getDistance(x1, y1, x2, y2, srid, unit, transformToGeodetic, foiURL, callBack)
The method calculates the distance between two points.

If the points are defined in a geodetic system, the Earth ellipsoid distance is returned as the result. If the points are defined in a projected system, by default the Cartesian distance is returned as the result. But you can also choose to get the Earth ellipsoid surface distance instead. The distance is actually calculated by the FOI server that invokes the spatial area function inside an Oracle database server. In order to make it work, the default datasource defined with the MapViewer instance where the FOI server is running must support the input distance unit and the necessary coordinate system transformation that needs to be performed to calculate the ellipsoid surface distance.

This method invokes server side Oracle Spatial utilities to calculate geometry length. When XMLHTTP/XMLHttpRequest objects are enabled, the request for length calculation is sent in synchronous mode and the application javascript code following this method call will not be executed until the geometry length is returned from the server. When XMLHTTP/XMLHttpRequest objects are disabled, the request is sent in asynchronous mode without pausing for the server side response. In this case, all application code that depends on the server side length computation result should be packed into a call back function so that it can be executed only after the result is returned. When the call back function is invoked after the result is returned, the geometry length is passed into the call back function as the only parameter.

Please refer to MVMapView#enableXMLHTTP for more information.

Parameters:
{double} x1
the X coordinate of the first point.
{double} y1
the Y coordinate of the first point.
{double} x2
the X coordinate of the second point.
{double} y2
the X coordinate of the second point.
{int} srid
an integer that specifies the spatial reference identifier (coordinate system),
{String} unit
unit specifies the unit of distance measurement, such as "meter". It must be a valid unit defined in the MDSYS.SDO_DIST_UNITS table. If omitted, "meter" is used for geodetic systems and the coordinate system default unit is used for other type of coordinate systems.
{boolean} transformToGeodetic
transformToGeodetic is an optional parameter that specifies whether to convert the projected coordinates to geodetic coordinates and calculate the ellipsoid surface distance. It can be true (convert to geodetic) or false (do not convert to geodetic). This parameter may be used only for geometry defined in a projected system.
{String} foiURL
foiURL specifies the URL of the FOI server, which should be in the form http://host:port/mapviewer/foi. If omitted, the URL of the FOI server is derived from the MapViewer base URL.
{function} callBack
the call back function that is execuated after the length calculation is finished.
Returns:
{float} The length of the MVSdoGeometry object when XMLHTTP/XMLHttpRequest objects are enabled. Null when XMLHTTP/XMLHttpRequest objects are disabled.
See:
MVMapView#enableXMLHTTP

{int} getGType()
This method gets the geometry type of the geometry object.
Returns:
an integer that specifies the geometry type of the geometry object.

{float} getLength(unit, transformToGeodetic, foiURL, callBack, dataSource)
The method calculates the perimeter/length of the MVSdoGeometry object.

If the geometry is defined in a geodetic system, the Earth ellipsoid distance is returned as the result. If the geometry is defined in a projected system, by default the Cartesian distance is returned as the result. But you can also choose to get the Earth ellipsoid surface distance instead. The distance is actually calculated by the FOI server that invokes the spatial area function inside an Oracle database server. In order to make it work, the default datasource defined with the MapViewer instance where the FOI server is running must support the input distance unit and the necessary coordinate system transformation that needs to be performed to calculate the ellipsoid surface distance.

This method invokes server side Oracle Spatial utilities to calculate geometry length. When XMLHTTP/XMLHttpRequest objects are enabled, the request for length calculation is sent in synchronous mode and the application javascript code following this method call will not be executed until the geometry length is returned from the server. When XMLHTTP/XMLHttpRequest objects are disabled, the request is sent in asynchronous mode without pausing for the server side response. In this case, all application code that depends on the server side length computation result should be packed into a call back function so that it can be executed only after the result is returned. When the call back function is invoked after the result is returned, the geometry length is passed into the call back function as the only parameter.

Please refer to MVMapView#enableXMLHTTP for more information.

Parameters:
{String} unit
unit specifies the unit of distance measurement, such as "meter". It must be a valid unit defined in the MDSYS.SDO_DIST_UNITS table. If omitted, "meter" is used for geodetic systems and the coordinate system default unit is used for other type of coordinate systems.
{boolean} transformToGeodetic
transformToGeodetic is an optional parameter that specifies whether to convert the projected coordinates to geodetic coordinates and calculate the ellipsoid surface distance. It can be true (convert to geodetic) or false (do not convert to geodetic). This parameter may be used only for geometry defined in a projected system.
{String} foiURL
foiURL specifies the URL of the FOI server, which should be in the form http://host:port/mapviewer/foi. If omitted, the URL of the FOI server is derived from the MapViewer base URL.
{function} callBack
the call back function that is execuated after the length calculation is finished.
{String} dataSource
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 base map added is used.
Returns:
{float} The length of the MVSdoGeometry object when XMLHTTP/XMLHttpRequest objects are enabled. Null when XMLHTTP/XMLHttpRequest objects are disabled.
See:
MVMapView#enableXMLHTTP

{Array} getMBR()
This method gets the minimum bounding rectangle (MBR) of the geometry object.
Returns:
The MBR of the geometry as a four-element array (minX, minY, maxX, maxY).

{Array} getOrdinates()
This method gets the ordinates of the geometry object.
Returns:
A floating point number array that specifies the ordinates of the geometry object.

{float} getPointX()
This method gets the X coordinate of a point geometry object. If the MVSdoGeometry is not a point, the X coordinate of the first point is returned.
Returns:
{float} The X coordinate of the point geometry.

{float} getPointY()
This method gets the Y coordinate of a point geometry object. If the MVSdoGeometry is not a point, the Y coordinate of the first point is returned.
Returns:
{float} The Y coordinate of the point geometry.

Documentation generated by JsDoc Toolkit 2.1.0 on Fri Feb 25 2011 12:34:46 GMT-0500 (EST)