I am trying to use the MD.HHENCODE (or MDSYS.HHENCODE) spatial function in Oracle Spatial 12C. I can't get a function to compile based on the only docs I could find. Here is my function code:
CREATE OR REPLACE FUNCTION linear_key ( p_shape in mdsys.sdo_geometry,
p_diminfo in mdsys.sdo_dim_array , v_lvl number)
RETURN RAW DETERMINISTIC
IS
v_ctr MDSYS.SDO_GEOMETRY;
rval RAW(200);
BEGIN
v_ctr := MDSYS.SDO_GEOM.SDO_CENTROID(p_shape,p_diminfo);
select MDSYS.HHENCODE( v_ctr.sdo_point.x, p_diminfo(1).sdo_lb, p_diminfo(1).sdo_ub, v_lvl,
v_ctr.sdo_point.y, p_diminfo(2).sdo_lb, p_diminfo(2).sdo_ub, v_lvl)
into rval from dual;
return rval;
END;
I am getting compile errors - ORA 00904, MDSYS.HHENCODE invalid identifier. Some examples I saw use MD.HHENCODE and I get the same error regardless. I also read that I should enable the package, but I cannot figure out how to do that either. I have tinkered for an entire day, please help. Thanks