[postgis-tickets] r15526 - ST_Centroid for geography fix uninitialized points issue
Regina Obe
lr at pcorp.us
Sat Aug 5 04:40:50 PDT 2017
Author: robe
Date: 2017-08-05 04:40:50 -0700 (Sat, 05 Aug 2017)
New Revision: 15526
Modified:
trunk/postgis/geography_centroid.c
trunk/regress/geography_centroid_expected
Log:
ST_Centroid for geography fix uninitialized points issue
References #2951
Modified: trunk/postgis/geography_centroid.c
===================================================================
--- trunk/postgis/geography_centroid.c 2017-08-05 11:18:06 UTC (rev 15525)
+++ trunk/postgis/geography_centroid.c 2017-08-05 11:40:50 UTC (rev 15526)
@@ -309,7 +309,7 @@
uint32_t i, ir, ip;
for (ip = 0; ip < mpoly->ngeoms; ip++) {
for (ir = 0; ir < mpoly->geoms[ip]->nrings; ir++) {
- size += mpoly->geoms[ip]->rings[ir]->npoints;
+ size += mpoly->geoms[ip]->rings[ir]->npoints - 1;
}
}
Modified: trunk/regress/geography_centroid_expected
===================================================================
--- trunk/regress/geography_centroid_expected 2017-08-05 11:18:06 UTC (rev 15525)
+++ trunk/regress/geography_centroid_expected 2017-08-05 11:40:50 UTC (rev 15526)
@@ -10,4 +10,4 @@
geog_centroid_sup_line|0101000020E6100000753A468ED7B21CC00371ADA1B0AC4440
geog_centroid_sup_mline|0101000020E61000009809DA1111101440C8CB7BE13F784540
geog_centroid_sup_poly|0101000020E610000032ABE2FEB2DB25407A5DAC8D5A574940
-geog_centroid_sup_mpoly|0101000020E610000028B38B0AF4FFFFFF28B38B0AF4FFFFFF
+geog_centroid_sup_mpoly|0101000020E6100000AA6CB8CF16543C40828564C8CE403940
More information about the postgis-tickets
mailing list