Blog

Posts Tagged ‘features’

PostGIS 2.0 New Features: 3D/4D Indexing

Another feature that has received relatively scant attention in the upcoming release is the ability to index in higher dimensions than the usual two.

Initially I had hoped to made n-dimensional indexing the default, so that multi-dimensional indexes would just automagically be available. Unfortunately it turned out that the overhead involved in having a n-dimensional index key caused the index to be slower.

Rather than slow down the standard use case (2D searching), I re-instated fixed two-dimensional indexing as the default for geometry, and added a new N-D index type for those who want the thrill of extra dimensions.

To build an N-D index, use the following CREATE INDEX statement:

CREATE INDEX my_nd_index
ON my_table USING GIST (geom gist_geometry_ops_nd);

To query your N-D index, use the &&& operator (note! three ampersands!), like so:

SELECT * FROM my_table
WHERE geom &&& 'LINESTRING(0 0 0, 2 2 2)';

(“Hey, what’s with the LINESTRING?” Because the index-only query is bounding-volume based, a linestring from the lower-left to the upper-right of my desired bounding volume will have exactly the bounding volume I want.)

Some of the fancy new 3D functions like ST_3DDistance can make use of the 3D index for fast searches in high dimensional spaces. I imagine folks working with XYT data may also find the new indexes useful.

OpenGeo Suite Tour

Our flagship product, the OpenGeo Suite, is tailor-made for system administrators, web developers, and GIS analysts alike. Being many things to different people means that we get a lot of questions from those wondering if the software is right for their organization.

With this feedback, we’ve put together an OpenGeo Suite Tour designed to give you a feel for the product as a whole. In this tour, we hope it will show you how deployment can benefit your work, both in web-based GIS, interoperability with existing systems, the power of open source, and most of all, production-ready software.

Take the OpenGeo Suite Tour