[SCM] PostGIS branch master updated. 3.6.0rc2-327-gbf36aef0c
git at osgeo.org
git at osgeo.org
Tue Feb 3 16:01:08 PST 2026
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, master has been updated
via bf36aef0ca85b254b8576f0936d377612a4668c0 (commit)
from 875ba8eb1c2782c80ae157e3490790d87470d447 (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 bf36aef0ca85b254b8576f0936d377612a4668c0
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Tue Feb 3 15:35:32 2026 -0800
Allow geohash to round-trip to "geohash to geom" and "geom to geohash"
circuit without getting collapsed.
Applying just to master since a regression test required a change.
Closes #6040
diff --git a/NEWS b/NEWS
index 43c732569..684606d3a 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ xxxx/xx/xx
(old default) to really mean 0 and want -1 (new default) to mean
"use topology precision" (Sandro Santilli)
- #6024, Remove support for PostgreSQL 12 and 13 (Regina Obe)
+ - #6040, ST_GeoHash round trip through ST_GeomFromGeoHash (Paul Ramsey)
* New Features *
diff --git a/liblwgeom/lwalgorithm.c b/liblwgeom/lwalgorithm.c
index 0a467dfb6..2ddc721da 100644
--- a/liblwgeom/lwalgorithm.c
+++ b/liblwgeom/lwalgorithm.c
@@ -812,11 +812,11 @@ int lwgeom_geohash_precision(GBOX bbox, GBOX *bounds)
latwidth = latmax - latmin;
latmaxadjust = lonmaxadjust = latminadjust = lonminadjust = 0.0;
- if ( minx > lonmin + lonwidth / 2.0 )
+ if ( minx >= lonmin + lonwidth / 2.0 )
{
lonminadjust = lonwidth / 2.0;
}
- else if ( maxx < lonmax - lonwidth / 2.0 )
+ else if ( maxx <= lonmax - lonwidth / 2.0 )
{
lonmaxadjust = -1 * lonwidth / 2.0;
}
@@ -833,11 +833,11 @@ int lwgeom_geohash_precision(GBOX bbox, GBOX *bounds)
break;
}
- if ( miny > latmin + latwidth / 2.0 )
+ if ( miny >= latmin + latwidth / 2.0 )
{
latminadjust = latwidth / 2.0;
}
- else if (maxy < latmax - latwidth / 2.0 )
+ else if (maxy <= latmax - latwidth / 2.0 )
{
latmaxadjust = -1 * latwidth / 2.0;
}
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index 76ea65e71..b8b5e345c 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -421,8 +421,8 @@ ERROR: BOX2D_construct: args can not be empty points
#4399|ST_AsX3D|0 0 1 1 0 1
#4399|ST_AsX3D|<IndexedTriangleSet index='0 1 2'><Coordinate point='0 0 1 1 0 1'/></IndexedTriangleSet>
#4399|ST_AsX3D|
-#4399|ST_GeoHash|
-#4399|ST_GeoHash|
+#4399|ST_GeoHash|s00
+#4399|ST_GeoHash|s00
#4399|ST_GeoHash|
#4399|ST_AsGeoJSON|{"type":"Polygon","coordinates":[[[0,0],[1,1],[0,1],[0,0]]]}
#4399|ST_AsGeoJSON|{"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[0,0],[1,1],[0,1],[0,0]]]}]}
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
liblwgeom/lwalgorithm.c | 8 ++++----
regress/core/tickets_expected | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list