[postgis-tickets] r17117 - Bump SFCGAL to 1.3.1
Darafei
komzpa at gmail.com
Thu Dec 20 09:50:12 PST 2018
Author: komzpa
Date: 2018-12-20 21:50:11 -0800 (Thu, 20 Dec 2018)
New Revision: 17117
Modified:
trunk/NEWS
trunk/README.postgis
trunk/ci/winnie/build_postgis.sh
trunk/ci/winnie/package_postgis.sh
trunk/ci/winnie/regress_postgis.sh
trunk/configure.ac
trunk/postgis/lwgeom_sfcgal.c
trunk/postgis/sfcgal.sql.in
Log:
Bump SFCGAL to 1.3.1
Closes #4268
Closes https://github.com/postgis/postgis/pull/353
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2018-12-21 05:44:21 UTC (rev 17116)
+++ trunk/NEWS 2018-12-21 05:50:11 UTC (rev 17117)
@@ -13,12 +13,15 @@
- #4229, Dropped support for PostgreSQL < 9.5. (Darafei Praliaskouski)
- #4260, liblwgeom headers are not installed anymore.
If your project depends on them available, please use
- librttopo instead. (Darafei Praliaskouski)
+ librttopo instead. (Darafei Praliaskouski)
+
- #4258, Remove SFCGAL support for ST_Area, ST_Distance, ST_Intersection,
ST_Difference, ST_Union (Darafei Praliaskouski)
- #4267, Enable Proj 6 deprecated APIs (Darafei Praliaskouski, Raúl Marín)
+ - #4268, Bump minimum SFCGAL version to 1.3.1 (Darafei Praliaskouski)
+
* New Features *
- #2902, postgis_geos_noop (Sandro Santilli)
- #4128, ST_AsMVT support for Feature ID (Stepan Kuzmin)
Modified: trunk/README.postgis
===================================================================
--- trunk/README.postgis 2018-12-21 05:44:21 UTC (rev 17116)
+++ trunk/README.postgis 2018-12-21 05:50:11 UTC (rev 17117)
@@ -81,7 +81,7 @@
with raster or extension support. To compile without raster support you
must ``./configure --without-raster`` (also disables extension)
-* CGAL 4.1+ and SFCGAL (Optional) needed for advanced 3D support
+* CGAL 4.1+ and SFCGAL 1.3.1+ (Optional) needed for advanced 3D support
https://github.com/Oslandia/SFCGAL
Modified: trunk/ci/winnie/build_postgis.sh
===================================================================
--- trunk/ci/winnie/build_postgis.sh 2018-12-21 05:44:21 UTC (rev 17116)
+++ trunk/ci/winnie/build_postgis.sh 2018-12-21 05:50:11 UTC (rev 17117)
@@ -12,7 +12,6 @@
#POSTGIS_MINOR_VERSION=1
#POSTGIS_MICRO_VERSION=0SVN
#export GCC_TYPE=gcc48 #for pre-4.8.0 compiles this is blank
-export SFCGAL_VER=1.3.6
export GEOS_VER=3.8.0dev
export GDAL_VER=2.2.4
export PROJ_VER=4.9.3
@@ -21,8 +20,6 @@
export PROTOBUF_VER=3.2.0
export PROTOBUFC_VER=1.2.1
export CGAL_VER=4.11
-
-
export LIBXML_VER=2.7.8
if [[ "${GCC_TYPE}" == *gcc48* ]] ; then
Modified: trunk/ci/winnie/package_postgis.sh
===================================================================
--- trunk/ci/winnie/package_postgis.sh 2018-12-21 05:44:21 UTC (rev 17116)
+++ trunk/ci/winnie/package_postgis.sh 2018-12-21 05:50:11 UTC (rev 17117)
@@ -12,7 +12,6 @@
#export OS_BUILD=32
#export GCC_TYPE=
-export SFCGAL_VER=1.3.6
export GEOS_VER=3.8.0dev
export GDAL_VER=2.2.4
export PROJ_VER=4.9.3
Modified: trunk/ci/winnie/regress_postgis.sh
===================================================================
--- trunk/ci/winnie/regress_postgis.sh 2018-12-21 05:44:21 UTC (rev 17116)
+++ trunk/ci/winnie/regress_postgis.sh 2018-12-21 05:50:11 UTC (rev 17117)
@@ -1,6 +1,5 @@
#!/bin/bash
set -e
-export SFCGAL_VER=1.3.6
export GEOS_VER=3.8.0dev
export GDAL_VER=2.2.4
export PROJ_VER=4.9.3
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2018-12-21 05:44:21 UTC (rev 17116)
+++ trunk/configure.ac 2018-12-21 05:50:11 UTC (rev 17117)
@@ -740,7 +740,10 @@
SFCGAL_MAJOR_VERSION=`echo $SFCGAL_VERSION | cut -d. -f1 | sed 's/[[^0-9]]//g'`
SFCGAL_MINOR_VERSION=`echo $SFCGAL_VERSION | cut -d. -f2 | sed 's/[[^0-9]]//g'`
- POSTGIS_SFCGAL_VERSION="$SFCGAL_MAJOR_VERSION$SFCGAL_MINOR_VERSION"
+ SFCGAL_PATCH_VERSION=`echo $SFCGAL_VERSION | cut -d. -f3 | sed 's/[[^0-9]]//g'`
+ SFCGAL_NUMERIC_PATCH_VERSION=`printf "%02d" $SFCGAL_PATCH_VERSION`
+ SFCGAL_NUMERIC_MINOR_VERSION=`printf "%02d" $SFCGAL_MINOR_VERSION`
+ POSTGIS_SFCGAL_VERSION="$SFCGAL_MAJOR_VERSION$SFCGAL_NUMERIC_MINOR_VERSION$SFCGAL_NUMERIC_PATCH_VERSION"
AC_DEFINE_UNQUOTED([POSTGIS_SFCGAL_VERSION], [$POSTGIS_SFCGAL_VERSION], [SFCGAL library version at build time])
AC_SUBST([POSTGIS_SFCGAL_VERSION])
@@ -751,10 +754,9 @@
SFCGAL="sfcgal"
HAVE_SFCGAL="yes"
fi
- if test ! "$POSTGIS_SFCGAL_VERSION" -ge 11; then
- AC_MSG_ERROR([PostGIS requires SFCGAL >= 1.1.0 (found $SFCGAL_VERSION)])
+ if test ! "$POSTGIS_SFCGAL_VERSION" -ge 10301; then
+ AC_MSG_ERROR([PostGIS requires SFCGAL >= 1.3.1 (found $SFCGAL_VERSION)])
fi
-
else
if test "x$with_sfcgal" != "xauto"; then
AC_MSG_ERROR([sfcgal-config cannot be found. Please install sfcgal])
Modified: trunk/postgis/lwgeom_sfcgal.c
===================================================================
--- trunk/postgis/lwgeom_sfcgal.c 2018-12-21 05:44:21 UTC (rev 17116)
+++ trunk/postgis/lwgeom_sfcgal.c 2018-12-21 05:50:11 UTC (rev 17117)
@@ -374,14 +374,6 @@
PG_FUNCTION_INFO_V1(sfcgal_approximate_medial_axis);
Datum sfcgal_approximate_medial_axis(PG_FUNCTION_ARGS)
{
-#if POSTGIS_SFCGAL_VERSION < 12
- lwpgerror(
- "The SFCGAL version this PostGIS binary "
- "was compiled against (%d) doesn't support "
- "'sfcgal_geometry_approximate_medial_axis' function (1.2.0+ required)",
- POSTGIS_SFCGAL_VERSION);
- PG_RETURN_NULL();
-#else /* POSTGIS_SFCGAL_VERSION >= 12 */
GSERIALIZED *input, *output;
sfcgal_geometry_t *geom;
sfcgal_geometry_t *result;
@@ -401,7 +393,6 @@
sfcgal_geometry_delete(result);
PG_RETURN_POINTER(output);
-#endif /* POSTGIS_SFCGAL_VERSION >= 12 */
}
PG_FUNCTION_INFO_V1(sfcgal_intersection3D);
Modified: trunk/postgis/sfcgal.sql.in
===================================================================
--- trunk/postgis/sfcgal.sql.in 2018-12-21 05:44:21 UTC (rev 17116)
+++ trunk/postgis/sfcgal.sql.in 2018-12-21 05:50:11 UTC (rev 17117)
@@ -100,31 +100,8 @@
-- Availability: 2.2.0
CREATE OR REPLACE FUNCTION ST_ApproximateMedialAxis(geometry)
RETURNS geometry
-#if POSTGIS_SFCGAL_VERSION < 12
- AS $$
- DECLARE
- poly alias for $1;
- ret GEOMETRY;
- BEGIN
- WITH components AS (
- SELECT (ST_Dump(ST_StraightSkeleton(poly))).geom
- ),
- filtered AS (
- SELECT ST_Collect(geom) g
- FROM components
- WHERE NOT ST_Touches(geom, ST_Boundary(poly))
- )
- SELECT
- COALESCE(g, ST_SetSRID('MULTILINESTRING EMPTY'::geometry, ST_Srid(poly)))
- INTO ret
- FROM filtered;
- RETURN ret;
- END; $$
- LANGUAGE 'plpgsql'
-#else // POSTGIS_SFCGAL_VERSION >= 12
AS 'MODULE_PATHNAME','sfcgal_approximate_medial_axis'
LANGUAGE 'c'
-#endif // POSTGIS_SFCGAL_VERSION >= 12
IMMUTABLE STRICT _PARALLEL
COST 100;
More information about the postgis-tickets
mailing list