[postgis-users] Spatially ordering data
Rémi Cura
remi.cura at gmail.com
Wed Mar 1 04:11:13 PST 2017
hey,
the most classical approach would be to construct a quad tree
<https://en.wikipedia.org/wiki/Quadtree>.
You can think of it as a grid that adapts its resolution locally according
to the data.
This is also easy to code.
Cheers,
Rémi-C
2017-03-01 12:46 GMT+01:00 Darafei "Komяpa" Praliaskouski <me at komzpa.net>:
> Have a look here:
>
> http://www.paulnorman.ca/blog/2016/05/improve-your-st-
> geohash-sorting-with-these-three-simple-tricks/
>
> for simplest case, you can just order by your geom field.
>
> ср, 1 мар. 2017 г. в 14:44, Jonathan Moules <jonathan-lists at lightpear.com>
> :
>
>> Hi List,
>> I've got a database of about 60 million spatial features that I need to
>> run through a process.
>>
>> 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.
>>
>> 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.
>>
>> Non-spatially this would be simple:
>>
>> *SELECT * FROM my_table ORDER BY some_key ASC LIMIT 500000 OFFSET 0*
>>
>> Does anyone have any suggestions for how to spatially order data with
>> PostGIS?
>>
>> Thanks,
>> Jonathan
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170301/243ed5cd/attachment.html>
More information about the postgis-users
mailing list