Blog

Posts Tagged ‘2.0’

PostGIS 2.0 Released

Today, after 26 months of development (for comparison, an elephant takes only 22 months to gestate a whole new elephant) PostGIS 2.0 was released!

There are a lot of user-visible changes, but it’s also hard to overstate how much changed under the covers: the storage format, the indexes, the parsers and emitters were all re-written. That is, all the code that formed the initial release of PostGIS back in was swapped out. It’s all fresh and shiny under the hood. Here’s the official release announcement:

The PostGIS development team is super excited,
can hardly believe that they are actually doing this,
aren't maybe even sure that they are ready to make
this kind of commitment, not so young, and not when
we have so much more living to do, but:
PostGIS 2.0.0 is complete and available for download.
The development process for 2.0 has been very long,
but has resulted in a release with a number of exciting
new features.
 * Raster data and raster/vector analysis in the database
 * Topological models to handle objects with shared boundaries
 * PostgreSQL typmod integration, for an automagical
   geometry_columns table
 * 3D and 4D indexing
 * Index-based high performance nearest-neighbour searching
 * Many more vector functions including
   * ST_Split
   * ST_Node
   * ST_MakeValid
   * ST_OffsetCurve
   * ST_ConcaveHull
   * ST_AsX3D
   * ST_GeomFromGeoJSON
   * ST_3DDistance
 * Integration with the PostgreSQL 9.1 extension system
 * Improved commandline shapefile loader/dumper
 * Multi-file import support in the shapefile GUI
 * Multi-table export support in the shapefile GUI
 * A geo-coder optimized for free US Census
   TIGER (2010) data
We are greatly indebted to our large community of beta testers
who valiantly tested PostGIS 2.0.0 and reported bugs so we could
squash them before release time.
And also we want to thank our parents for making PostGIS possible.
Yours,
The PostGIS development team

In addition to all my colleagues on the PostGIS team, I’d like to also thank OpenGeo, who have given me the time to work on PostGIS over the past couple years.
 

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.

It goes up to 2.0

Maybe someday PostGIS will go to 11, but for now, we’re still shooting for 2, point oh. And happily we are getting closer and closer. We have moved to a weekly schedule of alpha releases (this week was alpha3) and have started cleaning down the list of tickets against the 2.0 milestone.

Last month, much of the time spent by me and Sandro Santilli on PostGIS 2.0 preparation was funded by the Humanitarian Information Unit of the US Department of State. So, from the PostGIS development team, and the PostGIS community in general: thanks, HIU! Why is HIU funding PostGIS? Because the kinds of tools that HIU and its partners use for humanitarian response are backed by PostGIS, and they want to see those tools get better. Funding PostGIS development is an economical way to simultaneously raise the capabilities of a whole ecosystem of tools in HIU’s space.