6.10.  smoc functions #

smoc_info(); 
smoc;
 

Returns information about the internal representation of the smoc.

Example 6.22. A circle

sql> SELECT smoc_info('0/4 1/0 2 12-13 34-35 45 47 2/4 6 12 14 56-57 60-61 88 90-91 116-117 119 130-131 134-135 177 179 185 187');
                                                           smoc_info
--------------------------------------------------------------------------------------------------------------------------------
 version: 0, order: 2, depth: 1, first: 0, last: 3458764513820540928, area: 1261007895663738880, tree_begin: 48, data_begin: 72
            

smoc_degrade(order,  
 ); 
order int;
smoc;
 

Adjusts the order of an smoc to be more or less precise.

When order is smaller than smoc's maximal order, the MOC resolution is degraded to the new order, and its maximal order is set to that order. When order is larger than the smoc's maximal order, smoc's shape is not modified, but its maximal order is raised to order.

sum(); 
smoc;
 
intersection(); 
smoc;
 

smoc union and intersection are available as aggregate functions that compute the aggretated coverage over a given column.

Example 6.23. Computing the overall coverage of a catalog

SELECT sum(coverage) FROM ivoa;
    sum
-----------
 0/0-11 6/
            

max_order(); 
smoc;
 

Returns the maximal order of an smoc.

The maximal order of a MOC can be higher than than the highest order appearing in the serialisation. For instance, in the example below the full-sky coverage given at order 6 means that no patch larger than about 1 degree is not covered. In the ASCII serialisation, give the maximum order with an with an empty cell list.

Example 6.24. Obtaining a MOC order

SELECT max_order(smoc('0/0-11 6/')) as order;
    order
-----------
 6