[postgis-tickets] [SCM] PostGIS branch main updated. 3.1.0rc1-387-g177de9c

git at osgeo.org git at osgeo.org
Thu Aug 5 11:31:44 PDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, main has been updated
       via  177de9ca1c1f4fa6cc57271c5810bcc26ebade84 (commit)
      from  876e74cd8617cd75b79b2708867fcc70ffa75b01 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 177de9ca1c1f4fa6cc57271c5810bcc26ebade84
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Aug 5 20:28:41 2021 +0200

    Run more population functions, support for --nodrop

diff --git a/topology/test/check_multiprocess_topology_population.sh b/topology/test/check_multiprocess_topology_population.sh
index 7a93f1f..c685568 100755
--- a/topology/test/check_multiprocess_topology_population.sh
+++ b/topology/test/check_multiprocess_topology_population.sh
@@ -2,35 +2,79 @@
 
 # TODO: turn to perl ?
 
+KEEPTOPO=0
+
+if test "$1" = "--nodrop"; then
+  KEEPTOPO=1
+fi
+
 export PGOPTIONS='-c client_min_messages=WARNING';
 PSQL_OPTS="-tA"
 
 cleanup() {
-  #echo 'Cleaning up'
-  psql ${PSQL_OPTS} -c "SELECT NULL FROM DropTopology('mt_topo');" | grep -v '^$'
+  echo 'Cleaning up'
+  if test "$KEEPTOPO" = 0; then
+    psql ${PSQL_OPTS} -c "SELECT NULL FROM DropTopology('mt_topo');" | grep -v '^$'
+  fi
+  rm -f pids.$$
 }
 
 trap cleanup EXIT
 
+#psql ${PSQL_OPTS} -c "SELECT NULL FROM DropTopology('mt_topo');" | grep -v '^$'
 psql ${PSQL_OPTS} -c "SELECT NULL FROM CreateTopology('mt_topo')" > /dev/null
 
 # $RANDOM: random integer between 0 and 32767
-for x in `seq 1 4`; do
-  for y in `seq 1 4`; do
-    cat <<EOF | psql ${PSQL_OPTS} | grep -v '^$' &
+for x in `seq 0 10 40`; do
+  for y in `seq 0 10 40`; do
+
+      # Add polygon
+      cat <<EOF | psql ${PSQL_OPTS} | grep -v '^$' &
+SELECT NULL FROM
+    topology.TopoGeo_addPolygon(
+      'mt_topo',
+      ST_Buffer(
+        ST_MakePoint(
+          ${x},
+          ${y}
+        ),
+        8
+      )
+    );
+EOF
+      echo $! >> pids.$$
+
+      # Add horizontal edge
+      cat <<EOF | psql ${PSQL_OPTS} | grep -v '^$' &
+SELECT NULL FROM
+    topology.TopoGeo_addLineString(
+      'mt_topo',
+       ST_MakeLine(
+         ST_MakePoint(
+            ${x} - 6,
+            ${y} + 1
+         ),
+         ST_MakePoint(
+            ${x} + 6,
+            ${y} + 1
+         )
+      )
+    );
+EOF
+      echo $! >> pids.$$
+
+      # Add isolated node in the middle of the polygon added before
+      cat <<EOF | psql ${PSQL_OPTS} | grep -v '^$' &
 SELECT NULL FROM
-  topology.TopoGeo_addPolygon(
-    'mt_topo',
-    ST_Buffer(
-      ST_MakePoint(
-        ${x} ,
-        ${y}
-      ),
-      10000
-    )
-  )
+    topology.TopoGeo_addPoint(
+      'mt_topo',
+       ST_MakePoint(
+          ${x},
+          ${y}
+       )
+    );
 EOF
-    echo $! >> pids.$$
+      echo $! >> pids.$$
   done
 done
 
@@ -41,5 +85,7 @@ done
 rm -f pids.$$
 
 psql ${PSQL_OPTS} -c "SELECT TopologySummary('mt_topo')" | grep -v '^$'
-psql ${PSQL_OPTS} -c "SELECT 'INVALIDITY', * FROM ValidateTopology('mt_topo')" | grep -v '^$'
+echo "-- INVALIDITIES START --"
+psql ${PSQL_OPTS} -c "SELECT * FROM ValidateTopology('mt_topo')" | grep -v '^$'
+echo "-- INVALIDITIES END --"
 

-----------------------------------------------------------------------

Summary of changes:
 .../test/check_multiprocess_topology_population.sh | 80 +++++++++++++++++-----
 1 file changed, 63 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list