pgLatLon
diff README.html @ 16:e319679cefbd
Added more operators for clusters (including polygons); Bugfix regarding missing entries in ecluster_ops operator class (index was not used for nearest-neighbor searches)
author | jbe |
---|---|
date | Fri Sep 09 19:22:30 2016 +0200 (2016-09-09) |
parents | 4489b4d7d9c8 |
children | 8a8d6dc44337 |
line diff
1.1 --- a/README.html Sat Sep 03 16:00:22 2016 +0200 1.2 +++ b/README.html Fri Sep 09 19:22:30 2016 +0200 1.3 @@ -1,5 +1,5 @@ 1.4 -<html><head><title>pgLatLon v0.3 documentation</title></head><body> 1.5 -<h1>pgLatLon v0.3 documentation</h1> 1.6 +<html><head><title>pgLatLon v0.4 documentation</title></head><body> 1.7 +<h1>pgLatLon v0.4 documentation</h1> 1.8 1.9 <p>pgLatLon is a spatial database extension for the PostgreSQL object-relational 1.10 database management system providing geographic data types and spatial indexing 1.11 @@ -59,6 +59,39 @@ 1.12 test_database=# CREATE EXTENSION latlon; 1.13 </code></pre> 1.14 1.15 +<h3>Updating</h3> 1.16 + 1.17 +<p>Before updating your database cluster to a new version of pgLatLon, you may 1.18 +want to uninstall the old by calling "<code>make uninstall</code>" in the unpacked source 1.19 +code directory of your old pgLatLon version. You may also manually delete the 1.20 +<code>latlon-v????.so</code> files from your PostgreSQL library directory and the 1.21 +<code>latlon.control</code> and <code>latlon--*.sql</code> files from your PostgreSQL extension 1.22 +directory.</p> 1.23 + 1.24 +<p>The new version can be installed as described above. For altering an existing 1.25 +database to use the installed new version (mandatory if you removed the old 1.26 +version), execute the following SQL command in the respective databases:</p> 1.27 + 1.28 +<pre><code>ALTER EXTENSION latlon UPDATE; 1.29 +</code></pre> 1.30 + 1.31 +<p>If the update contains modifications to operator classes, it may be necessary 1.32 +to drop all indices on geographic data types first (you will get an error 1.33 +message in this case). These indices can be re-created after the update.</p> 1.34 + 1.35 +<p>Note that taking several update steps at once (e.g. updating from version 0.2 1.36 +directly to version 0.4) requires the intermediate versions to be installed 1.37 +(i.e. in this example version 0.3 would need to be installed). Whenever you 1.38 +install or uninstall an intermediate or old version, make sure to afterwards 1.39 +re-install the latest pgLatLon version to ensure that the <code>latlon.control</code> file 1.40 +is available and points to the latest version.</p> 1.41 + 1.42 +<p>If the update contains modifications to the internal data representation 1.43 +format, an update path might not be available. In this case, create a dump of 1.44 +your database, delete your database, and restore it from your dump.</p> 1.45 + 1.46 +<p>Be sure to always keep backups of all your data before attempting to update.</p> 1.47 + 1.48 <h2>Reference</h2> 1.49 1.50 <h3>1. Types</h3> 1.51 @@ -245,8 +278,11 @@ 1.52 <li><code>epoint && ecircle</code></li> 1.53 <li><code>epoint && ecluster</code></li> 1.54 <li><code>ebox && ebox</code></li> 1.55 +<li><code>ebox && ecircle</code></li> 1.56 +<li><code>ebox && ecluster</code></li> 1.57 <li><code>ecircle && ecircle</code></li> 1.58 <li><code>ecircle && ecluster</code></li> 1.59 +<li><code>ecluster && ecluster</code></li> 1.60 </ul> 1.61 1.62 <p>The <code>&&</code> operator is commutative, i.e. <code>a && b</code> is the same as <code>b && a</code>. Each 1.63 @@ -266,12 +302,28 @@ 1.64 <li><code>ecluster &&+ ecluster</code></li> 1.65 </ul> 1.66 1.67 -<p>The <code>&&+</code> operator is commutative, i.e. <code>a &&+ b</code> is the same as <code>b &&+ a</code>. Each 1.68 -commutation is supported as well.</p> 1.69 +<p>The <code>&&+</code> operator is commutative, i.e. <code>a &&+ b</code> is the same as <code>b &&+ a</code>. 1.70 +Each commutation is supported as well.</p> 1.71 1.72 <p>Where two data types support both the <code>&&</code> and the <code>&&+</code> operator, the <code>&&+</code> 1.73 operator computes faster.</p> 1.74 1.75 +<h4>Contains operator <code>@></code></h4> 1.76 + 1.77 +<p>Tests if the object right of the operator is contained in the object left of 1.78 +the operator. Currently implemented for:</p> 1.79 + 1.80 +<ul> 1.81 +<li><code>ebox @> epoint</code> (alias for <code>&&</code>)</li> 1.82 +<li><code>ebox @> ecluster</code></li> 1.83 +<li><code>ecluster @> epoint</code> (alias for <code>&&</code>)</li> 1.84 +<li><code>ecluster @> ebox</code></li> 1.85 +<li><code>ecluster @> ecluster</code></li> 1.86 +</ul> 1.87 + 1.88 +<p>The commutator of <code>@></code> ("contains") is <code><@</code> ("is contained in"), i.e. <code>a @> b</code> 1.89 +is the same as <code>b <@ a</code>.</p> 1.90 + 1.91 <h4>Distance operator <code><-></code></h4> 1.92 1.93 <p>Calculates the shortest distance between two geographic objects in meters (zero 1.94 @@ -279,10 +331,15 @@ 1.95 1.96 <ul> 1.97 <li><code>epoint <-> epoint</code></li> 1.98 +<li><code>epoint <-> ebox</code></li> 1.99 <li><code>epoint <-> ecircle</code></li> 1.100 <li><code>epoint <-> ecluster</code></li> 1.101 +<li><code>ebox <-> ebox</code></li> 1.102 +<li><code>ebox <-> ecircle</code></li> 1.103 +<li><code>ebox <-> ecluster</code></li> 1.104 <li><code>ecircle <-> ecircle</code></li> 1.105 <li><code>ecircle <-> ecluster</code></li> 1.106 +<li><code>ecluster <-> ecluster</code></li> 1.107 </ul> 1.108 1.109 <p>The <code><-></code> operator is commutative, i.e. <code>a <-> b</code> is the same as <code>b <-> a</code>.