GEOS 3.4 Requirements and Improvements

Maximum Version, Minimum Version, Packaging and Linking, Oh My !

  The GEOS library and C interface are designed in such a way that a client can
  link to a generic C Interface lib (libgeos_c), which then calls a second generic library
  linked by name (libgeos), then finally the actual current version of libgeos.
  With this setup, multiple versions of GEOS can easily sit side by side. PostGIS
  uses this convention to link to GEOS.
  strk> PostGIS links against the geos_c library, which have had 
         the _same_ SONAME since the very beginning

  When does it make sense to declare a MINIMUM version ?
   when entry points are called that are only present in newer versions and above

  When does it make sense to declare a MAXIMUM version ?
   when behavior changes in an incompatible way in a new version, either API 
   breakage or perhaps the results of a common operation like noding

Minimum Version      
  For a long while, features and fixes were just added to the newest GEOS, so
  any client app would just get the newest available GEOS and all is well.

  However, to take advantage of new functionality, clients have to call 
  entry points explicitly. So a *minimum* version has to be declared.
  With PostGIS 2.1, if new GEOS functionality is required, then the 
  *minimum* version might be 3.4.
Maximum Version
  With GEOS 3.4, there is a change in noding algorithm, which could have
  an effect on output. So a client app's results may be different by upgrading to 
  GEOS 3.4. This change may be undesirable, so a *maximum* version could be declared,
  saying in effect, if you want the same reliable output, you must not go above v3.3x.

Packaging  --   IANAP  (I am not a packager ;-)

         / -> GDAL -> PostGIS
 GEOS-> | -> PostGIS
         \ -> QGis

  GDAL is unique in that it is designed to be an extensible collection of drivers.
  Since the tools are command line oriented and open source, I suspect a substantial 
  number of GDAL installs are built from source.
  Not so with PostGIS. I suspect that the vast majority of PostGIS installs are by
  official installers and packages *only*. 
  PostGIS now requires GDAL (for raster). What collection of GDAL drivers are included
  by an installer or package of PostGIS that provides GDAL ?  and what GEOS version?  
  Opinions vary on this situation. User surveys, use case based testing (what others?) are some 
  options to better understand field experience by users. 
(edits welcome)

Misc Background

   GDAL is a suite of tools, including gdal raster tools, and ogr vector tools
   long ago GEOS was optional to build GDAL, and was used only in ogr vector tools
   in practice, ogr tools have required GEOS for some time (years)
   gdal the raster tool now uses GEOS in one place, quoting from #gdal

  EvenR>	alg/gdalcutline.cpp needs GEOS for blend distance support
  QGis 2.0
   is coming out very soon. If there was a time to make a change, this is a good time
   to do that


  For example on a work XUbuntu Linux machine, I get the following output:

  $ldd /usr/lib/postgresql/9.2/lib/ | grep geos => /usr/local/lib/ (0x00007f73b246c000) => /usr/local/lib/ (0x00007f73b1569000)

  $ldd `which qgis` | grep geos
    .... error output about gdal .so versioning => /usr/local/lib/ (0x00007fd19145d000) => /usr/local/lib/ (0x00007fd18da38000)

  $ldd `which ogrinfo` | grep geos => /usr/local/lib/ (0x00007fd19145d000) => /usr/local/lib/ (0x00007fd18da38000)

  $ldd `which gdalinfo` | grep geos => /usr/local/lib/ (0x00007f0d60454000) => /usr/local/lib/ (0x00007f0d5ca2f000)

  actual libgeos, has naming like this.. ->

My own geos libs on XUbuntu at the moment:

dbb@xps-8300:~$ ls -l /usr/local/lib/*geos*
-rwxr-xr-x 1 root root 18178990 Oct  1  2012 /usr/local/lib/
-rwxr-xr-x 1 root root 18199357 Jan 22 12:07 /usr/local/lib/
-rwxr-xr-x 1 root root 18183679 Mar  8 10:58 /usr/local/lib/
-rw-r--r-- 1 root root 49492572 Mar  8 10:58 /usr/local/lib/libgeos.a
-rw-r--r-- 1 root root  2194792 Mar  8 10:58 /usr/local/lib/libgeos_c.a
-rwxr-xr-x 1 root root      979 Mar  8 10:58 /usr/local/lib/
lrwxrwxrwx 1 root root       18 Mar  8 10:58 /usr/local/lib/ ->
lrwxrwxrwx 1 root root       18 Mar  8 10:58 /usr/local/lib/ ->
-rwxr-xr-x 1 root root  1030668 Oct  1  2012 /usr/local/lib/
-rwxr-xr-x 1 root root  1030668 Jan 22 12:07 /usr/local/lib/
-rwxr-xr-x 1 root root  1029963 Mar  8 10:58 /usr/local/lib/
-rwxr-xr-x 1 root root      956 Mar  8 10:58 /usr/local/lib/
lrwxrwxrwx 1 root root       19 Mar  8 10:58 /usr/local/lib/ ->

Last modified 5 years ago Last modified on Jun 6, 2013 9:17:55 PM