<div dir="ltr">Have a look here:<br><br><a href="http://www.paulnorman.ca/blog/2016/05/improve-your-st-geohash-sorting-with-these-three-simple-tricks/">http://www.paulnorman.ca/blog/2016/05/improve-your-st-geohash-sorting-with-these-three-simple-tricks/</a> <br><br>for simplest case, you can just order by your geom field.</div><br><div class="gmail_quote"><div dir="ltr">ср, 1 мар. 2017 г. в 14:44, Jonathan Moules <<a href="mailto:jonathan-lists@lightpear.com">jonathan-lists@lightpear.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u class="gmail_msg"></u><div class="gmail_msg"><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif" class="gmail_msg">Hi List,<br class="gmail_msg">I've got a database of about 60 million spatial features that I need to run through a process.<br class="gmail_msg"><br class="gmail_msg">The process can't do all of them at once, so I want to get the data from postgis in spatial chunks of up to say 500,000 features per query.<br class="gmail_msg"><br class="gmail_msg">The data itself isn't evenly spatially distributed, so gridding won't work either, and  I don't see any prospectively useful functions in the reference.<br class="gmail_msg"><br class="gmail_msg">Non-spatially this would be simple:<br class="gmail_msg"><br class="gmail_msg">    <i class="gmail_msg">SELECT * FROM my_table ORDER BY some_key ASC LIMIT 500000 OFFSET 0</i><br class="gmail_msg">    <br class="gmail_msg">Does anyone have any suggestions for how to spatially order data with PostGIS?<br class="gmail_msg"><br class="gmail_msg">Thanks,<br class="gmail_msg">Jonathan<br class="gmail_msg"></div></div>_______________________________________________<br class="gmail_msg">
postgis-users mailing list<br class="gmail_msg">
<a href="mailto:postgis-users@lists.osgeo.org" class="gmail_msg" target="_blank">postgis-users@lists.osgeo.org</a><br class="gmail_msg">
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div>