How to Access the Geometry Types That the Oracle Spatial Java API Supports

Oracle Spatial 16-13

16.2.5 How to Use Geometry Filter Operators

Using Oracle Spatial, you can access the following Oracle Spatial geometry filter operators in the WHERE clause of an Oracle CQL query: ■ FILTER ■ NN In Example 16–9 , the view filter uses the FILTER geometry filter operator in the WHERE clause. Example 16–9 Using Geometry Filter Operators view id=filter RStream select loc.customerId, shop.shopId from LocGeomStream[NOW] as loc, ShopGeomRelation as shop where FILTERspatialshop.geom, loc.curLoc, 5.0d = true view For more information, see Section 16.1.2.6, Geometric Filter Operators .

16.2.6 How to Use the Default Geodetic Coordinates

When you create an Oracle CQL query using the default Oracle Spatial application context, the default SRID will be set to CARTESIAN. As Example 16–10 shows, the createPoint method call uses the default link spatial. This guarantees that the default Oracle Spatial application context is applied. Example 16–10 Using the Default Geodetic Coordinates in an Oracle CQL Query view id=createPoint select com.oracle.cep.cartridge.spatial.Geometry.createPointspatial lng, lat from CustomerPos[NOW] view For more information, see: ■ Section 16.1.4, Oracle Spatial Application Context ■ Section 16.1.2.3, Ordinates and Coordinate Systems and the SDO_SRID

16.2.7 How to Use Other Geodetic Coordinates

This procedure describes how to use the Oracle Spatial application context to specify a geodetic coordinate system other than the default Cartesian geodetic coordinate system in an Oracle CQL query: For more information, see: ■ Section 16.1.4, Oracle Spatial Application Context ■ Section 16.1.2.3, Ordinates and Coordinate Systems and the SDO_SRID To use other geodetic coordinates: 1. Create an Oracle Spatial application context and define the srid attribute for the geodetic coordinate system you want to use. 16-14 Oracle Complex Event Processing CQL Language Reference Example 16–11 shows how to create a spatial context named SpatialGRS80 in an EPN assembly file using the Geodetic Reference System 1980 GRS80 coordinate system. Example 16–11 spatial:context Element in EPN Assembly File spatial:context id=SpatialGRS80 srid=4269 sma=6378137 rof=298.25722101 2. In your Oracle CQL query, use the id of this spatial:context in your links. Example 16–12 shows how to reference a spatial:context in an Oracle CQL query. In this case, the query uses link name SpatialGRS80 defined in Example 16–11 to propagate this application context to Oracle Spatial. The spatial:context attribute settings of SpatialGRS80 are applied to the createPoint method call. Example 16–12 Referencing spatial:context in an Oracle CQL Query view id=”createPoint” select com.oracle.cep.cartridge.spatial.Geometry.createPointSpatialGRS80 lng, lat from CustomerPos[NOW] view