[postgis-tickets] r14362 - back to using geography_gserialized, but don't add box (gserialized does that)

Regina Obe lr at pcorp.us
Fri Nov 6 09:57:20 PST 2015


Author: robe
Date: 2015-11-06 09:57:20 -0800 (Fri, 06 Nov 2015)
New Revision: 14362

Modified:
   trunk/postgis/geography_inout.c
   trunk/postgis/geography_measurement.c
Log:
back to using geography_gserialized, but don't add box (gserialized does that)
(but we must still set geodetic for some ungodly reason)
references #3355 references #3356

Modified: trunk/postgis/geography_inout.c
===================================================================
--- trunk/postgis/geography_inout.c	2015-11-06 15:05:26 UTC (rev 14361)
+++ trunk/postgis/geography_inout.c	2015-11-06 17:57:20 UTC (rev 14362)
@@ -600,10 +600,12 @@
 
 	/* force recalculate of box by dropping */
 	lwgeom_drop_bbox(lwgeom);
-	
-	g_ser = gserialized_geography_from_lwgeom(lwgeom, -1);
 
+	lwgeom_set_geodetic(lwgeom, true);	
+	/* We are trusting geography_serialize will add a box for us if needed */	
+	g_ser = geography_serialize(lwgeom);
 
+
 	lwgeom_free(lwgeom);
 
 	PG_FREE_IF_COPY(geom, 0);

Modified: trunk/postgis/geography_measurement.c
===================================================================
--- trunk/postgis/geography_measurement.c	2015-11-06 15:05:26 UTC (rev 14361)
+++ trunk/postgis/geography_measurement.c	2015-11-06 17:57:20 UTC (rev 14362)
@@ -1092,8 +1092,8 @@
 	
 	/* Recalculate the boxes after re-setting the geodetic bit */
 	lwgeom_drop_bbox(lwgeom2);
-	lwgeom_add_bbox(lwgeom2);
 	
+	/* We are trusting geography_serialize will add a box if needed */	
 	g2 = geography_serialize(lwgeom2);
 	
 	/* Clean up */



More information about the postgis-tickets mailing list