[postgis-users] 3D spatial index and && 2d operator
Paul Ramsey
pramsey at opengeo.org
Thu Dec 29 13:59:56 PST 2011
Jose,
The &&& operator deals with mismatch dimensionality by projecting the
lower dimension into the zero plane. I'm thinking it would be more
effective if we instead stripped the higher dimensions and did
comparisons in the lower space in the case of mis-matched
dimensionality. I will look and see why that isn't the implemented
behavior.
P.
On Thu, Dec 29, 2011 at 1:49 PM, Jose Carlos Martinez Llario
<jomarlla at cgf.upv.es> wrote:
> Dear list,
>
> Im using PostGIS 2.0 trunk r 8612
>
> In order to use 3d spatial index Im using the &&& operator and its working
> well (thanks Paul) with the following 3d spatial index:
> create index p3d_geom_gist on p3d using gist(geom gist_geometry_ops_nd);
>
> but then I noticed that the 2d && operator is not using the 3d spatial index
> (I confirmed it looking into the postgis.sql file). I can fix it creating a
> second index on the same column like:
> create index p3d_geom_gist2d on p3d using gist(geom);
>
> but it seems to me a waste of resources.
> I could use &&& operator with a huge z range imitating the && operator but I
> dont like too much this solution.
>
> Why the gist_geometry_ops_nd operator is not defining the && operator? I
> guess it is because PostgreSQL can not know which one it should apply.
> Anyways, this is going to be the expected behavior in the PostGIS 2.0 final
> release, I mean should we create two indexes on the same geometry column for
> using && and &&& operators with spatial indexes?
>
> Thanks,
>
> PD: I dont know which is the appropiate list for the trunk PostGIS
> questions, postgis-users or postgis-devel?
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list