liquid_feedback_core

annotate pgLatLon/README.html @ 530:6bc81898fd3b

Fixed typo in documentation and comments: "indicies" -> "indices"; Marked make-doc.sh as executable
author jbe
date Sun Aug 21 16:28:21 2016 +0200 (2016-08-21)
parents 96ee2db56bec
children
rev   line source
jbe@529 1 <html><head><title>pgLatLon v0.1 documentation</title></head><body>
jbe@529 2 <h1>pgLatLon v0.1 documentation</h1>
jbe@529 3
jbe@529 4 <p>pgLatLon is a spatial database extension for the PostgreSQL object-relational
jbe@529 5 database management system providing geographic data types and spatial indexing
jbe@529 6 for the WGS-84 spheroid.</p>
jbe@529 7
jbe@529 8 <p>While many other spatial databases still use imprecise bounding boxes for many
jbe@529 9 operations, pgLatLon supports more precise geometric calculations for all
jbe@529 10 implemented operators. Efficient indexing of geometric objects is provided
jbe@530 11 using fractal indices. Optimizations on bit level (including logarithmic
jbe@529 12 compression) allow for a highly memory-efficient non-overlapping index suitable
jbe@529 13 for huge datasets.</p>
jbe@529 14
jbe@529 15 <p>Unlike competing spatial extensions for PostgreSQL, pgLatLon is available under
jbe@529 16 the permissive MIT/X11 license to avoid problems with viral licenses like the
jbe@529 17 GPLv2/v3.</p>
jbe@529 18
jbe@529 19 <h2>Installation</h2>
jbe@529 20
jbe@529 21 <h3>Automatic installation</h3>
jbe@529 22
jbe@529 23 <p>Prerequisites:</p>
jbe@529 24
jbe@529 25 <ul>
jbe@529 26 <li>Ensure that the <code>pg_config</code> binary is in your path (shipped with PostgreSQL).</li>
jbe@529 27 <li>Ensure that GNU Make is available (either as <code>make</code> or <code>gmake</code>).</li>
jbe@529 28 </ul>
jbe@529 29
jbe@529 30 <p>Then simply type:</p>
jbe@529 31
jbe@529 32 <pre><code>make install
jbe@529 33 </code></pre>
jbe@529 34
jbe@529 35 <h3>Manual installation</h3>
jbe@529 36
jbe@529 37 <p>It is also possible to compile and install the extension without GNU Make as
jbe@529 38 follows:</p>
jbe@529 39
jbe@529 40 <pre><code>cc -Wall -O2 -fPIC -shared -I `pg_config --includedir-server` -o latlon-v0001.so latlon-v0001.c
jbe@529 41 cp latlon-v0001.so `pg_config --pkglibdir`
jbe@529 42 cp latlon.control `pg_config --sharedir`/extension/
jbe@529 43 cp latlon--0.1.sql `pg_config --sharedir`/extension/
jbe@529 44 </code></pre>
jbe@529 45
jbe@529 46 <h3>Loading the extension</h3>
jbe@529 47
jbe@529 48 <p>After installation, you can create a database and load the extension as
jbe@529 49 follows:</p>
jbe@529 50
jbe@529 51 <pre><code>% createdb test_database
jbe@529 52 % psql test_database
jbe@529 53 psql (9.5.4)
jbe@529 54 Type "help" for help.
jbe@529 55
jbe@529 56 test_database=# CREATE EXTENSION latlon;
jbe@529 57 </code></pre>
jbe@529 58
jbe@529 59 <h2>Reference</h2>
jbe@529 60
jbe@529 61 <h3>1. Types</h3>
jbe@529 62
jbe@529 63 <p>pgLatLon provides four geographic types: <code>epoint</code>, <code>ebox</code>, <code>ecircle</code>, and
jbe@529 64 <code>ecluster</code>.</p>
jbe@529 65
jbe@529 66 <h4><code>epoint</code></h4>
jbe@529 67
jbe@529 68 <p>A point on the earth spheroid (WGS-84).</p>
jbe@529 69
jbe@529 70 <p>The text input format is <code>'[N|S]&lt;float&gt; [E|W]&lt;float&gt;'</code>, where each float is in
jbe@529 71 degrees. Note the required white space between the latitude and longitude
jbe@529 72 components. Each floating point number may have a sign, in which case <code>N</code>/<code>S</code>
jbe@529 73 or <code>E</code>/<code>W</code> are switched respectively (e.g. <code>E-5</code> is the same as <code>W5</code>).</p>
jbe@529 74
jbe@529 75 <p>An <code>epoint</code> may also be created from two floating point numbers by calling
jbe@529 76 <code>epoint(latitude, longitude)</code>, where positive latitudes are used for the
jbe@529 77 northern hemisphere, negative latitudes are used for the southern hemisphere,
jbe@529 78 positive longitudes indicate positions east of the prime meridian, and negative
jbe@529 79 longitudes indicate positions west of the prime meridian.</p>
jbe@529 80
jbe@529 81 <p>Latitudes exceeding -90 or +90 degrees are truncated to -90 or +90
jbe@529 82 respectively, in which case a warning will be issued. Longitudes exceeding -180
jbe@529 83 or +180 degrees will be converted to values between -180 and +180 (both
jbe@529 84 inclusive) by adding or substracting a multiple of 360 degrees, in which case a
jbe@529 85 notice will be issued.</p>
jbe@529 86
jbe@529 87 <p>If the latitude is -90 or +90 (south pole or north pole), a longitude value is
jbe@529 88 still stored in the datum, and if a point is on the prime meridian or the
jbe@529 89 180th meridian, the east/west bit is also stored in the datum. In case of the
jbe@529 90 prime meridian, this is done by storing a floating point value of -0 for
jbe@529 91 0 degrees west and a value of +0 for 0 degrees east. In case of the
jbe@529 92 180th meridian, this is done by storing -180 or +180 respectively. The equality
jbe@529 93 operator, however, returns true when the same points on earth are described,
jbe@529 94 i.e. the longitude is ignored for the poles, and 180 degrees west is considered
jbe@529 95 to be equal to 180 degrees east.</p>
jbe@529 96
jbe@529 97 <h4><code>ebox</code></h4>
jbe@529 98
jbe@529 99 <p>An area on earth demarcated by a southern and northern latitude, and a western
jbe@529 100 and eastern longitude (all given in WGS-84).</p>
jbe@529 101
jbe@529 102 <p>The text input format is
jbe@529 103 <code>'{N|S}&lt;float&gt; {E|W}&lt;float&gt; {N|S}&lt;float&gt; {E|W}&lt;float&gt;'</code>, where each float is in
jbe@529 104 degrees. The ordering of the four white-space separated blocks is not
jbe@529 105 significant. To include the 180th meridian, one longitude boundary must be
jbe@529 106 equal to or exceed <code>W180</code> or <code>E180</code>, e.g. <code>'N10 N20 E170 E190'</code>.</p>
jbe@529 107
jbe@529 108 <p>A special value is the empty area, denoted by the text represenation <code>'empty'</code>.
jbe@529 109 Such an <code>ebox</code> does not contain any point.</p>
jbe@529 110
jbe@529 111 <p>An <code>ebox</code> may also be created from four floating point numbers by calling
jbe@529 112 <code>ebox(min_latitude, max_latitude, min_longitude, max_longitude)</code>, where
jbe@529 113 positive values are used for north and east, and negative values are used for
jbe@529 114 south and west. If <code>min_latitude</code> is strictly greater than <code>max_latitude</code>, an
jbe@529 115 empty <code>ebox</code> is created. If <code>min_longitude</code> is greater than <code>max_longitude</code> and
jbe@529 116 if both longitudes are between -180 and +180 degrees, then the area oriented in
jbe@529 117 such way that the 180th meridian is included.</p>
jbe@529 118
jbe@529 119 <p>If the longitude span is less than 120 degrees, an <code>ebox</code> may be alternatively
jbe@529 120 created from two <code>epoints</code> in the following way: <code>ebox(epoint(lat1, lon1),
jbe@529 121 epoint(lat2, lon2))</code>. In this case <code>lat1</code> and <code>lat2</code> as well as <code>lon1</code> and
jbe@529 122 <code>lon2</code> can be swapped without any impact.</p>
jbe@529 123
jbe@529 124 <h4><code>ecircle</code></h4>
jbe@529 125
jbe@529 126 <p>An area containing all points not farther away from a given center point
jbe@529 127 (WGS-84) than a given radius.</p>
jbe@529 128
jbe@529 129 <p>The text input format is <code>'{N|S}&lt;float&gt; {E|W}&lt;float&gt; &lt;float&gt;'</code>, where the first
jbe@529 130 two floats denote the center point in degrees and the third float denotes the
jbe@529 131 radius in meters. A radius equal to minus infinity denotes an empty circle
jbe@529 132 which contains no point at all (despite having a center), while a radius equal
jbe@529 133 to zero denotes a circle that includes a single point.</p>
jbe@529 134
jbe@529 135 <p>An <code>ecircle</code> may also be created by calling <code>ecircle(epoint(...), radius)</code> or
jbe@529 136 from three floating point numbers by calling <code>ecircle(latitude, longitude,
jbe@529 137 radius)</code>.</p>
jbe@529 138
jbe@529 139 <h4><code>ecluster</code></h4>
jbe@529 140
jbe@529 141 <p>A collection of points, paths, polygons, and outlines on the WGS-84 spheroid.
jbe@529 142 Each path, polygon, or outline must cover a longitude range of less than
jbe@529 143 180 degrees to avoid ambiguities.</p>
jbe@529 144
jbe@529 145 <p>The text input format is a white-space separated list of the following items:</p>
jbe@529 146
jbe@529 147 <ul>
jbe@529 148 <li><code>point ({N|S}&lt;float&gt; {E|W}&lt;float&gt;)</code></li>
jbe@529 149 <li><code>path ({N|S}&lt;float&gt; {E|W}&lt;float&gt; {N|S}&lt;float&gt; {E|W}&lt;float&gt; ...)</code></li>
jbe@529 150 <li><code>outline ({N|S}&lt;float&gt; {E|W}&lt;float&gt; {N|S}&lt;float&gt; {E|W}&lt;float&gt; {N|S}&lt;float&gt; {E|W}&lt;float&gt; ...)</code></li>
jbe@529 151 <li><code>polygon ({N|S}&lt;float&gt; {E|W}&lt;float&gt; {N|S}&lt;float&gt; {E|W}&lt;float&gt; {N|S}&lt;float&gt; {E|W}&lt;float&gt; ...)</code></li>
jbe@529 152 </ul>
jbe@529 153
jbe@529 154 <p>Paths are open by default (i.e. there is no connection from the last point in
jbe@529 155 the list to the first point in the list). Outlines and polygons, in contrast,
jbe@529 156 are automatically closed (i.e. there is a line segment from the last point in
jbe@529 157 the list to the first point in the list) which means the first point should not
jbe@529 158 be repeated as last point in the list. Polygons are filled, outlines are not.</p>
jbe@529 159
jbe@529 160 <h3>2. Indices</h3>
jbe@529 161
jbe@529 162 <p>Two kinds of indices are supported: B-tree and GiST indices.</p>
jbe@529 163
jbe@530 164 <h4>B-tree indices</h4>
jbe@529 165
jbe@529 166 <p>A B-tree index can be used for simple equality searches and is supported by the
jbe@529 167 <code>epoint</code>, <code>ebox</code>, and <code>ecircle</code> data types. B-tree indices can not be used for
jbe@529 168 geographic searches.</p>
jbe@529 169
jbe@530 170 <h4>GiST indices</h4>
jbe@529 171
jbe@529 172 <p>For geographic searches, GiST indices must be used. The <code>epoint</code>, <code>ecircle</code>,
jbe@529 173 and <code>ecluster</code> data types support GiST indexing. A GiST index for geographic
jbe@529 174 searches can be created as follows:</p>
jbe@529 175
jbe@529 176 <pre><code>CREATE TABLE tbl (
jbe@529 177 id serial4 PRIMARY KEY,
jbe@529 178 loc epoint NOT NULL );
jbe@529 179
jbe@529 180 CREATE INDEX name_of_index ON tbl USING gist (loc);
jbe@529 181 </code></pre>
jbe@529 182
jbe@530 183 <p>GiST indices also support nearest neighbor searches when using the distance
jbe@529 184 operator (<code>&lt;-&gt;</code>) in the ORDER BY clause.</p>
jbe@529 185
jbe@530 186 <h4>Indices on other data types (e.g. GeoJSON)</h4>
jbe@529 187
jbe@529 188 <p>Note that further types can be indexed by using an index on an expression with
jbe@529 189 a conversion function. One conversion function provided by pgLatLon is the
jbe@529 190 <code>GeoJSON_to_ecluster(float8, float8, text)</code> function:</p>
jbe@529 191
jbe@529 192 <pre><code>CREATE TABLE tbl (
jbe@529 193 id serial4 PRIMARY KEY,
jbe@529 194 loc jsonb NOT NULL );
jbe@529 195
jbe@529 196 CREATE INDEX name_of_index ON tbl USING gist((GeoJSON_to_ecluster("loc")));
jbe@529 197 </code></pre>
jbe@529 198
jbe@529 199 <p>When using the conversion function in an expression, the index will be used
jbe@529 200 automatically:</p>
jbe@529 201
jbe@529 202 <pre><code>SELECT * FROM tbl WHERE GeoJSON_to_ecluster("loc") &amp;&amp; 'N50 E10 10000'::ecircle;
jbe@529 203 </code></pre>
jbe@529 204
jbe@529 205 <h3>3. Operators</h3>
jbe@529 206
jbe@529 207 <h4>Equality operator <code>=</code></h4>
jbe@529 208
jbe@529 209 <p>Tests if two geographic objects are equal.</p>
jbe@529 210
jbe@529 211 <p>The longitude is ignored for the poles, and 180 degrees west is considered to
jbe@529 212 be equal to 180 degrees east.</p>
jbe@529 213
jbe@529 214 <p>For boxes and circles, two empty objects are considered equal. (Note that a
jbe@529 215 circle is not empty if the radius is zero but only if it is negative infinity,
jbe@529 216 i.e. smaller than zero.) Two circles with a positive infinite radius are also
jbe@529 217 considered equal.</p>
jbe@529 218
jbe@529 219 <p>Implemented for:</p>
jbe@529 220
jbe@529 221 <ul>
jbe@529 222 <li><code>epoint = epoint</code></li>
jbe@529 223 <li><code>ebox = ebox</code></li>
jbe@529 224 <li><code>ecircle = ecircle</code></li>
jbe@529 225 </ul>
jbe@529 226
jbe@529 227 <p>The negation is the inequality operator (<code>&lt;&gt;</code> or <code>!=</code>).</p>
jbe@529 228
jbe@529 229 <h4>Linear ordering operators <code>&lt;&lt;&lt;</code>, <code>&lt;&lt;&lt;=</code>, <code>&gt;&gt;&gt;=</code>, <code>&gt;&gt;&gt;</code></h4>
jbe@529 230
jbe@529 231 <p>These operators create an arbitrary (but well-defined) linear ordering of
jbe@529 232 geographic objects, which is used internally for B-tree indexing and merge
jbe@529 233 joins. These operators will usually not be used by an application programmer.</p>
jbe@529 234
jbe@529 235 <h4>Overlap operator <code>&amp;&amp;</code></h4>
jbe@529 236
jbe@529 237 <p>Tests if two geographic objects have at least one point in common. Currently
jbe@529 238 implemented for:</p>
jbe@529 239
jbe@529 240 <ul>
jbe@529 241 <li><code>epoint &amp;&amp; ebox</code></li>
jbe@529 242 <li><code>epoint &amp;&amp; ecircle</code></li>
jbe@529 243 <li><code>epoint &amp;&amp; ecluster</code></li>
jbe@529 244 <li><code>ebox &amp;&amp; ebox</code></li>
jbe@529 245 <li><code>ecircle &amp;&amp; ecircle</code></li>
jbe@529 246 <li><code>ecircle &amp;&amp; ecluster</code></li>
jbe@529 247 </ul>
jbe@529 248
jbe@529 249 <p>The <code>&amp;&amp;</code> operator is commutative, i.e. <code>a &amp;&amp; b</code> is the same as <code>b &amp;&amp; a</code>. Each
jbe@529 250 commutation is supported as well.</p>
jbe@529 251
jbe@529 252 <h4>Distance operator <code>&lt;-&gt;</code></h4>
jbe@529 253
jbe@529 254 <p>Calculates the shortest distance between two geographic objects in meters (zero
jbe@529 255 if the objects are overlapping). Currently implemented for:</p>
jbe@529 256
jbe@529 257 <ul>
jbe@529 258 <li><code>epoint &lt;-&gt; epoint</code></li>
jbe@529 259 <li><code>epoint &lt;-&gt; ecircle</code></li>
jbe@529 260 <li><code>epoint &lt;-&gt; ecluster</code></li>
jbe@529 261 <li><code>ecircle &lt;-&gt; ecircle</code></li>
jbe@529 262 <li><code>ecircle &lt;-&gt; ecluster</code></li>
jbe@529 263 </ul>
jbe@529 264
jbe@529 265 <p>The <code>&lt;-&gt;</code> operator is commutative, i.e. <code>a &lt;-&gt; b</code> is the same as <code>b &lt;-&gt; a</code>.
jbe@529 266 Each commutation is supported as well.</p>
jbe@529 267
jbe@529 268 <p>For short distances, the result is very accurate (i.e. respects the dimensions
jbe@529 269 of the WGS-84 spheroid). For longer distances in the order of magnitude of
jbe@529 270 earth's radius or greater, the value is only approximate (but the error is
jbe@529 271 still less than 0.2% as long as no polygons with very long edges are involved).</p>
jbe@529 272
jbe@529 273 <p>The functions <code>distance(epoint, epoint)</code> and <code>distance(ecluster, epoint)</code> can
jbe@529 274 be used as an alias for this operator.</p>
jbe@529 275
jbe@529 276 <p>Note: In case of radial searches with a fixed radius, this operator should
jbe@529 277 not be used. Instead, an <code>ecircle</code> should be created and used in combination
jbe@529 278 with the overlap operator (<code>&amp;&amp;</code>). Alternatively, the functions
jbe@529 279 <code>distance_within(epoint, epoint, float8)</code> or <code>distance_within(ecluster, epoint,
jbe@529 280 float8)</code> can be used for fixed-radius searches.</p>
jbe@529 281
jbe@529 282 <h3>4. Functions</h3>
jbe@529 283
jbe@529 284 <h4><code>center(circle)</code></h4>
jbe@529 285
jbe@529 286 <p>Returns the center of an <code>ecircle</code> as an <code>epoint</code>.</p>
jbe@529 287
jbe@529 288 <h4><code>distance(epoint, epoint)</code></h4>
jbe@529 289
jbe@529 290 <p>Calculates the distance between two <code>epoint</code> datums in meters. This function is
jbe@529 291 an alias for the distance operator <code>&lt;-&gt;</code>.</p>
jbe@529 292
jbe@529 293 <p>Note: In case of radial searches with a fixed radius, this function should not be
jbe@529 294 used. Use <code>distance_within(epoint, epoint, float8)</code> instead.</p>
jbe@529 295
jbe@529 296 <h4><code>distance(ecluster, epoint)</code></h4>
jbe@529 297
jbe@529 298 <p>Calculates the distance from an <code>ecluster</code> to an <code>epoint</code> in meters. This
jbe@529 299 function is an alias for the distance operator <code>&lt;-&gt;</code>.</p>
jbe@529 300
jbe@529 301 <p>Note: In case of radial searches with a fixed radius, this function should not be
jbe@529 302 used. Use <code>distance_within(epoint, epoint, float8)</code> instead.</p>
jbe@529 303
jbe@529 304 <h4><code>distance_within(</code>variable <code>epoint,</code> fixed <code>epoint,</code> radius <code>float8)</code></h4>
jbe@529 305
jbe@529 306 <p>Checks if the distance between two <code>epoint</code> datums is not greater than a given
jbe@529 307 value (search radius).</p>
jbe@529 308
jbe@529 309 <p>Note: In case of radial searches with a fixed radius, the first argument must
jbe@529 310 be used for the table column, while the second argument must be used for the
jbe@529 311 search center. Otherwise an existing index cannot be used.</p>
jbe@529 312
jbe@529 313 <h4><code>distance_within(</code>variable <code>ecluster,</code> fixed <code>epoint,</code> radius <code>float8)</code></h4>
jbe@529 314
jbe@529 315 <p>Checks if the distance from an <code>ecluster</code> to an <code>epoint</code> is not greater than a
jbe@529 316 given value (search radius).</p>
jbe@529 317
jbe@529 318 <h4><code>ebox(</code>latmin <code>float8,</code> latmax <code>float8,</code> lonmin <code>float8,</code> lonmax <code>float8)</code></h4>
jbe@529 319
jbe@529 320 <p>Creates a new <code>ebox</code> with the given boundaries.
jbe@529 321 See "1. Types", subsection <code>ebox</code> for details.</p>
jbe@529 322
jbe@529 323 <h4><code>ebox(epoint, epoint)</code></h4>
jbe@529 324
jbe@529 325 <p>Creates a new <code>ebox</code>. This function may only be used if the longitude
jbe@529 326 difference is less than or equal to 120 degrees.
jbe@529 327 See "1. Types", subsection <code>ebox</code> for details.</p>
jbe@529 328
jbe@529 329 <h4><code>ecircle(epoint, float8)</code></h4>
jbe@529 330
jbe@529 331 <p>Creates an <code>ecircle</code> with the given center point and radius.</p>
jbe@529 332
jbe@529 333 <h4><code>ecircle(</code>latitude <code>float8,</code> longitude <code>float8,</code> radius <code>float8)</code></h4>
jbe@529 334
jbe@529 335 <p>Creates an <code>ecircle</code> with the given center point and radius.</p>
jbe@529 336
jbe@529 337 <h4><code>ecluster_concat(ecluster, ecluster)</code></h4>
jbe@529 338
jbe@529 339 <p>Combines two clusters to form a new <code>ecluster</code> by uniting all entries of both
jbe@529 340 clusters. Note that two overlapping areas of polygons annihilate each other
jbe@529 341 (which may be used to create polygons with holes).</p>
jbe@529 342
jbe@529 343 <h4><code>ecluster_concat(ecluster[])</code></h4>
jbe@529 344
jbe@529 345 <p>Creates a new <code>ecluster</code> that unites all entries of all clusters in the passed
jbe@529 346 array. Note that two overlapping areas of polygons annihilate each other (which
jbe@529 347 may be used to create polygons with holes).</p>
jbe@529 348
jbe@529 349 <h4><code>ecluster_create_multipoint(epoint[])</code></h4>
jbe@529 350
jbe@529 351 <p>Creates a new <code>ecluster</code> which contains multiple points.</p>
jbe@529 352
jbe@529 353 <h4><code>ecluster_create_outline(epoint[])</code></h4>
jbe@529 354
jbe@529 355 <p>Creates a new <code>ecluster</code> that is an outline given by the passed points.</p>
jbe@529 356
jbe@529 357 <h4><code>ecluster_create_path(epoint[])</code></h4>
jbe@529 358
jbe@529 359 <p>Creates a new <code>ecluster</code> that is a path given by the passed points.</p>
jbe@529 360
jbe@529 361 <h4><code>ecluster_create_polygon(epoint[])</code></h4>
jbe@529 362
jbe@529 363 <p>Creates a new <code>ecluster</code> that is a polygon given by the passed points.</p>
jbe@529 364
jbe@529 365 <h4><code>ecluster_extract_outlines(ecluster)</code></h4>
jbe@529 366
jbe@529 367 <p>Set-returning function that returns the outlines of an <code>ecluster</code> as <code>epoint[]</code>
jbe@529 368 rows.</p>
jbe@529 369
jbe@529 370 <h4><code>ecluster_extract_paths(ecluster)</code></h4>
jbe@529 371
jbe@529 372 <p>Set-returning function that returns the paths of an <code>ecluster</code> as <code>epoint[]</code>
jbe@529 373 rows.</p>
jbe@529 374
jbe@529 375 <h4><code>ecluster_extract_points(ecluster)</code></h4>
jbe@529 376
jbe@529 377 <p>Set-returning function that returns the points of an <code>ecluster</code> as <code>epoint</code>
jbe@529 378 rows.</p>
jbe@529 379
jbe@529 380 <h4><code>ecluster_extract_polygons(ecluster)</code></h4>
jbe@529 381
jbe@529 382 <p>Set-returning function that returns the polygons of an <code>ecluster</code> as <code>epoint[]</code>
jbe@529 383 rows.</p>
jbe@529 384
jbe@529 385 <h4><code>empty_ebox</code>()</h4>
jbe@529 386
jbe@529 387 <p>Returns the empty <code>ebox</code>.
jbe@529 388 See "1. Types", subsection <code>ebox</code> for details.</p>
jbe@529 389
jbe@529 390 <h4><code>epoint(</code>latitude <code>float8,</code> longitude <code>float8)</code></h4>
jbe@529 391
jbe@529 392 <p>Returns an <code>epoint</code> with the given latitude and longitude.</p>
jbe@529 393
jbe@529 394 <h4><code>epoint_latlon(</code>latitude <code>float8,</code> longitude <code>float8)</code></h4>
jbe@529 395
jbe@529 396 <p>Alias for <code>epoint(float8, float8)</code>.</p>
jbe@529 397
jbe@529 398 <h4><code>epoint_lonlat(</code>longitude <code>float8,</code> latitude <code>float8)</code></h4>
jbe@529 399
jbe@529 400 <p>Same as <code>epoint(float8, float8)</code> but with arguments reversed.</p>
jbe@529 401
jbe@529 402 <h4><code>GeoJSON_to_epoint(jsonb, text)</code></h4>
jbe@529 403
jbe@529 404 <p>Maps a GeoJSON object of type "Point" or "Feature" (which contains a
jbe@529 405 "Point") to an <code>epoint</code> datum. For any other JSON objects, NULL is returned.</p>
jbe@529 406
jbe@529 407 <p>The second parameter (which defaults to <code>epoint_lonlat</code>) may be set to a name
jbe@529 408 of a conversion function that transforms two coordinates (two <code>float8</code>
jbe@529 409 parameters) to an <code>epoint</code>.</p>
jbe@529 410
jbe@529 411 <h4><code>GeoJSON_to_ecluster(jsonb, text)</code></h4>
jbe@529 412
jbe@529 413 <p>Maps a (valid) GeoJSON object to an <code>ecluster</code>. Note that this function
jbe@529 414 does not check whether the JSONB object is a valid GeoJSON object.</p>
jbe@529 415
jbe@529 416 <p>The second parameter (which defaults to <code>epoint_lonlat</code>) may be set to a name
jbe@529 417 of a conversion function that transforms two coordinates (two <code>float8</code>
jbe@529 418 parameters) to an <code>epoint</code>.</p>
jbe@529 419
jbe@529 420 <h4><code>max_latitude(ebox)</code></h4>
jbe@529 421
jbe@529 422 <p>Returns the northern boundary of a given <code>ebox</code> in degrees between -90 and +90.</p>
jbe@529 423
jbe@529 424 <h4><code>max_longitude(ebox)</code></h4>
jbe@529 425
jbe@529 426 <p>Returns the eastern boundary of a given <code>ebox</code> in degrees between -180 and +180
jbe@529 427 (both inclusive).</p>
jbe@529 428
jbe@529 429 <h4><code>min_latitude(ebox)</code></h4>
jbe@529 430
jbe@529 431 <p>Returns the southern boundary of a given <code>ebox</code> in degrees between -90 and +90.</p>
jbe@529 432
jbe@529 433 <h4><code>min_longitude(ebox)</code></h4>
jbe@529 434
jbe@529 435 <p>Returns the western boundary of a given <code>ebox</code> in degrees between -180 and +180
jbe@529 436 (both inclusive).</p>
jbe@529 437
jbe@529 438 <h4><code>latitude(epoint)</code></h4>
jbe@529 439
jbe@529 440 <p>Returns the latitude value of an <code>epoint</code> in degrees between -90 and +90.</p>
jbe@529 441
jbe@529 442 <h4><code>longitude(epoint)</code></h4>
jbe@529 443
jbe@529 444 <p>Returns the longitude value of an <code>epoint</code> in degrees between -180 and +180
jbe@529 445 (both inclusive).</p>
jbe@529 446
jbe@529 447 <h4><code>radius(ecircle)</code></h4>
jbe@529 448
jbe@529 449 <p>Returns the radius of an <code>ecircle</code> in meters.</p>
jbe@529 450 </body></html>

Impressum / About Us