Skip to content

Commit 040e34d

Browse files
committed
Added calculation of the distance between a line and a point
1 parent 612f06b commit 040e34d

16 files changed

+2572
-12
lines changed

Diff for: doc/index.html

+227
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2+
<HTML
3+
><HEAD
4+
><TITLE
5+
>&#13; pgSphere 1.1.5
6+
</TITLE
7+
><META
8+
NAME="GENERATOR"
9+
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10+
REL="NEXT"
11+
TITLE="
12+
What is pgSphere?
13+
"
14+
HREF="x20.html"><LINK
15+
REL="STYLESHEET"
16+
TYPE="text/css"
17+
HREF="pg_sphere.css"><META
18+
NAME="creation"
19+
CONTENT="2023-08-04T08:50:28"><META
20+
HTTP-EQUIV="Content-Type"
21+
CONTENT="text/html; charset=utf-8"></HEAD
22+
><BODY
23+
CLASS="article"
24+
BGCOLOR="#FFFFFF"
25+
TEXT="#000000"
26+
LINK="#0000FF"
27+
VLINK="#840084"
28+
ALINK="#0000FF"
29+
><DIV
30+
CLASS="ARTICLE"
31+
><DIV
32+
CLASS="TITLEPAGE"
33+
><H1
34+
CLASS="title"
35+
><A
36+
NAME="AEN2"
37+
>pgSphere 1.1.5</A
38+
></H1
39+
><H3
40+
CLASS="author"
41+
><A
42+
NAME="AEN4"
43+
>pgSphere development team</A
44+
></H3
45+
><DIV
46+
><DIV
47+
CLASS="abstract"
48+
><P
49+
></P
50+
><A
51+
NAME="AEN6"
52+
></A
53+
>
54+
<P
55+
>&#13; <DIV
56+
CLASS="mediaobject"
57+
><P
58+
>&#13; <IMG
59+
SRC="img/logo.png"
60+
WIDTH="168px">
61+
</P
62+
></DIV
63+
>
64+
</P
65+
>
66+
<P
67+
>&#13; <SPAN
68+
CLASS="application"
69+
>pgSphere</SPAN
70+
> provides spherical data
71+
types, functions, and operators for
72+
<SPAN
73+
CLASS="application"
74+
>PostgreSQL</SPAN
75+
>.
76+
</P
77+
>
78+
<P
79+
>&#13; The project is hosted at <A
80+
HREF="http://pgfoundry.org/projects/pgsphere/"
81+
TARGET="_top"
82+
><I
83+
CLASS="citetitle"
84+
>pgfoundry.org</I
85+
></A
86+
>
87+
and <A
88+
HREF="https://github.com/akorotkov/pgsphere"
89+
TARGET="_top"
90+
><I
91+
CLASS="citetitle"
92+
>https://github.com/akorotkov/pgsphere</I
93+
></A
94+
>
95+
</P
96+
>
97+
<P
98+
>
99+
This document
100+
describes installation and usage of this module.
101+
</P
102+
>
103+
<P
104+
></P
105+
></DIV
106+
></DIV
107+
><HR></DIV
108+
><DIV
109+
CLASS="TOC"
110+
><DL
111+
><DT
112+
><B
113+
>Table of Contents</B
114+
></DT
115+
><DT
116+
>1. <A
117+
HREF="x20.html"
118+
>What is pgSphere?</A
119+
></DT
120+
><DT
121+
>2. <A
122+
HREF="x46.html"
123+
>Installation</A
124+
></DT
125+
><DD
126+
><DL
127+
><DT
128+
>2.1. <A
129+
HREF="x46.html#AEN48"
130+
>Download</A
131+
></DT
132+
><DT
133+
>2.2. <A
134+
HREF="x46.html#AEN56"
135+
>Installation</A
136+
></DT
137+
><DT
138+
>2.3. <A
139+
HREF="x46.html#AEN95"
140+
>Creating a database with <SPAN
141+
CLASS="application"
142+
>pgSphere</SPAN
143+
></A
144+
></DT
145+
></DL
146+
></DD
147+
><DT
148+
>3. <A
149+
HREF="types.html"
150+
>Data types</A
151+
></DT
152+
><DD
153+
><DL
154+
><DT
155+
>3.1. <A
156+
HREF="types.html#dt.over"
157+
>Overview</A
158+
></DT
159+
><DT
160+
>3.2. <A
161+
HREF="types.html#dt.spoint"
162+
>Point</A
163+
></DT
164+
></DL
165+
></DD
166+
></DL
167+
></DIV
168+
>
169+
170+
171+
172+
173+
174+
</DIV
175+
><DIV
176+
CLASS="NAVFOOTER"
177+
><HR
178+
ALIGN="LEFT"
179+
WIDTH="100%"><TABLE
180+
SUMMARY="Footer navigation table"
181+
WIDTH="100%"
182+
BORDER="0"
183+
CELLPADDING="0"
184+
CELLSPACING="0"
185+
><TR
186+
><TD
187+
WIDTH="33%"
188+
ALIGN="left"
189+
VALIGN="top"
190+
>&nbsp;</TD
191+
><TD
192+
WIDTH="34%"
193+
ALIGN="center"
194+
VALIGN="top"
195+
>&nbsp;</TD
196+
><TD
197+
WIDTH="33%"
198+
ALIGN="right"
199+
VALIGN="top"
200+
><A
201+
HREF="x20.html"
202+
ACCESSKEY="N"
203+
>Next</A
204+
></TD
205+
></TR
206+
><TR
207+
><TD
208+
WIDTH="33%"
209+
ALIGN="left"
210+
VALIGN="top"
211+
>&nbsp;</TD
212+
><TD
213+
WIDTH="34%"
214+
ALIGN="center"
215+
VALIGN="top"
216+
>&nbsp;</TD
217+
><TD
218+
WIDTH="33%"
219+
ALIGN="right"
220+
VALIGN="top"
221+
>What is pgSphere?</TD
222+
></TR
223+
></TABLE
224+
></DIV
225+
></BODY
226+
></HTML
227+
>

Diff for: doc/operators.sgm

+13-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@
331331
a non-boolean operator returning the distance between two
332332
objects in radians. Currently,
333333
<application>pgSphere</application> supports only distances
334-
between points, circles, and between point and circle. If the
334+
between points, circles, between point and circle, and
335+
between point and line. If the
335336
objects are overlapping, the distance operator returns zero
336337
(0.0).
337338
</para>
@@ -343,6 +344,17 @@
343344
<![CDATA[ dist]]>
344345
<![CDATA[------]]>
345346
<![CDATA[ 16]]>
347+
<![CDATA[(1 row)]]>
348+
</programlisting>
349+
</example>
350+
<example>
351+
<title>Distance between point and line</title>
352+
<programlisting>
353+
<![CDATA[sql> SELECT 180 * (sline '( 0d, 0d, 0d, XYZ ), 40d ' <-> spoint '( 0d, 90d )')]]>
354+
<![CDATA[ / pi() AS dist ;]]>
355+
<![CDATA[ dist]]>
356+
<![CDATA[------]]>
357+
<![CDATA[ 90]]>
346358
<![CDATA[(1 row)]]>
347359
</programlisting>
348360
</example>

0 commit comments

Comments
 (0)