How to Create a Geometry How to Access Geometry Type Public Methods and Fields

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 Oracle Spatial 16-15 ANYINTERACT Syntax Purpose This operator returns true if the GTYPE_POINT interacts with the geometry, and false otherwise. This operator takes the following arguments: ■ geom: any supported geometry type. ■ key: a GTYPE_POINT geometry type. The geometry type of this geometry must be GTYPE_POINT or a RUNTIME_ EXCEPTION will be thrown. ■ tol: the tolerance as a double value. For more information, see SDO_ANYINTERACT in the Oracle Spatial Developers Guide. Examples Example 16–27 shows how to use the ANYINTERACT Oracle Spatial geometric relation operator in an Oracle CQL query. Example 16–13 Oracle CQL Query Using Geometric Relation Operator ANYINTERACT view id=op_in_where RStream select loc.customerId, shop.shopId from LocGeomStream[NOW] as loc, ShopGeomRelation as shop where ANYINTERACTspatialshop.geom, loc.curLoc, 5.0d = true view view id=op_in_proj RStream select loc.customerId, shop.shopId, ANYINTERACTspatialshop.geom, loc.curLoc, 5.0d from Note: This is an Oracle Spatial geometric relation operator and not a method of the com.oracle.cep.cartridge.spatial.Geometry class so you invoke this operator as Example 16–13 shows, without a package prefix: ANYINTERACTspatial