[fdo-commits] r749 - in branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS: . Driver

svn_fdo at osgeo.org svn_fdo at osgeo.org
Wed Feb 14 17:35:16 EST 2007


Author: brentrobinson
Date: 2007-02-14 17:35:16 -0500 (Wed, 14 Feb 2007)
New Revision: 749

Added:
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Driver/geom_srid.c
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Driver/geom_srid.h
Modified:
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/PostGIS.sln
Log:
Added geom_srid

Added: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Driver/geom_srid.c
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Driver/geom_srid.c	                        (rev 0)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Driver/geom_srid.c	2007-02-14 22:35:16 UTC (rev 749)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2004-2006  Autodesk, Inc.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser
+ * General Public License as published by the Free Software Foundation.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+#include "stdafx.h"
+#include "local.h"
+
+int postgis_geom_srid_set ( 
+	postgis_context_def	*context,
+    char   *cursor,                     /* cursor associated with SQL stmnt */
+	char	*geom_col_name,
+    long srid ) 
+{
+    postgis_cursor_def    *curs;
+	int index;
+    int                 rc = RDBI_SUCCESS;
+
+// TODO - convert this code from MySQL driver
+#if 0
+	if (context->mysql_current_connect == -1)
+        rc = RDBI_NOT_CONNECTED;
+    else
+    {
+        curs = (mysql_cursor_def*)cursor;
+        if (curs != (mysql_cursor_def*)NULL)
+		{
+			index = atoi (geom_col_name); /* numeric position */
+            /* need an error if columns have not been bound yet */
+            if (index <= 0 || curs->bind_count < index)
+                rc = RDBI_GENERIC_ERROR; /* need an error for unknown name */
+            else
+            {
+                index--; /* make it zero based */
+				if (curs->srids != (int*)NULL)
+					curs->srids[index] = (int)srid;
+			}
+		}
+	}
+#endif    
+    return rc;
+}

Added: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Driver/geom_srid.h
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Driver/geom_srid.h	                        (rev 0)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Driver/geom_srid.h	2007-02-14 22:35:16 UTC (rev 749)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2004-2006  Autodesk, Inc.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser
+ * General Public License as published by the Free Software Foundation.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifndef GEOM_SRID_H
+#define GEOM_SRID_H
+
+#ifdef _WIN32
+#pragma once
+#endif // _WIN32
+
+#include "local.h"
+
+int postgis_geom_srid_set ( 
+	postgis_context_def	*context,
+    char   *cursor,                     /* cursor associated with SQL stmnt */
+	char	*geom_col_name,
+    long srid ) ;
+
+#endif // GEOM_SRID_H

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/PostGIS.sln
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/PostGIS.sln	2007-02-14 22:34:26 UTC (rev 748)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/PostGIS.sln	2007-02-14 22:35:16 UTC (rev 749)
@@ -48,8 +48,8 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostGIS", "PostGIS.vcproj", "{DFC59C58-1267-42A0-A8EE-4E4FC19040B7}"
 	ProjectSection(ProjectDependencies) = postProject
+		{69D1E6E5-9391-40FE-A989-B9BEBE3EE305} = {69D1E6E5-9391-40FE-A989-B9BEBE3EE305}
 		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F} = {2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}
-		{69D1E6E5-9391-40FE-A989-B9BEBE3EE305} = {69D1E6E5-9391-40FE-A989-B9BEBE3EE305}
 		{86921DDB-715C-4E22-A107-41108E2D4FBB} = {86921DDB-715C-4E22-A107-41108E2D4FBB}
 		{29CDD5C2-B733-4B6A-B92A-FD3DCD0D57B5} = {29CDD5C2-B733-4B6A-B92A-FD3DCD0D57B5}
 		{A97744C0-DCC5-4D58-91B5-7DB006BD40C1} = {A97744C0-DCC5-4D58-91B5-7DB006BD40C1}
@@ -127,14 +127,17 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SmMessage", "%FDOUTILITIES%\SchemaMgr\SmMessage.vcproj", "{11793E23-75E5-4407-AF82-BE0FC6994EBD}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTestPostGIS", "..\UnitTest\UnitTestPostGIS.vcproj", "{D2EF6A19-4817-4978-8D61-066A694A6A34}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Gdbi", "Custom\Gdbi\Gdbi.vcproj", "{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTestPostGIS", "..\UnitTest\PostGis\UnitTestPostGIS.vcproj", "{D2EF6A19-4817-4978-8D61-066A694A6A34}"
 	ProjectSection(ProjectDependencies) = postProject
+		{C4BAD553-2752-4D33-8505-8332781E27E0} = {C4BAD553-2752-4D33-8505-8332781E27E0}
 		{DFC59C58-1267-42A0-A8EE-4E4FC19040B7} = {DFC59C58-1267-42A0-A8EE-4E4FC19040B7}
-		{C4BAD553-2752-4D33-8505-8332781E27E0} = {C4BAD553-2752-4D33-8505-8332781E27E0}
+		{001B698F-66FF-4486-AD57-53318CF47A4A} = {001B698F-66FF-4486-AD57-53318CF47A4A}
+		{86921DDB-715C-4E22-A107-41108E2D4FBB} = {86921DDB-715C-4E22-A107-41108E2D4FBB}
+		{69D1E6E5-9391-40FE-A989-B9BEBE3EE305} = {69D1E6E5-9391-40FE-A989-B9BEBE3EE305}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Gdbi", "Custom\Gdbi\Gdbi.vcproj", "{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}"
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -373,6 +376,18 @@
 		{11793E23-75E5-4407-AF82-BE0FC6994EBD}.ReleaseDynamic|Win32.Build.0 = Release|Win32
 		{11793E23-75E5-4407-AF82-BE0FC6994EBD}.ReleaseOra|Win32.ActiveCfg = Release|Win32
 		{11793E23-75E5-4407-AF82-BE0FC6994EBD}.ReleaseOra|Win32.Build.0 = Release|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.Debug|Win32.Build.0 = Debug|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.DebugDynamic|Win32.ActiveCfg = Debug|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.DebugDynamic|Win32.Build.0 = Debug|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.DebugOra|Win32.ActiveCfg = Debug|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.DebugOra|Win32.Build.0 = Debug|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.Release|Win32.ActiveCfg = Release|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.Release|Win32.Build.0 = Release|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.ReleaseDynamic|Win32.ActiveCfg = Release|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.ReleaseDynamic|Win32.Build.0 = Release|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.ReleaseOra|Win32.ActiveCfg = Release|Win32
+		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.ReleaseOra|Win32.Build.0 = Release|Win32
 		{D2EF6A19-4817-4978-8D61-066A694A6A34}.Debug|Win32.ActiveCfg = Debug|Win32
 		{D2EF6A19-4817-4978-8D61-066A694A6A34}.Debug|Win32.Build.0 = Debug|Win32
 		{D2EF6A19-4817-4978-8D61-066A694A6A34}.DebugDynamic|Win32.ActiveCfg = Debug|Win32
@@ -385,18 +400,6 @@
 		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseDynamic|Win32.Build.0 = Release|Win32
 		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseOra|Win32.ActiveCfg = Release|Win32
 		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseOra|Win32.Build.0 = Release|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.Debug|Win32.ActiveCfg = Debug|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.Debug|Win32.Build.0 = Debug|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.DebugDynamic|Win32.ActiveCfg = Debug|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.DebugDynamic|Win32.Build.0 = Debug|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.DebugOra|Win32.ActiveCfg = Debug|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.DebugOra|Win32.Build.0 = Debug|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.Release|Win32.ActiveCfg = Release|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.Release|Win32.Build.0 = Release|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.ReleaseDynamic|Win32.ActiveCfg = Release|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.ReleaseDynamic|Win32.Build.0 = Release|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.ReleaseOra|Win32.ActiveCfg = Release|Win32
-		{2D1B39E1-0ED4-48B4-BD94-FC1AA67AE15F}.ReleaseOra|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE



More information about the fdo-commits mailing list