<div dir="ltr"><div>Hi Darafei,</div><div><br></div><div>Thanks for your answer!</div><div>I thought about calling `<a href="https://github.com/postgis/postgis/blob/main/liblwgeom/gbox.c#L893:1">gbox_get_sortable_hash</a>` directly before. But the definition of the <a href="https://github.com/postgis/postgis/blob/main/postgis/postgis.sql.in#L781" target="_blank">GiST op class</a>, it seems that the GiST uses `<b>box2df</b>` as a simple representation of geometry types. And all of the other support functions accept `<b>BOX2DF</b>` datum for further process.<br><div><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Can you get the original datum to reuse it?<br></blockquote><div>As of right now, I am unable to locate the API of getting the original `GSERIALIZED` datum. And I will pull the request after more research and some detailed tests.</div><div><br></div><div>If you have any suggestions or questions, please let me know.</div><div><br></div><div>Best regards,</div><div>Han</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 19, 2021 at 6:10 PM Darafei "Komяpa" Praliaskouski <<a href="mailto:me@komzpa.net" target="_blank">me@komzpa.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>There is already exposed gbox_get_sortable_hash. In that function the SRID of geometry is also considered, as the generated Hilbert curve without normalization is very jittery around lat=0 and lon=0 lines, so popular SRIDs are special-cased.<br><br>Can you get the original datum to reuse it?<br><br>Otherwise, please expose whatever you need and get the pull request posted somewhere (I like github). Whether to expose it or move around will be best seen after you get something working on the flamegraph of the index creation.<br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 19, 2021 at 11:29 AM Han Wang <<a href="mailto:hanwgeek@gmail.com" target="_blank">hanwgeek@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>HI all,<br></div><div><br></div><div>Currently, I have to apply only the `<a href="https://github.com/postgis/postgis/blob/b3874ecb488c3e04bcc26f701864a188788c472a/liblwgeom/gbox.c#L815" target="_blank"><b>uint32_hilbert</b></a>` to hash `<b>BOX2DF</b>` objects of geometry data. Would it be okay to include the `uint32_hilbert` function signature in the `liblwgeom.h` for the outside calls?</div><div><br></div><div>Best regards,</div><div>Han</div></div>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr">Darafei "Komяpa" Praliaskouski<br>OSM BY Team - <a href="http://openstreetmap.by/" target="_blank">http://openstreetmap.by/</a><br></div></div>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
</blockquote></div>