New GEOS source structure

Following quick announce a few days ago, I started shifting GEOS source code directories to flatten the structure a bit and to separate header files (.h) from implementation files (.cpp).

The whole process is documented as ticket #315 in the GEOS Trac. The transition has been remarkable smooth. The mission accomplished.

I’ve managed to build and successfully test GEOS with the following configurations:

  • GCC 4.4.1 on Ubuntu 9.10 64-bit with 64-bit build target
  • Visual C++ 8.0 on Windows XP Professional 32-bit with build target 32-bit
  • Visual C++ 9.0 on Windows Vista 64-bit (target 32-bit)
  • Visual C++ 10.0 on Windows 7 Professional 64-bit (target 32-bit)

All build configuration should work well. Let me know if any doesn’t.

PostGIS explains DE-9IM

PostGIS spatial database extension for PostgreSQLI am happy I belong to the hordes of PostGIS users. Recently I asked for a very small addition to the PostGIS manual that will explain the three basic terms of the geospatial geometry: interior, boundary and exterior.

Kevin Neufeld delivered a very well written chapter about Dimensionally Extended 9 Intersection Model (DE-9IM) with series of excellent visualisations of the non-trivial mathematics.

PostGIS - Dimensionally Extended 9 Intersection Model (DE-9IM)

Moreover, Kevin started completing the PostGIS Functions Reference with visual presentation of geometric problems together with SQL commands using various PostGIS functions that can be applied to solve particular situations. For example, what does the ST_Buffer function, how boolean predicates like ST_Contains check spatial relation of two geometries or what’s the difference between ST_Difference and ST_SymDifference.

Clearly, I’ve got way way more than I asked for or I expected. On behalf of myself and users who are about to start their adventure with PostGIS, I’d like to give big kudos to Kevin for this fantastic work!

Together with the recently documented PostgreSQL PostGIS Types and Function Support Matrix, PostGIS team is making abrupt manual a pleasant reading book.

By the way, here is a bunch of references about DE-9IM I found very useful myself:

PostGIS Function Support Matrix

PostGIS spatial database extension for PostgreSQLRegina crafted matrix of functions available in upcoming PostGIS 1.5. Currently, PostGIS 1.5 is available from trunk in the Subversion repository.

The PostGIS 1.5 documentation is available under the manual-svn node and here is the PostGIS Function Support Matrix.

Regina, great job!

By the way, there is an interesting problem with check marks. does anyone know how to define check marks based on Unicode and make them visible in IE8?

ST_PostGIS(EMPTY) => ?

PostGIS spatial database extension for PostgreSQL Having problems with understanding semantic of EMPTY geometry?

Paul Ramsey has started wrapping up a proper article on PostGIS Wiki explaining most of the issues related to understanding of emptiness of geometries bothering the community of PostGIS users, and OGC standards users in general.

Check it like it’s hot DevWikiEmptyGeometry. Thanks Paul!

Talking about data races

My countryman Bartosz Milewski – the author of one of the best C++ introductory books – the C++ In Action posted video with very interesting talk about Ownership Systems against Data Races (video is here).

Interestingly, Bartosz proposes to understand the battle with data races as a discipline-driven programming that helps, mostly C+ programmers, to avoid all this horrible pitfalls. Moreover, Bartosz presents programmers with a well-designed methodology based on types system as a tool that may guard programs against injury from data races problem and with success.

Basically (and not surprisingly) Bartosz recommends think first, act later kind of approach based on detailed analysis of what might be causing data races in your program, on identification of potential sources of data race problems. This approach is a contrary to spending hours searching for data races conditions using debugger.

The data race problem is a complex subject, but – in my opinion – Bartosz explains it in a very accessible step-by-step form. Three words summary of Bartosz’ lecture and the presented methodology is: sharing + mutability + no synchronisation = data race

Spatial Relations for Dummies

My friend Jo asked on GEOS mailing list for approachable explanation of spatial relations and Dale Lutz from Safe Software suggested something I’ve not came across myself before and what (in generalised form) I’d consider as a great idea for…a book really :-)

Spatial Relation for Dummies

Crunching overviews

Continuing my tale about loading big raster datasets into PostGIS database with WKT Raster extension, I’d like to post an update about experience with processing overviews.

For testing purposes, I built excessive number of overviews for japan.tif dataset using gdaladdo utility:

$ gdaladdo -r average japan.tif 2 4 8 16 32 64 128

The command above produced 7 overviews with the following dimensions:

$ gdalinfo japan_2_4_8_16_32_128.tif | grep -m 1 Ov
Overviews: 7000x7000, 3500x3500, 1750x1750, 875x875, 438x438, 219x219, 110x110

Continue reading