Daniel Morissette joins Planet OSGeo

OSGeo FoundationI’m delighted to announce Daniel Morissette has joined the Planet OSGeo with his very own blog launched recently: Geo Gears, Nuts & Bolts!

In this blog, I talk about open source geospatial software, cool mapping applications and toys… and anything I might find of interest –Daniel

Welcome Daniel!

WOGIS 2010 Conference by OSGeo Poland

OSGeo FoundationTomasz Kubik from OSGeo Polish Chapter announced WOGIS 2010 conference:

This is the second conference on open software organized by the Institute of Geodesy and Geoinformation Science, Wroclaw University of Environmental and Life Sciences, and the Polish Chapter of OSGeo.

Check the WOGIS 2010 conference website for details.

Quick CMake of GEOS

It’s an example of b***dy quick attempt to configure CMake-based build of a fairly large library written in C++ programming language. It is GEOS.

Seven. A lucky number. Arnulf‘s nickname. Total number of lines (commands) of CMake script to configure build of GEOS C++ core as a static library using sources form SVN trunk:

Create trunk/CMakeLists.txt file:

project(geos)
cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
add_subdirectory(src)

Create trunk/src/CMakeLists.txt file:

include_directories(${CMAKE_SOURCE_DIR}/include)
file(GLOB_RECURSE geos_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
add_library(geos STATIC ${geos_SRC})

In fact, only six lines are really required. The third line in file trunk/CMakeLists.txt is optional.

mloskot@dog:~/dev/geos/_svn/trunk$ svn status
?       CMakeLists.txt
?       src/CMakeLists.txt
mloskot@dog:~/dev/geos/_svn/trunk$ mkdir ../build
mloskot@dog:~/dev/geos/_svn/trunk$ cd ../build/
mloskot@dog:~/dev/geos/_svn/build$ cmake ../trunk
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mloskot/dev/geos/_svn/build
mloskot@dog:~/dev/geos/_svn/build$
mloskot@dog:~/dev/geos/_svn/build$ make -j5
Scanning dependencies of target geos
[  0%] Building CXX object src/CMakeFiles/geos_lib.dir/operation/valid/RepeatedPointTester.cpp.o
...

and 53 seconds later my Intel Core 2 Duo 2.4GHz box announces:

[100%] Building CXX object src/CMakeFiles/geos.dir/linearref/LengthIndexOfPoint.cpp.o
Linking CXX static library libgeos.a
[100%] Built target geos

This build configuration is universal and cross platform, thus should work on all platforms supported by CMake.

Simply, you can not afford not use the best cross-platform build system that ever existed :-)

PostGIS 1.5.0 will require GEOS 3.1.0+

PostGIS spatial database extension for PostgreSQLPostGirls and PostBoys, be prepared!

The upcoming release of PostGIS 1.5.0 (available as beta1 beta2) will require GEOS in version 3.1.0 or later.

The beta1 testing results suggested to bump the minimum GEOS version to 3.1.0. The GEOS requirement issue was one of the heavily discussed topics on the postgis-devel this month.

The PostGIS team is going to give GEOS a nice present for its 10th round month birthday.

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.

GDAL meets EDINA

Martin Daly has started posting on A Higher Education with details about use case of GDAL to serve large datasets through Web:

We use GDAL to read the files, and were opening them via GDALOpenShared, so that GDAL only opened the file once and used reference counting to manage the lifetime of the GDALDataset object. Unfortunately (for us) GDAL is not thread safe. This isn’t a criticism, the fault is entirely ours for using it in this way.

Criticism or not, the reality is that we (software developers) have already jumped to an era of parallelism (count number of physical or logical CPUs in your computer) where thread-safety becomes a minimum requirement as basic as avoiding buffer overruns.