[postgis-tickets] [SCM] PostGIS branch main updated. 3.1.0rc1-401-g4ffb70a

git at osgeo.org git at osgeo.org
Fri Aug 13 06:58:08 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  4ffb70ab4c05776a0be70ecfd98e5d26f33e6d00 (commit)
      from  497e63d0a4d224c0fd1573747d91a6acf70213c3 (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 4ffb70ab4c05776a0be70ecfd98e5d26f33e6d00
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri Aug 13 15:57:45 2021 +0200

    Drop conditional on PostgreSQL 9.5 as we're not supporting it anyway

diff --git a/topology/postgis_topology.c b/topology/postgis_topology.c
index 9f0756d..1524461 100644
--- a/topology/postgis_topology.c
+++ b/topology/postgis_topology.c
@@ -3005,20 +3005,9 @@ cb_getClosestEdge( const LWT_BE_TOPOLOGY* topo, const LWPOINT* pt, uint64_t *num
   initStringInfo(sql);
 
 
-  /* TODO: avoid executing ST_ShortestLine twice (to be confirmed it
-   *       if it is called twice
-   */
   appendStringInfoString(sql, "SELECT ");
   addEdgeFields(sql, fields, 0);
-  appendStringInfo(sql, " FROM \"%s\".edge_data ORDER BY ", topo->name);
-
-#if POSTGIS_PGSQL_VERSION < 95
-  appendStringInfo(sql, "ST_Length(ST_ShortestLine(geom, $1))");
-#else
-  appendStringInfo(sql, "geom <-> $1");
-#endif
-
-  appendStringInfo(sql, " ASC, edge_id ASC LIMIT 1");
+  appendStringInfo(sql, " FROM \"%s\".edge_data ORDER BY geom <-> $1 ASC, edge_id ASC LIMIT 1", topo->name);
 
   POSTGIS_DEBUGF(1, "cb_getClosestEdge query: %s", sql->data);
 

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

Summary of changes:
 topology/postgis_topology.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list