[postgis-tickets] r17495 - Back out usage of liblwgeom_internal.h a little more

Paul Ramsey pramsey at cleverelephant.ca
Tue Jun 11 10:31:21 PDT 2019


Author: pramsey
Date: 2019-06-11 10:31:21 -0700 (Tue, 11 Jun 2019)
New Revision: 17495

Modified:
   trunk/liblwgeom/lwgeodetic.h
   trunk/libpgcommon/lwgeom_cache.h
   trunk/libpgcommon/lwgeom_transform.h
   trunk/postgis/geography_measurement_trees.h
   trunk/postgis/lwgeom_functions_basic.c
   trunk/postgis/lwgeom_transform.c
Log:
Back out usage of liblwgeom_internal.h a little more
(MVT usage is problematical...)


Modified: trunk/liblwgeom/lwgeodetic.h
===================================================================
--- trunk/liblwgeom/lwgeodetic.h	2019-06-11 17:27:46 UTC (rev 17494)
+++ trunk/liblwgeom/lwgeodetic.h	2019-06-11 17:31:21 UTC (rev 17495)
@@ -37,10 +37,11 @@
 #define NAN 0.0/0.0
 #endif
 
+/* Override tolerance for geodetic */
 #ifdef FP_TOLERANCE
 #undef FP_TOLERANCE
+#endif
 #define FP_TOLERANCE 1e-14
-#endif
 
 extern int gbox_geocentric_slow;
 

Modified: trunk/libpgcommon/lwgeom_cache.h
===================================================================
--- trunk/libpgcommon/lwgeom_cache.h	2019-06-11 17:27:46 UTC (rev 17494)
+++ trunk/libpgcommon/lwgeom_cache.h	2019-06-11 17:31:21 UTC (rev 17495)
@@ -16,7 +16,7 @@
 #include "postgres.h"
 #include "fmgr.h"
 
-#include "liblwgeom_internal.h"
+#include "liblwgeom.h"
 #include "lwgeodetic_tree.h"
 #include "lwgeom_pg.h"
 

Modified: trunk/libpgcommon/lwgeom_transform.h
===================================================================
--- trunk/libpgcommon/lwgeom_transform.h	2019-06-11 17:27:46 UTC (rev 17494)
+++ trunk/libpgcommon/lwgeom_transform.h	2019-06-11 17:31:21 UTC (rev 17495)
@@ -10,7 +10,8 @@
  **********************************************************************/
 
 #include "postgres.h"
-#include "liblwgeom_internal.h"
+#include "lwgeom_log.h"
+#include "liblwgeom.h"
 #include "lwgeom_pg.h"
 
 

Modified: trunk/postgis/geography_measurement_trees.h
===================================================================
--- trunk/postgis/geography_measurement_trees.h	2019-06-11 17:27:46 UTC (rev 17494)
+++ trunk/postgis/geography_measurement_trees.h	2019-06-11 17:31:21 UTC (rev 17495)
@@ -22,7 +22,8 @@
  *
  **********************************************************************/
 
-#include "liblwgeom_internal.h"
+#include "liblwgeom.h"
+#include "lwgeodetic.h"
 #include "lwgeodetic_tree.h"
 #include "lwgeom_cache.h"
 

Modified: trunk/postgis/lwgeom_functions_basic.c
===================================================================
--- trunk/postgis/lwgeom_functions_basic.c	2019-06-11 17:27:46 UTC (rev 17494)
+++ trunk/postgis/lwgeom_functions_basic.c	2019-06-11 17:31:21 UTC (rev 17495)
@@ -129,13 +129,10 @@
 PG_FUNCTION_INFO_V1(LWGEOM_summary);
 Datum LWGEOM_summary(PG_FUNCTION_ARGS)
 {
+	text *mytext;
 	GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
-	char *result;
-	text *mytext;
-	LWGEOM *lwgeom;
-
-	lwgeom = lwgeom_from_gserialized(geom);
-	result = lwgeom_summary(lwgeom, 0);
+	LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
+	char *result = lwgeom_summary(lwgeom, 0);
 	lwgeom_free(lwgeom);
 
 	/* create a text obj to return */
@@ -1905,7 +1902,7 @@
 {
 	GSERIALIZED *in = PG_GETARG_GSERIALIZED_P(0);
 	LWGEOM *lwgeom = lwgeom_from_gserialized(in);
-	GSERIALIZED *out = geometry_serialize(lwgeom);;
+	GSERIALIZED *out = geometry_serialize(lwgeom);
 	lwgeom_free(lwgeom);
 	PG_FREE_IF_COPY(in, 0);
 	PG_RETURN_POINTER(out);

Modified: trunk/postgis/lwgeom_transform.c
===================================================================
--- trunk/postgis/lwgeom_transform.c	2019-06-11 17:27:46 UTC (rev 17494)
+++ trunk/postgis/lwgeom_transform.c	2019-06-11 17:31:21 UTC (rev 17495)
@@ -31,6 +31,8 @@
 #include "liblwgeom.h"
 #include "lwgeom_transform.h"
 
+#include "float.h" /* DBL_DIG */
+
 Datum transform(PG_FUNCTION_ARGS);
 Datum transform_geom(PG_FUNCTION_ARGS);
 Datum postgis_proj_version(PG_FUNCTION_ARGS);



More information about the postgis-tickets mailing list