[fdo-internals] Where is the .net/C# wrapper for FDO on MS-Windows
??
Kenneth, GEOGRAF A/S
ks at geograf.dk
Tue Apr 1 10:49:46 EDT 2008
Latest FDO downloads are here:
http://fdo.osgeo.org/content/fdo-330-downloads
Download the Windows SDK.
Include the OSGeo.FDO.dll in your application.
I don't know about a tutorial, but you must know how the provider
registry (providers.xml) works.
This is some sample C# code for the FDO and the OGR provider:
OSGeo.FDO.IProviderRegistry r =
OSGeo.FDO.ClientServices.FeatureAccessManager.GetProviderRegistry();
OSGeo.FDO.IConnectionManager cm =
OSGeo.FDO.ClientServices.FeatureAccessManager.GetConnectionManager();
OSGeo.FDO.ClientServices.ProviderCollection pc =
r.GetProviders();
OSGeo.FDO.ClientServices.Provider sp = null;
foreach (OSGeo.FDO.ClientServices.Provider p in pc)
if (p.Name.StartsWith("OSGeo.OGR"))
{
sp = p;
break;
}
if (sp == null)
throw new Exception("No \"OSGeo.OGR\" found, please
correct providers.xml");
OSGeo.FDO.Connections.IConnection source_connection =
cm.CreateConnection(sp.Name);
/*foreach (string s in
source_connection.ConnectionInfo.ConnectionProperties.PropertyNames)
Console.WriteLine("s: " + s); */
source_connection.ConnectionString = @"DataSource=" +
sourcepath + ";ReadOnly=true";
source_connection.Open();
Regards, Kenneth, GEOGRAF A/S
Charly Lebrun skrev:
>
> Hello everyone,
>
> We wish to add FDO to one of our application written in C# to get read
> / write capabilities for geospatial data.
>
> Is there any "how-to", wizard, code samples, etc. to start such a C#
> process ? We digged on the OSGeo and Autodesk web sites but most of
> documentation found is about C++. We also checked the OSGeo mailing
> lists related to FDO.
>
> In particular, is there a C# wrapper for the FDO libraries ? We
> suppose yes because we have read post in the mailing list related to
> this, but we were not able to locate it so far...
>
> Thanks in advance,
>
> Charly
>
>
> _______________________________________________
> fdo-internals mailing list
> fdo-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-internals
More information about the fdo-internals
mailing list