[postgis-commits] svn - r2754 - trunk/lwgeom

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Mon Mar 31 04:16:59 PDT 2008


Author: mcayland
Date: 2008-03-31 04:16:54 -0700 (Mon, 31 Mar 2008)
New Revision: 2754

Modified:
   trunk/lwgeom/lwgeom_transform.c
Log:
Remove the code that adds share/contrib/nad to the PROJ.4 search path for PostgreSQL < 8.0 since the mechanism for determining the path has changed from earlier versions, and this was mainly for Win32 users. Also rename nad/ directory to proj/ to keep it inline with an existing PROJ.4 installation.

Modified: trunk/lwgeom/lwgeom_transform.c
===================================================================
--- trunk/lwgeom/lwgeom_transform.c	2008-03-30 19:38:42 UTC (rev 2753)
+++ trunk/lwgeom/lwgeom_transform.c	2008-03-31 11:16:54 UTC (rev 2754)
@@ -575,14 +575,19 @@
  * 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 @@
 	*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
 }
 
 



More information about the postgis-commits mailing list