Commit 412015bf authored by Darafei Praliaskouski's avatar Darafei Praliaskouski

Remove mentions of GEOS <= 3.5.0.

PostGIS requires 3.5.0 already.

Closes https://github.com/postgis/postgis/pull/255



git-svn-id: http://svn.osgeo.org/postgis/trunk@16607 b70326c6-7e19-0410-871a-916f4a2858ee
parent b8d56f0c
Pipeline #23215495 passed with stage
in 17 minutes and 46 seconds
......@@ -18,7 +18,6 @@
static void test_lwgeom_clip_by_rect(void)
{
#if POSTGIS_GEOS_VERSION >= 35
LWGEOM *in, *out;
const char *wkt;
char *tmp;
......@@ -65,8 +64,6 @@ static void test_lwgeom_clip_by_rect(void)
//tmp = lwgeom_to_ewkt(out); printf("%s\n", tmp); lwfree(tmp);
CU_ASSERT(lwgeom_is_empty(out));
lwgeom_free(out); lwgeom_free(in);
#endif /* POSTGIS_GEOS_VERSION >= 35 */
}
/*
......
......@@ -130,9 +130,6 @@ test_geos_makevalid(void)
static void test_geos_subdivide(void)
{
#if POSTGIS_GEOS_VERSION < 35
return;
#else
char *ewkt = "LINESTRING(0 0, 10 10)";
char *out_ewkt;
LWGEOM *geom1 = lwgeom_from_wkt(ewkt, LW_PARSER_CHECK_NONE);
......@@ -155,7 +152,6 @@ static void test_geos_subdivide(void)
lwgeom_free(geom2);
lwgeom_free(geom1);
#endif
}
/*
......
......@@ -2360,12 +2360,8 @@ int ptarray_transform(POINTARRAY *pa, projPJ inpj, projPJ outpj);
*/
LWGEOM* lwgeom_buildarea(const LWGEOM *geom) ;
/**
* Attempts to make an invalid geometries valid w/out losing points.
*
* NOTE: this is only available when liblwgeom is built against
* GEOS 3.3.0 or higher
*/
LWGEOM* lwgeom_make_valid(LWGEOM* geom);
......@@ -2381,8 +2377,6 @@ LWGEOM* lwgeom_split(const LWGEOM* lwgeom_in, const LWGEOM* blade_in);
/*
* Fully node a set of linestrings, using the least nodes preserving
* all the input ones.
*
* Requires GEOS-3.3.0 or higher
*/
LWGEOM* lwgeom_node(const LWGEOM* lwgeom_in);
......@@ -2405,8 +2399,6 @@ LWGEOM* lwgeom_delaunay_triangulation(const LWGEOM *geom, double tolerance, int3
* @param tolerance an optional snapping tolerance for improved robustness
* @param output_edges if non-zero the result will be a MULTILINESTRING,
* otherwise it'll be a COLLECTION of polygons.
*
* Requires GEOS-3.5.0 or higher
*/
LWGEOM* lwgeom_voronoi_diagram(const LWGEOM* g, const GBOX* env, double tolerance, int output_edges);
......@@ -2420,6 +2412,5 @@ LWGEOM* lwgeom_voronoi_diagram(const LWGEOM* g, const GBOX* env, double toleranc
*/
int * lwgeom_cluster_2d_kmeans(const LWGEOM **geoms, uint32_t ngeoms, uint32_t k);
#endif /* !defined _LIBLWGEOM_H */
......@@ -1730,10 +1730,6 @@ lwtin_from_geos(const GEOSGeometry* geom, uint8_t want3d)
LWGEOM*
lwgeom_delaunay_triangulation(const LWGEOM* geom, double tolerance, int32_t output)
{
#if POSTGIS_GEOS_VERSION < 34
lwerror("lwgeom_delaunay_triangulation: GEOS 3.4 or higher required");
return NULL;
#else
LWGEOM* result;
int32_t srid = get_result_srid(geom, NULL, __func__);
uint8_t is3d = FLAGS_GET_Z(geom->flags);
......@@ -1772,17 +1768,8 @@ lwgeom_delaunay_triangulation(const LWGEOM* geom, double tolerance, int32_t outp
geos_clean(g1, NULL, g3);
return result;
#endif /* POSTGIS_GEOS_VERSION < 34 */
}
#if POSTGIS_GEOS_VERSION < 35
LWGEOM*
lwgeom_voronoi_diagram(const LWGEOM* g, const GBOX* env, double tolerance, int output_edges)
{
lwerror("lwgeom_voronoi_diagram: GEOS 3.5 or higher required");
return NULL;
}
#else /* POSTGIS_GEOS_VERSION >= 35 */
static GEOSCoordSequence*
lwgeom_get_geos_coordseq_2d(const LWGEOM* g, uint32_t num_points)
{
......@@ -1873,4 +1860,3 @@ lwgeom_voronoi_diagram(const LWGEOM* g, const GBOX* env, double tolerance, int o
return lwgeom_result;
}
#endif /* POSTGIS_GEOS_VERSION >= 35 */
......@@ -327,16 +327,6 @@ struct FLATCOLLECTIONDUMPSTATE
PG_FUNCTION_INFO_V1(ST_Subdivide);
Datum ST_Subdivide(PG_FUNCTION_ARGS)
{
#if POSTGIS_GEOS_VERSION < 35
elog(ERROR, "The GEOS version this PostGIS binary "
"was compiled against (%d) doesn't support "
"'%s' function (3.5.0+ required)",
POSTGIS_GEOS_VERSION, __func__);
PG_RETURN_NULL();
#else /* POSTGIS_GEOS_VERSION >= 35 */
typedef struct
{
int nextgeom;
......@@ -412,7 +402,5 @@ Datum ST_Subdivide(PG_FUNCTION_ARGS)
/* do when there is no more left */
SRF_RETURN_DONE(funcctx);
}
#endif /* POSTGIS_GEOS_VERSION >= 35 */
}
This diff is collapsed.
......@@ -740,13 +740,7 @@ LWGEOM *mvt_geom(LWGEOM *lwgeom, const GBOX *gbox, uint32_t extent, uint32_t buf
double y0 = bgbox.ymin;
double x1 = bgbox.xmax;
double y1 = bgbox.ymax;
#if POSTGIS_GEOS_VERSION < 35
LWPOLY *lwenv = lwpoly_construct_envelope(0, x0, y0, x1, y1);
lwgeom = lwgeom_intersection(lwgeom, lwpoly_as_lwgeom(lwenv));
lwpoly_free(lwenv);
#else
lwgeom = lwgeom_clip_by_rect(lwgeom, x0, y0, x1, y1);
#endif
POSTGIS_DEBUG(3, "mvt_geom: no geometry after clip");
if (lwgeom == NULL || lwgeom_is_empty(lwgeom))
return NULL;
......
......@@ -62,45 +62,10 @@ _PG_init(void)
coreIntHandler = pqsignal(SIGINT, handleInterrupt);
#ifdef WIN32
#if POSTGIS_GEOS_VERSION >= 34
GEOS_interruptRegisterCallback(interruptCallback);
#endif
lwgeom_register_interrupt_callback(interruptCallback);
#endif
#if 0
/* Define custom GUC variables. */
DefineCustomIntVariable(
"postgis.debug.level", /* name */
"Sets the debugging level of PostGIS.", /* short_desc */
"This is an experimental configuration.", /* long_desc */
&postgis_debug_level, /* valueAddr */
0, 8, /* min-max */
0, /* bootValue */
PGC_SUSET, /* GucContext context */
GUC_UNIT_MS, /* int flags */
NULL, /* GucStringCheckHook check_hook */
NULL, /* GucStringAssignHook assign_hook */
NULL /* GucShowHook show_hook */
);
#endif
#if 0
/* Define custom GUC variables. */
DefineCustomStringVariable(
"postgis.greeting.string", /* name */
"Sets the greeting string used on postgis module load.", /* short_desc */
"This is an experimental configuration.", /* long_desc */
&greeting, /* valueAddr */
"Welcome to PostGIS " POSTGIS_VERSION, /* bootValue */
PGC_SUSET, /* GucContext context */
GUC_UNIT_MS, /* int flags */
NULL, /* GucStringCheckHook check_hook */
NULL, /* GucStringAssignHook assign_hook */
NULL /* GucShowHook show_hook */
);
#endif
/* install PostgreSQL handlers */
pg_install_lwgeom_handlers();
......@@ -130,9 +95,7 @@ handleInterrupt(int sig)
*/
/* printf("Interrupt requested\n"); fflush(stdout); */
#if POSTGIS_GEOS_VERSION >= 34
GEOS_interruptRequest();
#endif
/* request interruption of liblwgeom as well */
lwgeom_request_interrupt();
......
......@@ -9,7 +9,6 @@ select 't2', st_asewkt(st_node(
));
-- Node a self-intersecting line
-- NOTE: requires GEOS 3.3.2
-- See http://trac.osgeo.org/geos/ticket/482
select 't3', st_asewkt(st_node(
'SRID=10;LINESTRING(0 0, 10 10, 0 10, 10 0)'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment