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.
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
<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 >= 3.3.0. </para>
+ <para>Performed by the GEOS module.</para>
+ <para>Availability: 2.0.0</para>
</refsection>
<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 >= 3.3.0. </para>
+ <para>Performed by the GEOS module.</para>
+ <para>Availability: 2.0.0</para>
</refsection>
<refsection>
<title>Examples</title>
<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 >= 3.3.0. </para>
+ <para>Performed by the GEOS module.</para>
+ <para>Availability: 2.0.0</para>
</refsection>
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 >= 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;
<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/">
<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>
<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 >= 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>
<para>
Allowed <varname>flags</varname> are documented in <xref linkend="ST_IsValidDetail" />.
</para>
-
- <para>Availability: 1.4 - requires GEOS >= 3.1.0.</para>
- <para>Availability: 2.0 - requires GEOS >= 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>
</listitem>
</itemizedlist>
</para>
-
- <para>Availability: 2.0.0 - requires GEOS >= 3.3.0.</para>
-
+ <para>Performed by the GEOS module.</para>
+ <para>Availability: 2.0.0</para>
</refsection>
-
<refsection>
<title>Examples</title>
</note>
<para>&sfs_compliant; s3.2.6.2</para>
-
- <para>Availability: 1.1.0 - requires GEOS >= 2.1.0.</para>
+ <para>Performed by the GEOS module.</para>
+ <para>Availability: 1.1.0</para>
</refsection>
<refsection>
</note>
<para>&sfs_compliant; s3.2.6.2</para>
-
- <para>Availability: 1.1.0 - requires GEOS >= 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>
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>
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 >= 2.1.0</para></note>
<warning><para>Will strip the M dimension.</para></warning>
</refsection>
<xref linkend="ST_IsValid" />).
</para>
</note>
-
- <para>Availability: 2.0.0 requires GEOS >= 3.3.0.</para>
+ <para>Performed by the GEOS module.</para>
+ <para>Availability: 2.0.0</para>
</refsection>
<refsection>
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>
<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>
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>
<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>
<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 >= 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>
<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>
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 >= 3.0</para>
+ <para>Availability: 1.2.2</para>
<para>NOTE: this is the "allowable" version that returns a
boolean, not an integer.</para>
<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>
<important>
<para>Do not use this function with invalid geometries. You will get unexpected results.</para>
</important>
- <para>Availability: 1.2.2 - requires GEOS >= 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
ST_MinimumClearance will return Infinity.
</para>
- <para>Availability: 2.3.0 - requires GEOS >= 3.6.0</para>
+ <para>Availability: 2.3.0</para>
</refsection>
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 >= 3.6.0</para>
</refsection>
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 >= 3.2.0</para>
+ <para>Availability: 1.5.0</para>
</refsection>
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 >= 3.7.0</para>
</refsection>
<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 >= 3.0).</para>
-
+ <para>Performed by the GEOS module</para>
+ <para>Enhanced: 2.0.0 - added support for specifying boundary node rule.</para>
</refsection>
<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 >= 3.3.0. </para>
+ <para>Performed by the GEOS module</para>
+ <para>Availability: 2.0.0</para>
</refsection>
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 >= 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:
<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>
<para>Input linework must be correctly noded for this function to work properly</para>
</note>
- <para>Availability: 1.1.0 - requires GEOS >= 2.1.0.</para>
+ <para>Availability: 1.1.0</para>
</refsection>
<refsection>
</para>
<para>Performed by the GEOS module.</para>
- <note><para>Requires GEOS 3.5.0+</para></note>
- <para>Availability: 2.2.0 - requires GEOS >= 3.5.0.</para>
+ <para>Availability: 2.2.0</para>
</refsection>
(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 >= 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>
<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>
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>
<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 >= 2.1.0.</para>
+ <para>Availability: 1.0.0RC1</para>
</refsection>
<refsection>
</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 >= 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 < 2.4.
- </para></note>
+ </para>
</refsection>
<refsection>
<title>Examples</title>
side and in the opposite direction.
</para>
- <para>
-Availability: 2.0 - requires GEOS >= 3.2, improved with GEOS >= 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
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 >= 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>
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>
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 >= 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>
</listitem>
</itemizedlist>
</para>
-
- <para>Availability: 2.3.0 - requires GEOS >= 3.5.0.</para>
+ <para>Performed by the GEOS module.</para>
+ <para>Availability: 2.3.0</para>
</refsection>
<!-- Examples -->
</listitem>
</itemizedlist>
</para>
-
- <para>Availability: 2.3.0 - requires GEOS >= 3.5.0.</para>
+ <para>Performed by the GEOS module.</para>
+ <para>Availability: 2.3.0</para>
</refsection>
<!-- Examples -->
#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;
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));
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);
* @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);
*
* @param geom1 a lineal geometry
* @param geom2 another lineal geometry
- *
- * Requires GEOS-3.3.0+
*/
LWGEOM* lwgeom_sharedpaths(const LWGEOM* geom1, const LWGEOM* geom2);
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;
PG_FREE_IF_COPY(input, 0);
PG_RETURN_FLOAT8(result);
-#endif
}
/******************************************
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;
PG_FREE_IF_COPY(input, 0);
PG_RETURN_POINTER(result);
-#endif
}
/******************************************
PG_FUNCTION_INFO_V1(ST_OrientedEnvelope);
Datum ST_OrientedEnvelope(PG_FUNCTION_ARGS)
{
-#if POSTGIS_GEOS_VERSION < 36
- lwpgerror("The GEOS version this PostGIS binary "
- "was compiled against (%d) doesn't support "
- "'ST_OrientedEnvelope' function (3.6.0+ required)",
- POSTGIS_GEOS_VERSION);
- PG_RETURN_NULL();
-#else
GSERIALIZED* input;
GSERIALIZED* result;
GEOSGeometry* input_geos;
PG_FREE_IF_COPY(input, 0);
PG_RETURN_POINTER(result);
-#endif
}
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
COST 1; -- reset cost, see #3675
--- Availability: 1.5.0 - requires GEOS-3.2 or higher
+-- Availability: 1.5.0
CREATE OR REPLACE FUNCTION _ST_Buffer(geometry,float8,cstring)
RETURNS geometry
AS 'MODULE_PATHNAME','buffer'
AS 'MODULE_PATHNAME', 'ST_OrientedEnvelope'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
--- Availability: 2.0.0 - requires GEOS-3.2 or higher
+-- Availability: 2.0.0
CREATE OR REPLACE FUNCTION ST_OffsetCurve(line geometry, distance float8, params text DEFAULT '')
RETURNS geometry
AS 'MODULE_PATHNAME','ST_OffsetCurve'
$$ SELECT CASE WHEN NOT $1 OPERATOR(@extschema@.&&) $2 THEN 0 ELSE @extschema@._ST_LineCrossingDirection($1,$2) END $$
LANGUAGE 'sql' IMMUTABLE _PARALLEL;
--- Requires GEOS >= 3.0.0
-- Availability: 1.3.3
CREATE OR REPLACE FUNCTION ST_SimplifyPreserveTopology(geometry, float8)
RETURNS geometry
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
COST 1; -- reset cost, see #3675
--- Requires GEOS >= 3.1.0
-- Availability: 1.4.0
CREATE OR REPLACE FUNCTION ST_IsValidReason(geometry)
RETURNS text
location geometry
);
--- Requires GEOS >= 3.3.0
-- Availability: 2.0.0
CREATE OR REPLACE FUNCTION ST_IsValidDetail(geometry)
RETURNS valid_detail
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
COST 1000;
--- Requires GEOS >= 3.3.0
-- Availability: 2.0.0
CREATE OR REPLACE FUNCTION ST_IsValidDetail(geometry, int4)
RETURNS valid_detail
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
COST 1000;
--- Requires GEOS >= 3.3.0
-- Availability: 2.0.0
CREATE OR REPLACE FUNCTION ST_IsValidReason(geometry, int4)
RETURNS text
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL
COST 100;
--- Requires GEOS >= 3.3.0
-- Availability: 2.0.0
CREATE OR REPLACE FUNCTION ST_IsValid(geometry, int4)
RETURNS boolean
AS 'SELECT (@extschema@.ST_isValidDetail($1, $2)).valid'
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
--- Requires GEOS >= 3.2.0
-- Availability: 1.5.0
CREATE OR REPLACE FUNCTION ST_HausdorffDistance(geom1 geometry, geom2 geometry)
RETURNS FLOAT8
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
COST 100; -- Guessed cost
--- Requires GEOS >= 3.2.0
-- Availability: 1.5.0
CREATE OR REPLACE FUNCTION ST_HausdorffDistance(geom1 geometry, geom2 geometry, float8)
RETURNS FLOAT8
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
COST 100; -- Guessed cost
--- Requires GEOS >= 3.7.0
-- Availability: 2.4.0
CREATE OR REPLACE FUNCTION ST_FrechetDistance(geom1 geometry, geom2 geometry, float8 default -1)
RETURNS FLOAT8
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-- Availability: 2.0.0
--- Requires: GEOS-3.3.0
CREATE OR REPLACE FUNCTION ST_UnaryUnion(geometry)
RETURNS geometry
AS 'MODULE_PATHNAME','ST_UnaryUnion'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
COST 1; -- reset cost, see #3675
--- Requires GEOS >= 3.5.0
-- Availability: 2.2.0
CREATE OR REPLACE FUNCTION ST_ClipByBox2d(geom geometry, box box2d)
RETURNS geometry
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
COST 50; -- Guessed cost
--- Requires GEOS >= 3.5.0
-- Availability: 2.2.0
CREATE OR REPLACE FUNCTION ST_Subdivide(geom geometry, maxvertices integer DEFAULT 256)
RETURNS setof geometry
-- May return a geometry with inferior dimensions (dimensional collapses).
-- May return NULL if can't handle input.
--
--- Requires: GEOS-3.3.0
-- Availability: 2.0.0
CREATE OR REPLACE FUNCTION ST_MakeValid(geometry)
RETURNS geometry
--
-- Returns NULL on failure.
--
--- Requires: GEOS-3.3.0
-- Availability: 2.0.0
CREATE OR REPLACE FUNCTION ST_CleanGeometry(geometry)
RETURNS geometry
-- first geometry.
--
-- Availability: 2.0.0
--- Requires GEOS >= 3.3.0
--
CREATE OR REPLACE FUNCTION ST_SharedPaths(geom1 geometry, geom2 geometry)
RETURNS geometry
-- Snap first geometry against second.
--
-- Availability: 2.0.0
--- Requires GEOS >= 3.3.0
--
CREATE OR REPLACE FUNCTION ST_Snap(geom1 geometry, geom2 geometry, float8)
RETURNS geometry
-- Returns true if pattern 'pattern' matches DE9 intersection matrix 'matrix'
--
-- Availability: 2.0.0
--- Requires GEOS >= 3.3.0
--
CREATE OR REPLACE FUNCTION ST_RelateMatch(text, text)
RETURNS bool
-- Returns a linestring or a multilinestring containing all parts.
--
-- Availability: 2.0.0
--- Requires GEOS >= 3.3.0
--
CREATE OR REPLACE FUNCTION ST_Node(g geometry)
RETURNS geometry
-- If return_polygons is false, returns a MultiLineString.
--
-- Availability: 2.3.0
--- Requires GEOS >= 3.5.0
--
CREATE OR REPLACE FUNCTION _ST_Voronoi(g1 geometry, clip geometry DEFAULT NULL, tolerance float8 DEFAULT 0.0, return_polygons boolean DEFAULT true)
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-- Availability: 2.0.0
--- Requires GEOS >= 3.3.0
CREATE OR REPLACE FUNCTION ST_Relate(geom1 geometry, geom2 geometry, int4)
RETURNS text
AS 'MODULE_PATHNAME','relate_full'
) foo;
SELECT
- CASE
- WHEN temp_geos_version() >= 3.3
- THEN ST_AsText(ST_Polygon(rast)) = 'MULTIPOLYGON(((1 -1,1 0,5 0,5 -5,4 -5,0 -5,0 -1,1 -1),(1 -1,1 -2,2 -2,2 -1,1 -1),(2 -2,2 -3,3 -3,3 -2,2 -2)))'
- ELSE ST_AsText(ST_Polygon(rast)) = 'MULTIPOLYGON(((1 0,1 -1,0 -1,0 -5,4 -5,5 -5,5 0,1 0),(1 -1,1 -2,2 -2,2 -3,3 -3,3 -2,2 -2,2 -1,1 -1)))'
- END
+ ST_AsText(ST_Polygon(rast)) = 'MULTIPOLYGON(((1 -1,1 0,5 0,5 -5,4 -5,0 -5,0 -1,1 -1),(1 -1,1 -2,2 -2,2 -1,1 -1),(2 -2,2 -3,3 -3,3 -2,2 -2)))'
FROM (
SELECT
ST_SetValue(
) foo;
SELECT
- CASE
- WHEN temp_geos_version() >= 3.3
- THEN ST_AsText(ST_Polygon(rast)) = 'MULTIPOLYGON(((1 -1,1 0,5 0,5 -5,4 -5,0 -5,0 -1,1 -1),(1 -1,1 -2,2 -2,2 -1,1 -1),(2 -2,2 -3,3 -3,3 -2,2 -2),(3 -3,3 -4,4 -4,4 -3,3 -3)))'
- ELSE ST_AsText(ST_Polygon(rast)) = 'MULTIPOLYGON(((1 0,1 -1,0 -1,0 -5,4 -5,5 -5,5 0,1 0),(1 -1,1 -2,2 -2,2 -3,3 -3,3 -4,4 -4,4 -3,3 -3,3 -2,2 -2,2 -1,1 -1)))'
- END
+ ST_AsText(ST_Polygon(rast)) = 'MULTIPOLYGON(((1 -1,1 0,5 0,5 -5,4 -5,0 -5,0 -1,1 -1),(1 -1,1 -2,2 -2,2 -1,1 -1),(2 -2,2 -3,3 -3,3 -2,2 -2),(3 -3,3 -4,4 -4,4 -3,3 -3)))'
FROM (
SELECT
ST_SetValue(
-----------------------------
-- IM9 based predicates
---
--- These require GEOS-3.4.3+
-----------------------------
SET statement_timeout TO 100;
---
---- Tests for ST_Buffer with parameters (needs GEOS-3.2 or higher)
+--- Tests for ST_Buffer with parameters
---
---
---
--- Tests for GEOS/JTS implemented functions
---- supported by GEOS 3.0 and upwards
---
SELECT 'covers100', ST_Covers('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'LINESTRING(1 10, 9 10, 9 8)');