[postgis-devel] Z-order implementation from PostgreSQL

Darafei "Komяpa" Praliaskouski me at komzpa.net
Wed Jun 2 08:11:09 PDT 2021


Hello,

The correct way to implement that would be to borrow the compare function
that already exists in postgis (
https://github.com/postgis/postgis/blob/master/liblwgeom/gserialized.c#L313:5)
and already sorts everything in a nice Hilbert curve. All of the type
punning is already there.

On Wed, Jun 2, 2021 at 6:04 PM Han Wang <hanwgeek at gmail.com> wrote:

> Hi all,
>
> I am currently working on the GSoC project of `*Implementating a
> pre-sorting methods before GiST index building*` and now try to borrow
> some ideas from z-order implementation
> <https://github.com/postgres/postgres/blob/master/src/backend/access/gist/gistproc.c#L1761>
> in Postgres.
> I am wondering, however, if I should use lower level postgres functions
> like `*point_zorder_internal
> <https://github.com/postgres/postgres/blob/master/src/backend/access/gist/gistproc.c#L1576>*`
> and `*ieee_float32_to_uint32*
> <https://github.com/postgres/postgres/blob/master/src/backend/access/gist/gistproc.c#L1604>`
> and data structure like `*BOX
> <https://github.com/postgres/postgres/blob/master/src/include/utils/geo_decls.h#L140>*
> `.
> What's more, I don't know if it is necessary to implement a util function `
> *ieee_float32_to_uint32*` in lwgeom.
>
> I appreciate your ideas and suggestions. Feel free to talk to me.
>
> Best regards,
> Han
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
>


-- 
Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20210602/2a55d54b/attachment.html>


More information about the postgis-devel mailing list