]> granicus.if.org Git - postgis/commitdiff
Remove the code that adds share/contrib/nad to the PROJ.4 search path for PostgreSQL...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Mon, 31 Mar 2008 11:16:54 +0000 (11:16 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Mon, 31 Mar 2008 11:16:54 +0000 (11:16 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2754 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_transform.c

index 4b0deead2faa34635f060d780bf645fa52c8f911..7c966b8a10c9ab9160a709e82893b79dbb283383 100644 (file)
@@ -575,14 +575,19 @@ void DeleteFromPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid)
  * It's main purpose is to allow Win32 PROJ.4 installations
  * to find a set grid shift files, although other platforms
  * may find this useful too.
+ *
+ * Note that we currently ignore this on PostgreSQL < 8.0
+ * since the method of determining the current installation
+ * path are different on older PostgreSQL versions. 
  */
 void SetPROJ4LibPath()
 {
+#if USE_VERSION >= 80
        char *path;
        const char **proj_lib_path;
 
        /* 
-        * Get the sharepath and append /contrib/postgis/nad to form a suitable
+        * Get the sharepath and append /contrib/postgis/proj to form a suitable
         * directory in which to store the grid shift files
         */     
        proj_lib_path = palloc(sizeof(char *));
@@ -590,13 +595,17 @@ void SetPROJ4LibPath()
        *proj_lib_path = path;
 
        get_share_path(my_exec_path, path);
-       strncat(path, "/contrib/postgis/nad", MAXPGPATH - strlen(path) - 1);
+       strncat(path, "/contrib/postgis/proj", MAXPGPATH - strlen(path) - 1);
 
        /* Set the search path for PROJ.4 */
        pj_set_searchpath(1, proj_lib_path);
 
        /* Ensure we only do this once... */
        IsPROJ4LibPathSet = true;
+#else
+       /* Ensure we only do this once... */
+       IsPROJ4LibPathSet = true;
+#endif
 }