wiki:PackageQuestion
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
   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

Linkage

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

  $ldd /usr/lib/postgresql/9.2/lib/postgis-2.0.so | grep geos
	libgeos_c.so.1 => /usr/local/lib/libgeos_c.so.1 (0x00007f73b246c000)
	libgeos-3.3.9dev.so => /usr/local/lib/libgeos-3.3.9dev.so (0x00007f73b1569000)

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

  $ldd `which ogrinfo` | grep geos
	libgeos_c.so.1 => /usr/local/lib/libgeos_c.so.1 (0x00007fd19145d000)
	libgeos-3.3.9dev.so => /usr/local/lib/libgeos-3.3.9dev.so (0x00007fd18da38000)

  $ldd `which gdalinfo` | grep geos
	libgeos_c.so.1 => /usr/local/lib/libgeos_c.so.1 (0x00007f0d60454000)
	libgeos-3.3.9dev.so => /usr/local/lib/libgeos-3.3.9dev.so (0x00007f0d5ca2f000)

  actual libgeos, has naming like this..

  libgeos.so -> libgeos-3.3.9dev.so
  

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/libgeos-3.3.6dev.so
-rwxr-xr-x 1 root root 18199357 Jan 22 12:07 /usr/local/lib/libgeos-3.3.7.so
-rwxr-xr-x 1 root root 18183679 Mar  8 10:58 /usr/local/lib/libgeos-3.3.9dev.so
-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/libgeos_c.la
lrwxrwxrwx 1 root root       18 Mar  8 10:58 /usr/local/lib/libgeos_c.so -> libgeos_c.so.1.7.9
lrwxrwxrwx 1 root root       18 Mar  8 10:58 /usr/local/lib/libgeos_c.so.1 -> libgeos_c.so.1.7.9
-rwxr-xr-x 1 root root  1030668 Oct  1  2012 /usr/local/lib/libgeos_c.so.1.7.6
-rwxr-xr-x 1 root root  1030668 Jan 22 12:07 /usr/local/lib/libgeos_c.so.1.7.7
-rwxr-xr-x 1 root root  1029963 Mar  8 10:58 /usr/local/lib/libgeos_c.so.1.7.9
-rwxr-xr-x 1 root root      956 Mar  8 10:58 /usr/local/lib/libgeos.la
lrwxrwxrwx 1 root root       19 Mar  8 10:58 /usr/local/lib/libgeos.so -> libgeos-3.3.9dev.so

Last modified 11 years ago Last modified on Jun 6, 2013, 9:17:55 PM
Note: See TracWiki for help on using the wiki.