[postgis-tickets] [PostGIS] #4627: ST_HexagonGrid produces overlapping hexagons
PostGIS
trac at osgeo.org
Sat Feb 1 05:08:24 PST 2020
#4627: ST_HexagonGrid produces overlapping hexagons
----------------------+---------------------------
Reporter: dbaston | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.1.0
Component: postgis | Version: master
Resolution: | Keywords:
----------------------+---------------------------
Comment (by Algunenano):
I've modified the PR to change how the coordinates are calculated to use
something like:
`pt.y = origin_u + tile_height * n`
N will hopefully more precise value (an integer or an integer.5), but
what's more important when changing to a different/adjacent tile it will
do the same calculations.
For example cell_j_10 + 0.5 (10.5) should be the same as cell_j_11 - 0.5
(10.5). Technically there could still be some small differences (likely
with floating point numbers), which could be solved by using ints
(everything multiplied by 2, then at the very end transform it to float
and divide it by 2) but I think it's an unlikely scenario.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4627#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list