Displaying differences for changeset
 
display as  

gdal-config.txt

@@ -1,4 +1,4 @@
-To install gdal libraries: ubuntu 12.04 & higher:
+To install gdal libraries on Linux: ubuntu 12.04 & higher:
 
 sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
 sudo apt-get update
@@ -12,9 +12,30 @@
 http://www.gisinternals.com/query.html?content=filelist&file=release-1600-x64-gdal-1-11-1-mapserver-6-4-1.zip
  
 Download and install the following Microsoft Installer:
-
 http://download.gisinternals.com/sdk/downloads/release-1600-x64-gdal-1-11-1-mapserver-6-4-1/gdal-111-1600-x64-core.msi
 
 Perform a standard install (will install unused components), or perform a custom install.
 For a custom install only the "Core Components" and the "Utilities","GDAL Utilities" are required.
 
+The necessary components for reading GEO TIFF raster files has been integrated into the csip-rse war file.
+
+These dependencies include:
+gdallocationinfo.exe
+gdall111.dll
+geos.dl
+geos_c.dll
+iconv.dll
+libcurl.dll
+libeay32.dll
+libexpat.dll
+libmysql.dll
+libpq.dll
+openjp2.dll
+proj.dll
+spatiallite.dll
+ssleay32.dll
+xerces-c_2_8.dll
+zlib1.dll
+
+size 30.9 MB, 16 files
+

src/java/m/rse/cfactor/utils/PGTools.java

@@ -338,8 +338,34 @@
     String tifptr = Binaries.unpackResourceAbsolute("/us_cvalues_topo2ras_masked.tif", dataDir + "us_cvalues_topo2ras_masked.tif").toString();
     Binaries.unpackResourceAbsolute("/us_cvalues_topo2ras_masked.tif.aux.xml", dataDir + "us_cvalues_topo2ras_masked.tif.aux.xml").toString();
     logger.info("geotiff=" + tifptr);
+        
+        // Extract GDAL Library for Windows
+        //
+        if (gdal.equals(Const.RSE_DEPLOYMENT_WINDOWS))
+        {
+            Binaries.unpackResourceAbsolute("/gdallocationinfo.exe", dataDir + "gdallocationinfo.exe").toString();
+            Binaries.unpackResourceAbsolute("/gdal111.dll", dataDir + "gdal111.dll").toString();
+            Binaries.unpackResourceAbsolute("/geos.dll", dataDir + "geos.dll").toString();
+            Binaries.unpackResourceAbsolute("/geos_c.dll", dataDir + "geos_c.dll").toString();
+            Binaries.unpackResourceAbsolute("/iconv.dll", dataDir + "iconv.dll").toString();
+            Binaries.unpackResourceAbsolute("/libcurl.dll", dataDir + "libcurl.dll").toString();
+            Binaries.unpackResourceAbsolute("/libeay32.dll", dataDir + "libeay32.dll").toString();
+            Binaries.unpackResourceAbsolute("/libexpat.dll", dataDir + "libexpat.dll").toString();
+            Binaries.unpackResourceAbsolute("/libmysql.dll", dataDir + "libmysql.dll").toString();
+            Binaries.unpackResourceAbsolute("/libpq.dll", dataDir + "libpq.dll").toString();
+            Binaries.unpackResourceAbsolute("/openjp2.dll", dataDir + "openjp2.dll").toString();
+            Binaries.unpackResourceAbsolute("/proj.dll", dataDir + "proj.dll").toString();
+            Binaries.unpackResourceAbsolute("/spatialite.dll", dataDir + "spatialite.dll").toString();
+            Binaries.unpackResourceAbsolute("/ssleay32.dll", dataDir + "ssleay32.dll").toString();
+            Binaries.unpackResourceAbsolute("/xerces-c_2_8.dll", dataDir + "xerces-c_2_8.dll").toString();
+            Binaries.unpackResourceAbsolute("/zlib1.dll", dataDir + "zlib1.dll").toString();
+        }
+        
+        // to do
+        // optionally we might bundle the GDAL files for Linux here as well
 
-        pc.exe = (gdal.equals(Const.RSE_DEPLOYMENT_WINDOWS) ? gdalwinpath : "") + "gdallocationinfo";
+        //pc.exe = (gdal.equals(Const.RSE_DEPLOYMENT_WINDOWS) ? gdalwinpath : "") + "gdallocationinfo";
+        pc.exe = (gdal.equals(Const.RSE_DEPLOYMENT_WINDOWS) ? dataDir : "") + "gdallocationinfo";
     pc.args = new String[]{tifptr, slon, slat, "-wgs84"};
     File workDir = workspacedirectory;
     String sessionWorkDir = workDir.toString();