Commit 9fe22540 authored by Darafei Praliaskouski's avatar Darafei Praliaskouski

Remove GEOS < 3.6 mentions from code and docs.

Closes #4267
Closes https://github.com/postgis/postgis/pull/352


git-svn-id: http://svn.osgeo.org/postgis/trunk@17107 b70326c6-7e19-0410-871a-916f4a2858ee
parent bca3d6cc
Pipeline #40365927 failed with stage
in 5 minutes and 7 seconds
......@@ -6,19 +6,19 @@ language: c
env:
- tag=latest mode=tests
- tag=pg11-geos37-gdal23-proj52 mode=debug
- tag=pg11-geos37-gdal23-proj52 mode=coverage
- tag=pg11-geos37-gdal23-proj52 mode=usan_gcc
- tag=pg11-geos37-gdal23-proj52 mode=usan_clang
- tag=pg11-geos37-gdal23-proj52 mode=tests
- tag=pg11-geos37-gdal24-proj52 mode=debug
- tag=pg11-geos37-gdal24-proj52 mode=coverage
- tag=pg11-geos37-gdal24-proj52 mode=usan_gcc
- tag=pg11-geos37-gdal24-proj52 mode=usan_clang
- tag=pg11-geos37-gdal24-proj52 mode=tests
- tag=pg10-geos36-gdal23-proj49 mode=tests
- tag=pg96-geos36-gdal22-proj49 mode=tests
- tag=pg95-geos35-gdal111-proj48 mode=tests
- tag=pg95-geos36-gdal21-proj48 mode=tests
matrix:
allow_failures:
- env: tag=latest mode=tests
- env: tag=pg11-geos37-gdal23-proj52 mode=coverage
- env: tag=pg11-geos37-gdal24-proj52 mode=coverage
script:
- echo "/tmp/logbt-coredumps/core.%p.%E" | sudo tee /proc/sys/kernel/core_pattern
......
PostGIS 3.0.0
2019/xx/xx
* Breaking Changes *
- #4267, Bump minimum GEOS version to 3.6 (Regina Obe)
- #4267, Bump minimum GEOS version to 3.6 (Regina Obe, Darafei Praliaskouski)
- #3888, Raster support now available as a separate extension
(Sandro Santilli)
- #3807, Extension library files no longer include the minor version.
......
......@@ -43,8 +43,7 @@ this to work.
http://trac.osgeo.org/proj/
* GEOS (Required, Version 3.5 or higher)
- 3.6+ is strongly recommended to expose most GEOS features
* GEOS (Required, Version 3.6 or higher)
- 3.7+ is needed just for the ST_FrechetDistance function
The GEOS library provides support for exact topological tests such as
......
......@@ -1861,12 +1861,11 @@ SELECT topology.ST_RemoveIsoNode('ma_topo', 7 ) As result;
<para>If use tolerance > 0 and there is more than one edge near the point then an exception is thrown.</para>
<!-- optionally mention that this function uses indexes if appropriate -->
<note>
<para>If tolerance = 0, the function use ST_Intersects otherwise uses ST_DWithin.</para>
</note>
<!-- use this format if new function -->
<para>Availability: 2.0.0 - requires GEOS &gt;= 3.3.0. </para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.0.0</para>
</refsection>
......@@ -1919,13 +1918,11 @@ ERROR: Two or more edges found</programlisting>
<para>The function returns an integer (id-face) given a topology, a POINT and a tolerance. If tolerance = 0 then the point has to intersect the face.</para>
<para>If the point doesn't intersect a face, returns 0 (zero).</para>
<para>If use tolerance > 0 and there is more than one face near the point then an exception is thrown.</para>
<!-- optionally mention that this function uses indexes if appropriate -->
<note>
<para>If tolerance = 0, the function uses ST_Intersects otherwise uses ST_DWithin.</para>
</note>
<!-- use this format if new function -->
<para>Availability: 2.0.0 - requires GEOS &gt;= 3.3.0. </para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.0.0</para>
</refsection>
<refsection>
<title>Examples</title>
......@@ -1978,14 +1975,11 @@ ERROR: Two or more faces found</programlisting>
<para>The function return an integer (id-node) given a topology, a POINT and a tolerance. If tolerance = 0 mean exactly intersection otherwise retrieve the node from an interval.</para>
<para>If there isn't a node at the point, it return 0 (zero).</para>
<para>If use tolerance > 0 and near the point there are more than one node it throw an exception.</para>
<!-- optionally mention that this function uses indexes if appropriate -->
<note>
<para>If tolerance = 0, the function use ST_Intersects otherwise will use ST_DWithin.</para>
</note>
<!-- use this format if new function -->
<para>Availability: 2.0.0 - requires GEOS &gt;= 3.3.0. </para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.0.0</para>
</refsection>
......@@ -2526,13 +2520,10 @@ nodeid
The newly added edge has "universe" face on both sides and links to itself.</para>
<note><para>If the <varname>aline</varname> geometry crosses, overlaps, contains or is contained by an existing linestring edge, then an error is thrown and the edge is not added.</para></note>
<note><para>The geometry of <varname>aline</varname> must have the same <varname>srid</varname> as defined for the topology otherwise an invalid spatial reference sys error will be thrown.</para></note>
<!-- use this format if new function -->
<para>Availability: 2.0.0 requires GEOS &gt;= 3.3.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.0.0</para>
</refsection>
<refsection>
<title>Examples</title>
<programlisting>SELECT topology.AddEdge('ma_topo', ST_GeomFromText('LINESTRING(227575.8 893917.2,227591.9 893900.4)', 26986) ) As edgeid;
......
......@@ -146,7 +146,7 @@ psql -d yourdatabase -f sfcgal_comments.sql
<listitem>
<para>
Proj4 reprojection library, version 4.9.0 or greater. Proj4 4.9 or above is needed to take advantage of improved geodetic.
Proj4 reprojection library, version 4.6.0 or greater. Proj4 4.9 or above is needed to take advantage of improved geodetic.
The Proj4 library is used to provide coordinate reprojection support within
PostGIS. Proj4 is available for download from
<ulink url="http://trac.osgeo.org/proj/">
......@@ -158,11 +158,10 @@ psql -d yourdatabase -f sfcgal_comments.sql
<listitem>
<para>
GEOS geometry library, version 3.6 or greater, but GEOS 3.7+ is recommended to take full advantage of all the new functions and features. You should have at least GEOS 3.5,
without which you will be missing some major enhancements such as <xref linkend="ST_ClipByBox2D" /> and <xref linkend="ST_Subdivide" />. GEOS is available for download from
GEOS geometry library, version 3.6 or greater, but GEOS 3.7+ is recommended to take full advantage of all the new functions and features. GEOS is available for download from
<ulink url="http://trac.osgeo.org/geos/">
http://trac.osgeo.org/geos/
</ulink> and 3.5+ is backward-compatible with older versions so fairly safe to upgrade.
</ulink>.
</para>
</listitem>
<listitem>
......
......@@ -1458,11 +1458,9 @@ FROM (SELECT 'LINESTRING(0 0, 0 1, 1 0, 1 1, 0 0)'::geometry AS the_geom) AS foo
<para>SQL-MM defines the result of ST_IsValid(NULL) to be 0, while
PostGIS returns NULL.</para>
</note>
<para>Performed by the GEOS module.</para>
<para>
The version accepting flags is available starting with 2.0.0
and requires GEOS &gt;= 3.3.0. Such version does not print a NOTICE
explaining the invalidity.
The version accepting flags is available starting with 2.0.0. Such version does not print a NOTICE explaining the invalidity.
Allowed <varname>flags</varname> are documented in <xref linkend="ST_IsValidDetail" />.
</para>
......@@ -1535,13 +1533,10 @@ NOTICE: Self-intersection at or near point 0 0
<para>
Allowed <varname>flags</varname> are documented in <xref linkend="ST_IsValidDetail" />.
</para>
<para>Availability: 1.4 - requires GEOS &gt;= 3.1.0.</para>
<para>Availability: 2.0 - requires GEOS &gt;= 3.3.0 for the version taking flags.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 1.4</para>
<para>Availability: 2.0 version taking flags.</para>
</refsection>
<refsection>
<title>Examples</title>
......@@ -1630,12 +1625,10 @@ The 'flags' argument is a bitfield. It can have the following values:
</listitem>
</itemizedlist>
</para>
<para>Availability: 2.0.0 - requires GEOS &gt;= 3.3.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.0.0</para>
</refsection>
<refsection>
<title>Examples</title>
......
......@@ -34,8 +34,8 @@
</note>
<para>&sfs_compliant; s3.2.6.2</para>
<para>Availability: 1.1.0 - requires GEOS &gt;= 2.1.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 1.1.0</para>
</refsection>
<refsection>
......@@ -86,13 +86,12 @@
</note>
<para>&sfs_compliant; s3.2.6.2</para>
<para>Availability: 1.1.0 - requires GEOS &gt;= 2.1.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 1.1.0</para>
</refsection>
<refsection>
<title>Examples</title>
<programlisting>Forthcoming</programlisting>
</refsection>
......@@ -838,7 +837,7 @@ LINESTRING(1 2,4 5,7 8)
OGC KML standards, cf: <ulink url="http://www.opengeospatial.org/standards/kml">http://www.opengeospatial.org/standards/kml</ulink>:
</para>
<para>Availability: 1.5,libxml2 2.6+</para>
<para>Availability: 1.5, requires libxml2 2.6+</para>
<para>&Z_support;</para>
<note>
<para>ST_GeomFromKML function not support SQL/MM curves geometries.</para>
......
......@@ -802,9 +802,8 @@ GEOMETRYCOLLECTION(
the constituent line work of a MULTILINESTRING. </para>
<note><para>Only use with MULTILINESTRING/LINESTRINGs. If you feed a polygon or geometry collection into this function, it
will return an empty GEOMETRYCOLLECTION</para></note>
<para>Performed by the GEOS module.</para>
<para>Availability: 1.1.0</para>
<note><para>requires GEOS &gt;= 2.1.0</para></note>
<warning><para>Will strip the M dimension.</para></warning>
</refsection>
......@@ -2073,8 +2072,8 @@ SELECT ST_AsEWKT(ST_SnapToGrid(ST_GeomFromEWKT('LINESTRING(-1.1115678 2.123 3 2.
<xref linkend="ST_IsValid" />).
</para>
</note>
<para>Availability: 2.0.0 requires GEOS &gt;= 3.3.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.0.0</para>
</refsection>
<refsection>
......
......@@ -1200,7 +1200,7 @@ SELECT ST_AsText(
Input geometries that do not meet the criteria to join any other cluster will be assigned a cluster number of NULL.
</para></note>
<para>Availability: 2.3.0 - requires GEOS </para>
<para>Availability: 2.3.0</para>
</refsection>
<refsection>
......@@ -1302,7 +1302,7 @@ GROUP BY cid;
<para>ST_ClusterIntersecting is an aggregate function that returns an array of GeometryCollections, where each GeometryCollection represents an interconnected set of geometries.</para>
<para>Availability: 2.2.0 - requires GEOS </para>
<para>Availability: 2.2.0</para>
</refsection>
<refsection>
......@@ -1366,7 +1366,7 @@ GEOMETRYCOLLECTION(LINESTRING(6 6,7 7))
cluster number for each input geometry. The distance used for clustering is the
distance between the centroids of the geometries.
</para>
<para>Availability: 2.3.0 - requires GEOS </para>
<para>Availability: 2.3.0</para>
</refsection>
<refsection>
......@@ -1471,7 +1471,7 @@ FROM parcels;
<para>ST_ClusterWithin is an aggregate function that returns an array of GeometryCollections, where each GeometryCollection represents a set of geometries separated by no more than the specified distance. (Distances are Cartesian distances in the units of the SRID.)</para>
<para>Availability: 2.2.0 - requires GEOS</para>
<para>Availability: 2.2.0</para>
</refsection>
<refsection>
......@@ -1722,16 +1722,12 @@ ST_Point | t | t | f | f
<para>From JTS docs slightly reworded: The advantage to using this predicate over <xref linkend="ST_Contains" /> and <xref linkend="ST_Intersects" /> is that it can be computed
efficiently, with no need to compute topology at individual points.</para>
<para>
An example use case for this predicate is computing the intersections
of a set of geometries with a large polygonal geometry.
Since intersection is a fairly slow operation, it can be more efficient
to use containsProperly to filter out test geometries which lie
wholly inside the area. In these cases the intersection is
known a priori to be exactly the original test geometry.
An example use case for this predicate is computing the intersections of a set of geometries with a large polygonal geometry. Since intersection is a fairly slow operation, it can be more efficient to use containsProperly to filter out test geometries which lie
wholly inside the area. In these cases the intersection is known a priori to be exactly the original test geometry.
</para>
</note>
<para>Availability: 1.4.0 - requires GEOS &gt;= 3.1.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 1.4.0</para>
<important>
<para>Do not call with a <varname>GEOMETRYCOLLECTION</varname> as an argument</para>
......@@ -1824,8 +1820,6 @@ ST_Point | t | t | f | f
<para>Returns 1 (TRUE) if no point in Geometry/Geography B is outside
Geometry/Geography A</para>
<para>Performed by the GEOS module</para>
<important>
<para>Do not call with a <varname>GEOMETRYCOLLECTION</varname> as an argument</para>
</important>
......@@ -1839,10 +1833,11 @@ ST_Point | t | t | f | f
the geometries. To avoid index use, use the function
_ST_Covers.</para>
<para>Enhanced: 2.4.0 Support for polygon in polygon and line in polygon added for geography type</para>
<para>Performed by the GEOS module</para>
<para>Enhanced: 2.4.0 Support for polygon in polygon and line in polygon added for geography type</para>
<para>Enhanced: 2.3.0 Enhancement to PIP short-circuit for geometry extended to support MultiPoints with few points. Prior versions only supported point in polygon.</para>
<para>Availability: 1.5 - support for geography was introduced. </para>
<para>Availability: 1.2.2 - requires GEOS &gt;= 3.0</para>
<para>Availability: 1.2.2</para>
<para>NOTE: this is the "allowable" version that returns a
boolean, not an integer.</para>
......@@ -1926,8 +1921,6 @@ SELECT ST_Covers(geog_poly, geog_pt) As poly_covers_pt,
<para>Returns 1 (TRUE) if no point in Geometry/Geography A is outside
Geometry/Geography B</para>
<para>Performed by the GEOS module</para>
<important>
<para>Do not call with a <varname>GEOMETRYCOLLECTION</varname> as an argument</para>
</important>
......@@ -1935,7 +1928,8 @@ SELECT ST_Covers(geog_poly, geog_pt) As poly_covers_pt,
<important>
<para>Do not use this function with invalid geometries. You will get unexpected results.</para>
</important>
<para>Availability: 1.2.2 - requires GEOS &gt;= 3.0</para>
<para>Performed by the GEOS module</para>
<para>Availability: 1.2.2</para>
<para>This function call will automatically include a bounding box
comparison that will make use of any indexes that are available on
the geometries. To avoid index use, use the function
......@@ -2586,7 +2580,7 @@ FROM (SELECT
ST_MinimumClearance will return Infinity.
</para>
<para>Availability: 2.3.0 - requires GEOS &gt;= 3.6.0</para>
<para>Availability: 2.3.0</para>
</refsection>
......@@ -2635,7 +2629,7 @@ SELECT ST_MinimumClearance('POLYGON ((0 0, 1 0, 1 1, 0.5 3.2e-4, 0 0))');
Returns the two-point LineString spanning a geometry's minimum clearance. If the geometry does not have a minimum
clearance, <varname>LINESTRING EMPTY</varname> will be returned.
</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.3.0 - requires GEOS &gt;= 3.6.0</para>
</refsection>
......@@ -2716,7 +2710,7 @@ The current implementation supports only vertices as the discrete locations. Thi
One important part of this subset is Linestrings that are roughly parallel to each other, and roughly equal in length. This is a useful metric for line matching.
</para>
</note>
<para>Availability: 1.5.0 - requires GEOS &gt;= 3.2.0</para>
<para>Availability: 1.5.0</para>
</refsection>
......@@ -2795,6 +2789,7 @@ The current implementation supports only vertices as the discrete locations. Thi
The smaller densifyFrac we specify, the more acurate Fréchet distance we get. But, the computation time and the memory usage increase with the square of the number of subsegments.
</para>
</note>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.4.0 - requires GEOS &gt;= 3.7.0</para>
</refsection>
......@@ -4538,13 +4533,10 @@ SELECT ST_AsEWKT(ST_PointOnSurface(ST_GeomFromEWKT('LINESTRING(0 5 1, 0 0 1, 0 1
<note><para>Do not call with a GeometryCollection as an argument</para></note>
<para>not in OGC spec, but implied. see s2.1.13.2</para>
<para>Performed by the GEOS module</para>
<para>&sfs_compliant; s2.1.1.2 // s2.1.13.3</para>
<para>&sqlmm_compliant; SQL-MM 3: 5.1.25</para>
<para>Enhanced: 2.0.0 - added support for specifying boundary node rule (requires GEOS &gt;= 3.0).</para>
<para>Performed by the GEOS module</para>
<para>Enhanced: 2.0.0 - added support for specifying boundary node rule.</para>
</refsection>
......@@ -4611,8 +4603,8 @@ t
<para> Takes intersectionMatrix and intersectionMatrixPattern and Returns true if the intersectionMatrix satisfies
the intersectionMatrixPattern. For more information refer to <xref linkend="DE-9IM" />. </para>
<para>Availability: 2.0.0 - requires GEOS &gt;= 3.3.0. </para>
<para>Performed by the GEOS module</para>
<para>Availability: 2.0.0</para>
</refsection>
......
......@@ -72,7 +72,7 @@ from the input geometry.
For geography this may not behave as expected if object is sufficiently large that it falls between two UTM zones or crosses the dateline</para></warning>
<para>Enhanced: 2.5.0 - ST_Buffer geometry support was enhanced to allow for side buffering specification <code>side=both|left|right</code>.</para>
<para>Availability: 1.5 - ST_Buffer was enhanced to support different endcaps and join types. These are useful for example to convert road linestrings
into polygon roads with flat or square edges instead of rounded edges. Thin wrapper for geography was added. - requires GEOS &gt;= 3.2 to take advantage of advanced geometry functionality.
into polygon roads with flat or square edges instead of rounded edges. Thin wrapper for geography was added.
</para>
<para>
The optional third parameter (currently only applies to geometry) can either specify number of segments used to approximate a quarter circle (integer case, defaults to 8) or a list of blank-separated key=value pairs (string case) to tweak operations as follows:
......@@ -81,10 +81,10 @@ The optional third parameter (currently only applies to geometry) can either spe
<para>'quad_segs=#' : number of segments used to approximate a quarter circle (defaults to 8).</para>
</listitem>
<listitem>
<para>'endcap=round|flat|square' : endcap style (defaults to "round", needs GEOS-3.2 or higher for a different value). 'butt' is also accepted as a synonym for 'flat'.</para>
<para>'endcap=round|flat|square' : endcap style (defaults to "round"). 'butt' is also accepted as a synonym for 'flat'.</para>
</listitem>
<listitem>
<para>'join=round|mitre|bevel' : join style (defaults to "round", needs GEOS-3.2 or higher for a different value). 'miter' is also accepted as a synonym for 'mitre'.</para>
<para>'join=round|mitre|bevel' : join style (defaults to "round"). 'miter' is also accepted as a synonym for 'mitre'.</para>
</listitem>
<listitem>
<para>'mitre_limit=#.#' : mitre ratio limit (only affects mitered join style). 'miter_limit' is also accepted as a synonym for 'mitre_limit'.</para>
......@@ -397,7 +397,7 @@ POLYGON((236057.59057465 900908.759918696,236028.301252769 900838.049240578,235
<para>Input linework must be correctly noded for this function to work properly</para>
</note>
<para>Availability: 1.1.0 - requires GEOS &gt;= 2.1.0.</para>
<para>Availability: 1.1.0</para>
</refsection>
<refsection>
......@@ -496,9 +496,8 @@ FROM (SELECT ST_Buffer(
</para>
<para>Performed by the GEOS module.</para>
<note><para>Requires GEOS 3.5.0+</para></note>
<para>Availability: 2.2.0 - requires GEOS &gt;= 3.5.0.</para>
<para>Availability: 2.2.0</para>
</refsection>
......@@ -1099,8 +1098,8 @@ Output is a COLLECTION of polygons (for flags=0) or a MULTILINESTRING
(for flags=1) or TIN (for flags=2). The tolerance, if any, is used to snap input vertices
togheter.
</para>
<para>Availability: 2.1.0 - requires GEOS &gt;= 3.4.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.1.0</para>
<para>&Z_support;</para>
<para>&T_support;</para>
......@@ -2062,10 +2061,11 @@ FROM (SELECT ST_Translate(ST_Force3D(ST_Boundary(ST_Buffer(ST_Point(1,3), 2,2)))
<para>
Single polygons may become multi-geometries in case of self-intersections.
</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.0.0, requires GEOS-3.3.0</para>
<para>Enhanced: 2.0.1, speed improvements requires GEOS-3.3.4</para>
<para>Enhanced: 2.1.0 added support for GEOMETRYCOLLECTION and MULTIPOINT.</para>
<para>Availability: 2.0.0</para>
<para>Enhanced: 2.0.1, speed improvements</para>
<para>Enhanced: 2.1.0, added support for GEOMETRYCOLLECTION and MULTIPOINT.</para>
<para>&Z_support;</para>
......@@ -2156,8 +2156,8 @@ FROM (SELECT ST_Translate(ST_Force3D(ST_Boundary(ST_Buffer(ST_Point(1,3), 2,2)))
ST_MinimumBoundingCircle(ST_Collect(somepointfield)).</para>
<para>The ratio of the area of a polygon divided by the area of its Minimum Bounding Circle is often referred to as the Roeck test.</para>
<para>Availability: 1.4.0 - requires GEOS</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 1.4.0</para>
</refsection>
<refsection>
......@@ -2347,8 +2347,9 @@ POLYGON((19.9999999999997 79.9999999999999,33.0769230769229 60.3846153846152,138
<note>
<para>Input linework must be correctly noded for this function to work properly</para>
</note>
<para>Performed by the GEOS module.</para>
<para>Availability: 1.0.0RC1 - requires GEOS &gt;= 2.1.0.</para>
<para>Availability: 1.0.0RC1</para>
</refsection>
<refsection>
......@@ -2418,17 +2419,13 @@ while preserving all of the input ones.
</para>
<para>&Z_support;</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.0.0</para>
<para>Availability: 2.0.0 - requires GEOS &gt;= 3.3.0.</para>
<note><para>
Due to a bug in GEOS up to 3.3.1 this function fails to node self-intersecting
lines. This is fixed with GEOS 3.3.2 or higher.
</para></note>
<note><para>
<para>
Changed: 2.4.0 this function uses GEOSNode internally instead of GEOSUnaryUnion.
This may cause the resulting linestrings to have a different order and direction compared to Postgis &lt; 2.4.
</para></note>
</para>
</refsection>
<refsection>
<title>Examples</title>
......@@ -2489,14 +2486,9 @@ and retain the same direction. For a negative distance it'll be at the right
side and in the opposite direction.
</para>
<para>
Availability: 2.0 - requires GEOS &gt;= 3.2, improved with GEOS &gt;= 3.3
</para>
<para>
Enhanced: 2.5 - added support for GEOMETRYCOLLECTION and MULTILINESTRING
</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.0</para>
<para>Enhanced: 2.5 - added support for GEOMETRYCOLLECTION and MULTILINESTRING</para>
<para>
The optional third parameter allows specifying a list of blank-separated
......@@ -2756,8 +2748,8 @@ MULTILINESTRING((164 1,11.7867965644036 1,1 11.7867965644036,1 195),
Those going in the same direction are in the first element of the collection, those going in the opposite direction are in the second element.
The paths themselves are given in the direction of the first geometry.
</para>
<para>Availability: 2.0.0 requires GEOS &gt;= 3.3.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.0.0</para>
</refsection>
<refsection>
<title>Examples: Finding shared paths</title>
......@@ -3056,7 +3048,6 @@ select ST_WrapX(the_geom, -30, 360);
this function.</para>
<para>Performed by the GEOS module.</para>
<note><para>Requires GEOS 3.0.0+</para></note>
<para>Availability: 1.3.3</para>
</refsection>
......@@ -3603,8 +3594,8 @@ MULTILINESTRING((1 3 2.75,1 4 2),(1 1 3,1 2 2.25))
Uses the same envelope clipping as <code>ST_ClipByBox2D</code>.
<code>max_vertices</code> must be 5 or more, as 5 points are needed to represent a closed box.
</para>
<para>Availability: 2.2.0 requires GEOS &gt;= 3.5.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.2.0</para>
<para>Enhanced: 2.5.0 reuses existing points on polygon split, vertex count is lowered from 8 to 5.</para>
</refsection>
......@@ -3991,8 +3982,8 @@ MULTILINESTRING((3 4,4 5),(1 2,3 4))
</listitem>
</itemizedlist>
</para>
<para>Availability: 2.3.0 - requires GEOS &gt;= 3.5.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.3.0</para>
</refsection>
<!-- Examples -->
......@@ -4085,8 +4076,8 @@ MULTILINESTRING((135.555555555556 270,36.8181818181818 92.2727272727273),(36.818
</listitem>
</itemizedlist>
</para>
<para>Availability: 2.3.0 - requires GEOS &gt;= 3.5.0.</para>
<para>Performed by the GEOS module.</para>
<para>Availability: 2.3.0</para>
</refsection>
<!-- Examples -->
......
......@@ -16,7 +16,8 @@
#include "liblwgeom_internal.h"
static void test_lwgeom_delaunay_triangulation(void)
static void
test_lwgeom_delaunay_triangulation(void)
{
LWGEOM *in, *tmp, *out;
char *wkt, *exp_wkt;
......@@ -31,60 +32,57 @@ static void test_lwgeom_delaunay_triangulation(void)
out = lwgeom_normalize(tmp);
lwgeom_free(tmp);
wkt = lwgeom_to_ewkt(out);
wkt = lwgeom_to_ewkt(out);
lwgeom_free(out);
exp_wkt = "GEOMETRYCOLLECTION(POLYGON((5 5,20 0,10 0,5 5)))";
if ( strcmp(wkt, exp_wkt) )
{
fprintf(stderr, "\nExp: %s\nObt: %s\n", exp_wkt, wkt);
}
if (strcmp(wkt, exp_wkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", exp_wkt, wkt);
CU_ASSERT_STRING_EQUAL(wkt, exp_wkt);
lwfree(wkt);
}
static void test_lwgeom_voronoi_diagram(void)
static void
test_lwgeom_voronoi_diagram(void)
{
#if POSTGIS_GEOS_VERSION >= 35
LWGEOM* in = lwgeom_from_wkt("MULTIPOINT(4 4, 5 5, 6 6)", LW_PARSER_CHECK_NONE);
LWGEOM *in = lwgeom_from_wkt("MULTIPOINT(4 4, 5 5, 6 6)", LW_PARSER_CHECK_NONE);
LWGEOM* out_boundaries = lwgeom_voronoi_diagram(in, NULL, 0, 0);
LWGEOM* out_lines = lwgeom_voronoi_diagram(in, NULL, 0, 1);
LWGEOM *out_boundaries = lwgeom_voronoi_diagram(in, NULL, 0, 0);
LWGEOM *out_lines = lwgeom_voronoi_diagram(in, NULL, 0, 1);
/* For boundaries we get a generic LWCOLLECTION */
CU_ASSERT_EQUAL(COLLECTIONTYPE, lwgeom_get_type(out_boundaries));
/* For lines we get a MULTILINETYPE */
CU_ASSERT_EQUAL(MULTILINETYPE, lwgeom_get_type(out_lines));
CU_ASSERT_EQUAL(MULTILINETYPE, lwgeom_get_type(out_lines));
lwgeom_free(in);
lwgeom_free(out_boundaries);
lwgeom_free(out_lines);
#endif /* POSTGIS_GEOS_VERSION >= 35 */
}
static void test_lwgeom_voronoi_diagram_custom_envelope(void)
static void
test_lwgeom_voronoi_diagram_custom_envelope(void)
{
#if POSTGIS_GEOS_VERSION >= 35
LWGEOM* in = lwgeom_from_wkt("MULTIPOINT(4 4, 5 5, 6 6)", LW_PARSER_CHECK_NONE);
LWGEOM* for_extent = lwgeom_from_wkt("LINESTRING (-10 -10, 10 10)", LW_PARSER_CHECK_NONE);
const GBOX* clipping_extent = lwgeom_get_bbox(for_extent);
LWGEOM *in = lwgeom_from_wkt("MULTIPOINT(4 4, 5 5, 6 6)", LW_PARSER_CHECK_NONE);
LWGEOM *for_extent = lwgeom_from_wkt("LINESTRING (-10 -10, 10 10)", LW_PARSER_CHECK_NONE);
const GBOX *clipping_extent = lwgeom_get_bbox(for_extent);
LWGEOM* out = lwgeom_voronoi_diagram(in, clipping_extent, 0, 0);
const GBOX* output_extent = lwgeom_get_bbox(out);
LWGEOM *out = lwgeom_voronoi_diagram(in, clipping_extent, 0, 0);
const GBOX *output_extent = lwgeom_get_bbox(out);
CU_ASSERT_TRUE(gbox_same(clipping_extent, output_extent));
lwgeom_free(in);
lwgeom_free(for_extent);
lwgeom_free(out);
#endif /* POSTGIS_GEOS_VERSION >= 35 */
}
#if POSTGIS_GEOS_VERSION >= 35
static void assert_empty_diagram(char* wkt, double tolerance)
static void
assert_empty_diagram(char *wkt, double tolerance)
{
LWGEOM* in = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE);
LWGEOM* out = lwgeom_voronoi_diagram(in, NULL, tolerance, 0);
LWGEOM *in = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE);
LWGEOM *out = lwgeom_voronoi_diagram(in, NULL, tolerance, 0);
CU_ASSERT_TRUE(lwgeom_is_collection(out));
CU_ASSERT_EQUAL(COLLECTIONTYPE, lwgeom_get_type(out));
......@@ -92,25 +90,24 @@ static void assert_empty_diagram(char* wkt, double tolerance)
lwgeom_free(in);
lwgeom_free(out);
}
#endif /* POSTGIS_GEOS_VERSION >= 35 */
static void test_lwgeom_voronoi_diagram_expected_empty(void)
static void
test_lwgeom_voronoi_diagram_expected_empty(void)
{
#if POSTGIS_GEOS_VERSION >= 35
assert_empty_diagram("POLYGON EMPTY", 0);
assert_empty_diagram("POINT (1 2)", 0);
/* This one produces an empty diagram because our two unqiue points
* collapse onto one after considering the tolerance. */
assert_empty_diagram("MULTIPOINT (0 0, 0 0.00001)", 0.001);
#endif /* POSTGIS_GEOS_VERSION >= 35 */
}
/*
** Used by test harness to register the tests in this file.
*/
void triangulate_suite_setup(void);
void triangulate_suite_setup(void)
void
triangulate_suite_setup(void)
{
CU_pSuite suite = CU_add_suite("triangulate", NULL, NULL);
PG_ADD_TEST(suite, test_lwgeom_delaunay_triangulation);
......
......@@ -2256,8 +2256,6 @@ LWCOLLECTION *lwgeom_subdivide(const LWGEOM *geom, uint32_t maxvertices);
* @param geom1 the geometry to snap
* @param geom2 the geometry to snap to
* @param tolerance the distance under which vertices and segments are snapped
*
* Requires GEOS-3.3.0+
*/
LWGEOM* lwgeom_snap(const LWGEOM* geom1, const LWGEOM* geom2, double tolerance);
......@@ -2267,8 +2265,6 @@ LWGEOM* lwgeom_snap(const LWGEOM* geom1, const LWGEOM* geom2, double tolerance);
*
* @param geom1 a lineal geometry
* @param geom2 another lineal geometry
*
* Requires GEOS-3.3.0+
*/
LWGEOM* lwgeom_sharedpaths(const LWGEOM* geom1, const LWGEOM* geom2);
......
......@@ -3350,13 +3350,6 @@ Datum ST_MinimumClearance(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(ST_MinimumClearance);
Datum ST_MinimumClearance(PG_FUNCTION_ARGS)
{
#if POSTGIS_GEOS_VERSION < 36
lwpgerror("The GEOS version this PostGIS binary "
"was compiled against (%d) doesn't support "
"'ST_MinimumClearance' function (3.6.0+ required)",
POSTGIS_GEOS_VERSION);
PG_RETURN_NULL();
#else /* POSTGIS_GEOS_VERSION >= 36 */
GSERIALIZED* input;
GEOSGeometry* input_geos;
int error;
......@@ -3375,7 +3368,6 @@ Datum ST_MinimumClearance(PG_FUNCTION_ARGS)
PG_FREE_IF_COPY(input, 0);
PG_RETURN_FLOAT8(result);
#endif
}
/******************************************
......@@ -3389,13 +3381,6 @@ Datum ST_MinimumClearanceLine(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(ST_MinimumClearanceLine);
Datum ST_MinimumClearanceLine(PG_FUNCTION_ARGS)
{
#if POSTGIS_GEOS_VERSION < 36
lwpgerror("The GEOS version this PostGIS binary "
"was compiled against (%d) doesn't support "
"'ST_MinimumClearanceLine' function (3.6.0+ required)",
POSTGIS_GEOS_VERSION);
PG_RETURN_NULL();
#else /* POSTGIS_GEOS_VERSION >= 36 */
GSERIALIZED* input;
GSERIALIZED* result;
GEOSGeometry* input_geos;
......@@ -3421,7 +3406,6 @@ Datum ST_MinimumClearanceLine(PG_FUNCTION_ARGS)
PG_FREE_IF_COPY(input, 0);
PG_RETURN_POINTER(result);
#endif
}
/******************************************
......@@ -3433,13 +3417,6 @@ Datum ST_OrientedEnvelope(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(ST_OrientedEnvelope);
Datum ST_OrientedEnvelope(PG_FUNCTION_ARGS)
<