[postgis-users] Efficient Way To Get Voronoi Polygons and Matched Points

2017-03-01 Thread Gerard LYNCH
Hello, I'm using postgis2.3 and ST_VoronoiPolygons. I would like to know the best way to do a reverse lookup of sorts to find out which Voronoi polygon maps to which point(s) used in ST_Collect. Currently I'm looping through each of the input points and doing a ST_Within on each of the

Re: [postgis-users] Spatially ordering data

2017-03-01 Thread Travis Kirstine
if you go with Remi suggestion you then can cluster the quad tree index to reorder records http://postgis.net/docs/performance_tips.html On 1 March 2017 at 07:11, Rémi Cura wrote: > hey, > the most classical approach would be to construct a quad tree >

Re: [postgis-users] Spatially ordering data

2017-03-01 Thread Lars Aksel Opsahl
Hi Here https://github.com/larsop/content_balanced_grid is some generic code that you can use for this. The sql below will return a grid that contains max 4000 touching objects pr cell. If there is low density of objects in a area, the cells for that area will be bigger than the cells in a

Re: [postgis-users] Spatially ordering data

2017-03-01 Thread Rémi Cura
hey, the most classical approach would be to construct a quad tree . 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

Re: [postgis-users] Spatially ordering data

2017-03-01 Thread Komяpa
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 : > Hi List, > I've got a database of

[postgis-users] Spatially ordering data

2017-03-01 Thread Jonathan Moules
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