[postgis-devel] ORDER BY semantic on geometries

Sandro Santilli strk at kbt.io
Thu Sep 14 01:43:37 PDT 2017


On Wed, Sep 13, 2017 at 09:54:13AM -0700, Paul Ramsey wrote:
> On Wed, Sep 13, 2017 at 8:32 AM, Sandro Santilli <strk at kbt.io> wrote:

> > I'm trying to use ORDER BY geom <#> ST_MakePoint(-aLot, -aLot) but
> > it seems to fail in weird way when "aLot" is > 1e18 !
> >
> > Look:
> >
> >   SELECT array_agg(ST_Xmin(geom))
> >   FROM ( select geom from city_data.edge_data
> >   ORDER BY geom <#> ST_MakePoint(-1e15, 0) ) foo;
> >
> >   {3,4,9,9,9,9,9,9,17,21,21,21,21,21,25,35,35,35,35,35,36,41,47,47}
> >
> 
> That is worthy of examination. Do you have any SQL  not tied to the
> topology system?

No, but topology is only needed to create the initial tables.
It's not hard to produce those tables, just prefix that query with:

 \i topology/test/load_topology.sql

--strk;



More information about the postgis-devel mailing list