[FWTools] Import Shape file using ogr2ogr into MySQL VS - C# /
CSharp
Tamas Szekeres
szekerest at gmail.com
Mon Aug 18 06:55:36 EDT 2008
Hi,
You can see a couple of example along with the sources in the
/csharp/apps directory
http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps
The related wiki can be found here:
http://trac.osgeo.org/gdal/wiki/GdalOgrInCsharp
Best regards,
Tamas
2008/8/18 Bilal Kilic <bilal at geoinformatics.de>:
> Hi all,
>
>
> I develop a Win-App and the last step is to import the Shapefile
> (exmple.shp) into an existing MySQL Database. At this moment i
> use following C#-code and it works fine:
>
> ---------------
> string appPath = @"C:\Program Files\FWTools2.2.1\bin\ogr2ogr.exe";
> string appArgs = " -f MySQL MySQL:myDB,user=root,password=xxx D:\\ex.shp
> -nln ex -update -append -nlt GEOMETRY";
>
> Process ogrProcess = new Process();
> ogrProcess.StartInfo.FileName = appPath;
> ogrProcess.StartInfo.Arguments = appArgs;
>
> ogrProcess.StartInfo.UseShellExecute = false;
> ogrProcess.StartInfo.CreateNoWindow = true;
> ogrProcess.StartInfo.RedirectStandardOutput = true;
>
> ogrProcess.Start();
> ogrProcess.WaitForExit();
>
> string Result = ogrProcess.StandardOutput.ReadToEnd();
> ---------------
>
> But I think this is not a fancywork. Now I see in the
> FW-Tools Software *.dll's for developing with VS-C#.
> But i don't now how I can use this. The existing
> examples don't help me and Master Google say nothing about
> c# and FW-Tools...
>
> Has somebody an example for realizing this? Or a Link to
> an existing examples?
>
>
> TU.
>
> King Regards...
>
>
> Bilal.
>
>
>
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/
>
More information about the FWTools
mailing list