[postgis-users] Efficient 4D range query
Hermano ...
hermano_lustosa at hotmail.com
Wed May 20 03:29:43 PDT 2015
Thank you for you reply. I am doing this:
select * from myTable where point @ ST_MakeLine(ST_MakePoint(-72,42,0,100), ST_MakePoint(200,200,200,200))
And one row is being returned, even though the point is outside the range. If I define the x and y ranges so the point is outsideits limits then no row is returned. But the z and m ranges are being completed ignored. The @ operator works only in 2D?
> Date: Wed, 20 May 2015 11:02:50 +0200
> From: strk at keybit.net
> To: postgis-users at lists.osgeo.org
> Subject: Re: [postgis-users] Efficient 4D range query
>
> On Wed, May 20, 2015 at 02:18:55AM +0300, Hermano ... wrote:
> > Hello
> > How one can express a 4D range query in Postgis? I would like to know what 4d points lie within a hypercube. This is my table: CREATE TABLE myTable
> > (
> > point geometry,
> > attrib double precision,
> > CONSTRAINT ge_idx PRIMARY KEY (point)
> > );
> > This is how I inserted the data points: insert into myTable (point) values (ST_MakePoint(-71.10, 42.31, 12.43, 54.3));
> >
> > It's trivial to specify a 2D bounding box, but I couldn't find a way to do the same in 4D.
>
> The simplest way to specify ranges in N-D is to write them as linestrings:
>
> ST_MakeLine(
> ST_MakePoint(xmin,ymin,zmin,mmin),
> ST_MakePoint(xmax,ymax,zmax,mmax)
> )
>
> --strk;
>
> () Free GIS & Flash consultant/developer
> /\ http://strk.keybit.net/services.html
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150520/87aeb6cb/attachment.html>
More information about the postgis-users
mailing list