Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b7eb98e

Browse files
df7cbmsdemlei
authored andcommitted
Expand docs with more smoc details
1 parent 8526665 commit b7eb98e

File tree

4 files changed

+45
-4
lines changed

4 files changed

+45
-4
lines changed

doc/functions.sgm

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,12 @@
612612
<para>
613613
Adjusts the order of an smoc to be more or less precise.
614614
</para>
615+
<para>
616+
When order is smaller than smoc's maximal order, the MOC resolution
617+
is degraded to the new order, and its maximal order is set to that
618+
order. When order is larger than the smoc's maximal order, smoc's
619+
shape is not modified, but its maximal order is raised to order.
620+
</para>
615621

616622
<funcsynopsis>
617623
<funcprototype>
@@ -624,8 +630,18 @@
624630
</funcprototype>
625631
</funcsynopsis>
626632
<para>
627-
Aggregate functions for smoc union and intersection.
633+
<type>smoc</type> union and intersection are available as aggregate functions
634+
that compute the aggretated area over a given column.
628635
</para>
636+
<example>
637+
<title>Computing the overall coverage of a catalog</title>
638+
<programlisting>
639+
<![CDATA[SELECT sum(coverage) FROM ivoa;]]>
640+
<![CDATA[ sum]]>
641+
<![CDATA[-----------]]>
642+
<![CDATA[ 0/0-11 6/]]>
643+
</programlisting>
644+
</example>
629645

630646
</sect2>
631647

doc/indices.sgm

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,22 @@
7878
to create smoc indices. An index speeds up the execution
7979
time of operators <link
8080
linkend="op.over"><literal>&lt;@</literal></link>, <link
81-
linkend="op.over"><literal>@</literal></link>, <link
81+
linkend="op.over"><literal>@&gt;</literal></link>, <link
8282
linkend="op.over"><literal>&amp;&amp;</literal></link>, <link
8383
linkend="op.equal"><literal>=</literal></link>, and <link
84-
linkend="op.equal"><literal>!=</literal></link>.
84+
linkend="op.equal"><literal>&lt;&gt;</literal></link>.
85+
</para>
86+
<para>
87+
The index works by casting all contained smocs to a fixed level, and
88+
for each pixel at that level, storing which smocs overlap with that
89+
pixel. This is especially beneficial for "overlaps" queries using
90+
the <literal>&amp;&amp;</literal> operator. Two levels of granularity
91+
are provided: the default opclass <literal>smoc_gin_ops</literal>
92+
works on level 5 with a resolution of 12288 pixels, while the
93+
opclass <literal>smoc_gin_ops_fine</literal> works on level 8 with
94+
786432 pixels. The downside of that approach is that storing large
95+
smocs like "all sky" (<literal>0/0-11</literal>) produces a large
96+
number of index entries.
8597
</para>
8698
<example>
8799
<title>Index of smoc coverage objects</title>
@@ -91,6 +103,8 @@
91103
<![CDATA[);]]>
92104
<![CDATA[-- Put in data now]]>
93105
<![CDATA[CREATE INDEX ON ivoa USING GIN (coverage);]]>
106+
<![CDATA[-- Alternative index with more detail]]>
107+
<![CDATA[CREATE INDEX ivoa_fine_idx ON ivoa USING GIN (coverage smoc_gin_ops_fine);]]>
94108
</programlisting>
95109
</example>
96110

doc/operators.sgm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,14 @@
513513
<type>smoc</type> operators
514514
</title>
515515

516+
<para>
517+
A unique feature of MOCs compared to the other
518+
<application>pgSphere</application>
519+
objects is that their unions and intersections are again MOCs.
520+
Hence, smocs support two special operators which both yield
521+
<type>smoc</type> as output:
522+
</para>
523+
516524
<para>
517525
Union:
518526
</para>

doc/types.sgm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,10 @@ i syntax is a somewhat complex.
717717
union, intersection and equality operations between them. In order
718718
to accomplish this task, we based the system on a regular and
719719
hierarchical partitioning of the sphere, a process called
720-
tessellation.
720+
tessellation, yielding pixels of different size. At level 0, the
721+
sky is divided into 12 pixels numbered 0 to 11. At the maximally
722+
defined level 29, there are 12 * 4^29 = 3458764513820540928
723+
pixels.
721724
</para>
722725
<para>
723726
The MOC standard is described at http://www.ivoa.net/documents/MOC/

0 commit comments

Comments
 (0)