[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-1048-g6723674b7

git at osgeo.org git at osgeo.org
Wed Jun 28 12:33:43 PDT 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  6723674b73935e772701e9adc5d81bd2c7d763b6 (commit)
       via  90de06f418a4639f9d38b2ca8c1c41b4d8b19dda (commit)
      from  5986844cca7f7a2422f15232c59e745fbe13425d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6723674b73935e772701e9adc5d81bd2c7d763b6
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Jun 28 12:33:30 2023 -0700

    Entry for ST_LargestEmptyCircle

diff --git a/NEWS b/NEWS
index b083a7911..1ae3f983d 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ PostGIS 3.4.0dev
   - Allow singleton geometry to be inserted into Geometry(Multi*) columns (Paul Ramsey)
   - GH721, New window-based ST_ClusterWithinWin and ST_ClusterIntersectingWin (Paul Ramsey)
   - #5397, [address_standardizer] debug_standardize_address function (Regina Obe)
+  - ST_LargestEmptyCircle, exposes extra semantics on circle finding (Martin Davis)
 
 * Enhancements *
   - #5194, do not update system catalogs from postgis_extensions_upgrade (Sandro Santilli)

commit 90de06f418a4639f9d38b2ca8c1c41b4d8b19dda
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Jun 28 12:31:56 2023 -0700

    Squashed commit of the following:
    
    commit fe6367478c3487c5665ff82ed73ee5a3586c733a
    Author: Paul Ramsey <pramsey at cleverelephant.ca>
    Date:   Wed Jun 28 12:19:15 2023 -0700
    
        Try a simpler regression test
    
    commit 534821f167709ecf0701b690b55df9f85fc770a8
    Author: Paul Ramsey <pramsey at cleverelephant.ca>
    Date:   Wed Jun 28 12:03:06 2023 -0700
    
        Add xml docs
    
    commit f3766cb5a181e85f6dfba6c1d15c4c67412d2931
    Author: Paul Ramsey <pramsey at cleverelephant.ca>
    Date:   Wed Jun 28 11:41:59 2023 -0700
    
        Add simple regression test
    
    commit 568bed8aa890bc4e331b9f3def1b97fb768619e8
    Author: Paul Ramsey <pramsey at cleverelephant.ca>
    Date:   Wed Jun 21 10:53:09 2023 -0700
    
        Fix handling of tolerance
    
    commit 1fd775b4e57578aa356e48466721f448fd146bc8
    Author: Paul Ramsey <pramsey at cleverelephant.ca>
    Date:   Wed Jun 21 10:33:21 2023 -0700
    
        Draft of ST_LargestEmptyCircle

diff --git a/doc/html/image_src/Makefile.in b/doc/html/image_src/Makefile.in
index d6d283dde..506436791 100644
--- a/doc/html/image_src/Makefile.in
+++ b/doc/html/image_src/Makefile.in
@@ -105,6 +105,8 @@ IMAGES= \
 	../images/st_isvalid07.png \
 	../images/st_isvalid08.png \
 	../images/st_isvalid09.png \
+	../images/st_largestemptycircle01.png \
+	../images/st_largestemptycircle02.png \
 	../images/st_letters01.png \
 	../images/st_linecrossingdirection01.png \
 	../images/st_linecrossingdirection02.png \
diff --git a/doc/html/image_src/st_largestemptycircle01.wkt b/doc/html/image_src/st_largestemptycircle01.wkt
new file mode 100644
index 000000000..f137e9609
--- /dev/null
+++ b/doc/html/image_src/st_largestemptycircle01.wkt
@@ -0,0 +1,3 @@
+Highlight;POLYGON ((28.2691295495194 129.23060727923104, 26.243627638259646 125.56965716478442, 24.61873574844759 121.71414940582366, 23.412864554468648 117.70776844584053, 22.639677058792287 113.59590818198022, 22.307933784694555 109.42515763404829, 22.42139351602887 105.24277307230017, 22.978770708703017 101.0961425850165, 23.97375005640737 97.03224915252771, 25.395058045558848 93.09713831127334, 27.226590688714523 89.33539643947528, 29.44759598918413 85.7896455756568, 32.03290906944465 82.50006049391511, 34.95323729925805 79.50391350767786, 38.1754921928766 76.8351521594987, 41.663164314807844 74.52401458183546, 45.37673694630725 72.59668688692673, 49.27413382559159 71.07500646767694, 53.31119588869781 69.97621457126883, 57.44218160932275 69.31276094894363, 61.6202852685936 69.09216279534495, 65.79816728256529 69.31691957569959, 69.92849057862259 69.98448470587786, 73.9644569434277 71.0872944062094, 77.86033726537708 72.612853402129, 81.57198966370822 74.54387650063049, 85.057359
 633647 76.85848443841013, 88.27695654075082 79.53045178266251, 91.19430106557658 82.52950407571328, 93.77633852894621 85.82166085672159, 95.99381341466997 89.36962067387964, 97.82160084623459 93.1331837247661, 99.23899126169366 97.06970733617104, 100.22992506127949 101.13458912262212, 100.78317456908579 105.2817723492346, 100.89247124712179 109.46426777292051, 100.55657672035261 113.63468604928924, 99.7792968079832 117.74577467285482, 98.56943840200597 121.75095336680471, 96.94070968159559 125.60484185614816, 94.91156479396122 129.26377404436522, 92.50499476148497 132.68629276772828, 89.74826698425133 135.83361952153257, 86.67261628950894 138.6700938360495, 83.31289102859687 141.16357732389793, 79.70715823119936 143.28581782081514, 75.89627229068863 145.0127694939668, 71.92341206752343 146.32486529084116, 67.83359165550664 147.2072386417728, 63.673150354115705 147.64989190411717, 59.48922762572339 147.6478096395366, 55.329228986653106 147.20101544092086, 51.24028888373654 146.314571
 6650701, 47.26873664219736 144.99852207416976, 43.45957153588397 143.2677780359514, 39.8559529275161 141.14194957193834, 36.49871125585943 138.64512316806577, 33.4258854105395 135.80558886517073, 30.672291736222736 132.65551972152537, 28.2691295495194 129.23060727923104, 28.2691295495194 129.23060727923104))
+ArgA;MULTILINESTRING ((10 100, 60 180, 130 150, 190 160), (20 50, 70 70, 90 20, 110 40), (160 30, 100 100, 180 100))
+Result-endpoints;LINESTRING (61.60072326660156 108.39836120605469, 28.2691295495194 129.23060727923104)
diff --git a/doc/html/image_src/st_largestemptycircle02.wkt b/doc/html/image_src/st_largestemptycircle02.wkt
new file mode 100644
index 000000000..cf169b968
--- /dev/null
+++ b/doc/html/image_src/st_largestemptycircle02.wkt
@@ -0,0 +1,4 @@
+Highlight;POLYGON ((115.73111802004696 22.861027235395454, 119.66935505399547 23.99368124386659, 123.46488744573398 25.53852748273087, 127.07471029664627 27.478062226812725, 130.45792287141953 29.790309772462972, 133.57619201971835 32.44907143106212, 136.39418650609545 35.424222370631014, 138.87997732700666 38.68205294221433, 141.0053994791795 42.18565062367297, 142.74637108035415 45.895318253309426, 144.08316622663244 49.769023814571945, 145.0006384948508 53.7628766755972, 145.48839255760691 57.831624887607155, 145.5409019664732 61.92916790757044, 145.1575717688655 66.00907893577576, 144.34274524909364 70.02513095002381, 143.10565471721483 73.93182047626019, 141.46031690327152 77.68488316111873, 139.42537414213936 81.24179530473222, 137.02388314842383 84.56225567124355, 134.28305377467083 87.60864211791147, 131.23394071286484 90.34643786902102, 127.91109163235988 92.74462260474441, 124.3521557409812 94.77602393375992, 120.59745720445676 96.41762526730301, 116.68953825750677 97.6508
 2660631401, 112.67267718332535 98.46165528685971, 108.59238662293923 98.8409242959988, 104.49489789879898 98.78433636430952, 100.42663719542254 98.29253265566933, 96.43369953217363 97.37108550261189, 92.5613264882738 96.03043526957295, 88.85339359763223 94.2857720593895, 85.35191322151465 92.15686360336494, 82.09655853170307 89.66783128497471, 79.12421399760677 86.84687683495301, 76.4685574704857 83.72596279441481, 74.15967859993862 80.34045036649336, 72.22373790615003 76.72869875977914, 70.68267037074321 72.93163056315896, 69.55393690467366 68.99226807653197, 68.85032650913094 64.95524585096106, 68.57981137104503 60.86630496137417, 68.74545653502275 56.771774741908196, 69.34538517516785 52.71804785604095, 70.37279986026815 48.75105464917638, 71.81605957140735 44.91574273947834, 73.65881159936096 41.25556774339657, 75.88017682732588 37.8120009061684, 78.4549862996568 34.62405921603912, 81.35406639619052 31.72786332619477, 84.54456938101971 29.156228293328418, 87.99034558046588 26.93
 8291769935717, 91.65235297332711 25.0991838630691, 95.4890995525783 23.65974240018364, 99.45711344639034 22.63627682822547, 103.51143547180855 22.040383421080946, 107.60612854025995 21.878813889159936, 111.69479814312275 22.153398879819036, 115.73111802004694 22.861027235395447, 115.73111802004696 22.861027235395454))
+ArgA;GEOMETRYCOLLECTION (POLYGON ((90 190, 10 100, 60 10, 190 40, 120 100, 190 180, 90 190)), POINT (70 50), POINT (60 130), POINT (130 150), POINT (80 90))
+ArgB;POLYGON ((90 190, 10 100, 60 10, 190 40, 120 100, 190 180, 90 190))
+Result-endpoints;LINESTRING (107.07450866699219 60.37300109863281, 115.73111802004696 22.861027235395454)
diff --git a/doc/reference_processing.xml b/doc/reference_processing.xml
index 8b5c1a79f..72c3f53bd 100644
--- a/doc/reference_processing.xml
+++ b/doc/reference_processing.xml
@@ -1539,10 +1539,6 @@ LINESTRING Z (-30 -29.7 5,-29 -27 11,-30 -29.7 10,-36 -31 5,-45 -33 1,-46 -32 11
         <para>Availability: 3.1.0 - requires GEOS >= 3.9.0.</para>
 
       </refsection>
-      <refsection>
-        <title>See Also</title>
-        <para><xref linkend="ST_MinimumBoundingCircle" /></para>
-      </refsection>
 
       <refsection>
         <title>Examples</title>
@@ -1572,6 +1568,88 @@ LINESTRING Z (-30 -29.7 5,-29 -27 11,-30 -29.7 10,-36 -31 5,-45 -33 1,-46 -32 11
         <caption><para>Maximum inscribed circle of a multi-linestring. Center, nearest point, and radius are returned.</para></caption>
       </mediaobject>
     </informalfigure>
+      </refsection>
+      <refsection>
+        <title>See Also</title>
+        <para><xref linkend="ST_MinimumBoundingRadius" />, <xref linkend="ST_LargestEmptyCircle" /></para>
+      </refsection>
+    </refentry>
+
+
+    <refentry id="ST_LargestEmptyCircle">
+      <refnamediv>
+        <refname>ST_LargestEmptyCircle</refname>
+        <refpurpose>Computes the largest circle not overlapping a geometry.</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <funcsynopsis>
+          <funcprototype>
+            <funcdef>(geometry, geometry, double precision) <function>ST_LargestEmptyCircle</function></funcdef>
+            <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
+            <paramdef choice="opt"><type>double precision </type> <parameter>tolerance=0.0</parameter></paramdef>
+            <paramdef choice="opt"><type>geometry </type> <parameter>boundary=POINT EMPTY</parameter></paramdef>
+          </funcprototype>
+        </funcsynopsis>
+      </refsynopsisdiv>
+
+      <refsection>
+        <title>Description</title>
+        <para>Finds the largest circle which does not overlap a set of point and line obstacles. (Polygonal geometries may be included as obstacles, but only their boundary lines are used.) The center of the circle is constrained to lie inside a polygonal boundary, which by default is the convex hull of the input geometry. The circle center is the point in the interior of the boundary which has the farthest distance from the obstacles. The circle itself is provided by the center point and a nearest point lying on an obstacle detemining the circle radius.</para>
+        <para>The circle center is determined to a given  accuracy specified by a distance tolerance, using an iterative algorithm. If the accuracy distance is not specified a reasonable default is used.</para>
+        <para>Returns a record with fields:</para>
+
+        <itemizedlist>
+            <listitem><para> <varname>center</varname> - center point of the circle </para></listitem>
+            <listitem><para> <varname>nearest</varname> - a point on the geometry nearest to the center </para></listitem>
+            <listitem><para> <varname>radius</varname> - radius of the circle </para></listitem>
+        </itemizedlist>
+
+        <para>To find the largest empty circle in the interior of a polygon, see <xref linkend="ST_MaximumInscribedCircle" />.</para>
+
+        <para>Availability: 3.4.0 - requires GEOS >= 3.9.0.</para>
+
+      </refsection>
+
+      <refsection>
+        <title>Examples</title>
+
+<programlisting>SELECT radius,
+       ST_AsText(center) AS center,
+       ST_AsText(nearest) AS nearest
+  FROM ST_LargestEmptyCircle(
+        'MULTILINESTRING (
+          (10 100, 60 180, 130 150, 190 160),
+          (20 50, 70 70, 90 20, 110 40),
+          (160 30, 100 100, 180 100))');</programlisting>
+
+    <informalfigure>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="images/st_largestemptycircle01.png" />
+        </imageobject>
+        <caption><para>Largest Empty Circle within a set of lines.</para></caption>
+      </mediaobject>
+    </informalfigure>
+
+<programlisting>SELECT radius,
+       ST_AsText(center) AS center,
+       ST_AsText(nearest) AS nearest
+  FROM ST_LargestEmptyCircle(
+         St_Collect(
+           'MULTIPOINT ((70 50), (60 130), (130 150), (80 90))',
+           'POLYGON ((90 190, 10 100, 60 10, 190 40, 120 100, 190 180, 90 190))'),
+         'POLYGON ((90 190, 10 100, 60 10, 190 40, 120 100, 190 180, 90 190))'
+       );</programlisting>
+
+    <informalfigure>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="images/st_largestemptycircle02.png" />
+        </imageobject>
+        <caption><para>Largest Empty Circle within a set of points, constrained to lie in a polygon. The constraint polygon boundary must be included as an obstacle, as well as specified as the constraint for the circle center. </para></caption>
+      </mediaobject>
+    </informalfigure>
 
       </refsection>
       <refsection>
@@ -1580,6 +1658,7 @@ LINESTRING Z (-30 -29.7 5,-29 -27 11,-30 -29.7 10,-36 -31 5,-45 -33 1,-46 -32 11
       </refsection>
     </refentry>
 
+
     <refentry id="ST_MinimumBoundingCircle">
       <refnamediv>
         <refname>ST_MinimumBoundingCircle</refname>
@@ -1648,10 +1727,11 @@ POLYGON((135.59714732062 115,134.384753327498 102.690357210921,130.79416296937 9
       </refsection>
       <refsection>
         <title>See Also</title>
-        <para><xref linkend="ST_Collect" />, <xref linkend="ST_MinimumBoundingRadius" />, <xref linkend="ST_LongestLine" /> </para>
+        <para><xref linkend="ST_Collect" />, <xref linkend="ST_MinimumBoundingRadius" />, <xref linkend="ST_LargestEmptyCircle" />, <xref linkend="ST_LongestLine" /> </para>
       </refsection>
     </refentry>
 
+
     <refentry id="ST_MinimumBoundingRadius">
     <refnamediv>
         <refname>ST_MinimumBoundingRadius</refname>
diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c
index 1e166625f..900c561e7 100644
--- a/postgis/lwgeom_geos.c
+++ b/postgis/lwgeom_geos.c
@@ -331,12 +331,6 @@ Datum ST_FrechetDistance(PG_FUNCTION_ARGS)
 }
 
 
-/**
- *  @brief Compute the Frechet distance with optional densification thanks to the corresponding GEOS function
- *  @example ST_FrechetDistance {@link #frechetdistance} - SELECT ST_FrechetDistance(
- *      'LINESTRING (0 0, 50 200, 100 0, 150 200, 200 0)'::geometry,
- *      'LINESTRING (0 200, 200 150, 0 100, 200 50, 0 0)'::geometry, 0.5);
- */
 
 PG_FUNCTION_INFO_V1(ST_MaximumInscribedCircle);
 Datum ST_MaximumInscribedCircle(PG_FUNCTION_ARGS)
@@ -462,6 +456,136 @@ Datum ST_MaximumInscribedCircle(PG_FUNCTION_ARGS)
 }
 
 
+/* ST_LargestEmptyCircle(geom, boundary, tolerance) */
+PG_FUNCTION_INFO_V1(ST_LargestEmptyCircle);
+Datum ST_LargestEmptyCircle(PG_FUNCTION_ARGS)
+{
+#if POSTGIS_GEOS_VERSION < 30900
+
+	lwpgerror("The GEOS version this PostGIS binary "
+	          "was compiled against (%d) doesn't support "
+	          "'GEOSMaximumInscribedCircle' function (3.9.0+ required)",
+	          POSTGIS_GEOS_VERSION);
+	          PG_RETURN_NULL();
+
+#else /* POSTGIS_GEOS_VERSION >= 30900 */
+	GSERIALIZED* geom;
+	GSERIALIZED* boundary;
+	GSERIALIZED* center;
+	GSERIALIZED* nearest;
+	TupleDesc resultTupleDesc;
+	HeapTuple resultTuple;
+	Datum result;
+	Datum result_values[3];
+	bool result_is_null[3];
+	double radius = 0.0, tolerance = 0.0;
+	int32 srid = SRID_UNKNOWN;
+	bool is3d = false, hasBoundary = false;
+
+	if (PG_ARGISNULL(0))
+		PG_RETURN_NULL();
+
+	geom = PG_GETARG_GSERIALIZED_P(0);
+	tolerance = PG_GETARG_FLOAT8(1);
+	boundary = PG_GETARG_GSERIALIZED_P(2);
+	srid = gserialized_get_srid(geom);
+	is3d = gserialized_has_z(geom);
+
+	if (boundary && ! gserialized_is_empty(boundary))
+		hasBoundary = true;
+
+    /* Empty geometry?  Return POINT EMPTY with zero radius */
+	if (gserialized_is_empty(geom))
+	{
+		LWGEOM* lwcenter = (LWGEOM*) lwpoint_construct_empty(gserialized_get_srid(geom), LW_FALSE, LW_FALSE);
+		LWGEOM* lwnearest = (LWGEOM*) lwpoint_construct_empty(gserialized_get_srid(geom), LW_FALSE, LW_FALSE);
+		center = geometry_serialize(lwcenter);
+		nearest = geometry_serialize(lwnearest);
+		radius = 0.0;
+	}
+	else
+	{
+		GEOSGeometry *ginput, *gcircle, *gcenter, *gnearest;
+		GEOSGeometry *gboundary = NULL;
+		double width, height, size;
+		GBOX gbox;
+		LWGEOM *lwg;
+		lwg = lwgeom_from_gserialized(geom);
+		if (!lwgeom_isfinite(lwg))
+		{
+			lwpgerror("Geometry contains invalid coordinates");
+			PG_RETURN_NULL();
+		}
+		lwgeom_free(lwg);
+
+
+		if (!gserialized_get_gbox_p(geom, &gbox))
+			PG_RETURN_NULL();
+
+		if (tolerance <= 0)
+		{
+			width = gbox.xmax - gbox.xmin;
+			height = gbox.ymax - gbox.ymin;
+			size = width > height ? width : height;
+			tolerance = size / 1000.0;
+		}
+
+		initGEOS(lwpgnotice, lwgeom_geos_error);
+
+		ginput = POSTGIS2GEOS(geom);
+		if (!ginput)
+			HANDLE_GEOS_ERROR("Geometry could not be converted to GEOS");
+
+		if (hasBoundary)
+		{
+			gboundary = POSTGIS2GEOS(boundary);
+			if (!gboundary)
+				HANDLE_GEOS_ERROR("Boundary could not be converted to GEOS");
+		}
+
+		gcircle = GEOSLargestEmptyCircle(ginput, gboundary, tolerance);
+		if (!gcircle)
+		{
+			lwpgerror("Error calculating GEOSLargestEmptyCircle.");
+			GEOSGeom_destroy(ginput);
+			PG_RETURN_NULL();
+		}
+
+		gcenter = GEOSGeomGetStartPoint(gcircle);
+		gnearest = GEOSGeomGetEndPoint(gcircle);
+		GEOSDistance(gcenter, gnearest, &radius);
+		GEOSSetSRID(gcenter, srid);
+		GEOSSetSRID(gnearest, srid);
+
+		center = GEOS2POSTGIS(gcenter, is3d);
+		nearest = GEOS2POSTGIS(gnearest, is3d);
+		GEOSGeom_destroy(gcenter);
+		GEOSGeom_destroy(gnearest);
+		GEOSGeom_destroy(gcircle);
+		GEOSGeom_destroy(ginput);
+		if (gboundary) GEOSGeom_destroy(gboundary);
+	}
+
+	get_call_result_type(fcinfo, NULL, &resultTupleDesc);
+	BlessTupleDesc(resultTupleDesc);
+
+	result_values[0] = PointerGetDatum(center);
+	result_is_null[0] = false;
+	result_values[1] = PointerGetDatum(nearest);
+	result_is_null[1] = false;
+	result_values[2] = Float8GetDatum(radius);
+	result_is_null[2] = false;
+	resultTuple = heap_form_tuple(resultTupleDesc, result_values, result_is_null);
+
+	result = HeapTupleGetDatum(resultTuple);
+
+	PG_RETURN_DATUM(result);
+
+#endif /* POSTGIS_GEOS_VERSION >= 30900 */
+}
+
+
+
 /**
  * @brief This is the final function for GeomUnion
  * 			aggregate. Will have as input an array of Geometries.
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 19d2f2c80..55d50df45 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -3793,6 +3793,12 @@ CREATE OR REPLACE FUNCTION ST_MaximumInscribedCircle(geometry, OUT center geomet
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_HIGH;
 
+-- Availability: 3.4.0
+CREATE OR REPLACE FUNCTION ST_LargestEmptyCircle(geom geometry, tolerance float8 DEFAULT 0.0, boundary geometry DEFAULT 'POINT EMPTY'::geometry, OUT center geometry, OUT nearest geometry, OUT radius double precision)
+	AS 'MODULE_PATHNAME', 'ST_LargestEmptyCircle'
+	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
+	_COST_HIGH;
+
 -- PostGIS equivalent function: ST_difference(geom1 geometry, geom2 geometry)
 -- Changed: 3.1.0 to add gridSize default argument
 -- Replaces ST_Difference(geometry, geometry) deprecated in 3.1.0
diff --git a/regress/core/geos39.sql b/regress/core/geos39.sql
index 4a444a418..5ffd02e7f 100644
--- a/regress/core/geos39.sql
+++ b/regress/core/geos39.sql
@@ -45,3 +45,10 @@ SELECT 'rp-3', ST_AsText(ST_ReducePrecision('POINT(1.412 19.323)', 10));
 
 -- ST_MaximumInscribedCircle infinite check https://trac.osgeo.org/postgis/ticket/5318
 SELECT '#5318', ST_MaximumInscribedCircle('0106000020E61000000100000001030000000100000005000000000000000000F07F000000000000F07F000000000000F07F000000000000F07F000000000000F07F000000000000F07F000000000000F07F000000000000F07F000000000000F07F000000000000F07F'::geometry) As result;
+
+-- ST_LargestEmptyCircle
+SELECT 'lec-1', round(radius::numeric,3),
+  ST_AsText(center,3) AS center,
+  ST_AsText(nearest,3) AS nearest
+FROM ST_LargestEmptyCircle(
+  'MULTIPOINT ((4 3), (7 6), (4 6))');
diff --git a/regress/core/geos39_expected b/regress/core/geos39_expected
index ec9be2b85..3bfd0eb36 100644
--- a/regress/core/geos39_expected
+++ b/regress/core/geos39_expected
@@ -9,3 +9,4 @@ rp-1|POINT(1.4 19.3)
 rp-2|POINT(1 19)
 rp-3|POINT(0 20)
 ERROR:  Geometry contains invalid coordinates
+lec-1|2.121|POINT(5.5 4.5)|POINT(4 3)

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                           |   1 +
 doc/html/image_src/Makefile.in                 |   2 +
 doc/html/image_src/st_largestemptycircle01.wkt |   3 +
 doc/html/image_src/st_largestemptycircle02.wkt |   4 +
 doc/reference_processing.xml                   |  90 +++++++++++++++-
 postgis/lwgeom_geos.c                          | 136 +++++++++++++++++++++++--
 postgis/postgis.sql.in                         |   6 ++
 regress/core/geos39.sql                        |   7 ++
 regress/core/geos39_expected                   |   1 +
 9 files changed, 239 insertions(+), 11 deletions(-)
 create mode 100644 doc/html/image_src/st_largestemptycircle01.wkt
 create mode 100644 doc/html/image_src/st_largestemptycircle02.wkt


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list