I'm trying to use Spatial Index to get optimal performance on Geometry data and ended up with an error.
Please find the index and table definition and the query which fails while using the spatial index.
1. Spatial Index
REPLACE FUNCTION SYSSPATIAL.tessellate_index
o_xmin DOUBLE PRECISION,
o_ymin DOUBLE PRECISION,
o_xmax DOUBLE PRECISION,
o_ymax DOUBLE PRECISION,
u_xmin DOUBLE PRECISION,
u_ymin DOUBLE PRECISION,
u_xmax DOUBLE PRECISION,
u_ymax DOUBLE PRECISION,
scale DOUBLE PRECISION,
EXTERNAL NAME 'SL!udflib'
2. Sample Query uses Spatial Index
SELECT cellid MOD 16 AS LEVEL
,(cellid / 16) AS gridnum
FROM (SELECT sysspatial.tessellate_index(11, 11, 12, 12, 0, 0, 100, 100, 10, 10, 2, .5, 0 ) AS cellid) X;
3. When I try to populate using Geometry data.
CREATE SET TABLE xx_scratch.ra_dyson_point
UNIQUE PRIMARY INDEX ( dyson_evnt_id );
1000438097107 POINT (52.552138 -1.973318)
point.ST_X(),point.ST_Y(), point.ST_X(), point.ST_Y()
,-180, 0, 0, 90
--we get error
SELECT Failed. 7504: IN UDF/XSP/UDM SYSSPATIAL.tessellate_index: SQLSTATE 04000:
Inconsistency BETWEEN OBJECT coordinates AND universe coordinates IN TessellationEngine
Any clue/solution to fix this error is greatly appreciated.