Hum first of all I forgot to mention I'm working on SHP files (guess that can change things, as spatial context is only listed as "get spatial context = Y" in provider capabilities)
everything is empty ("") except for name which is "Default"
Here's the code I use
// spatial context
get = (IGetSpatialContexts)connection.CreateCommand(OSGeo.FDO.Commands.CommandType.CommandType_GetSpatialContexts);
screader = get.Execute();
Console.WriteLine("Context Name : " + screader.GetName());
Console.WriteLine("Context Description : " + screader.GetDescription());
Console.WriteLine("Context Coordinate System WKT : " + screader.GetCoordinateSystemWkt());
Console.WriteLine("Context Coordinate System : " + screader.GetCoordinateSystem());
I have only one shp file in the directory, "hawaii.shp" from the internet (I've also tried with
Gavin> thank you, I'll try to investigate this (would you recommend focusing on PROJ.4 or trying teh more recent LIBPROJ4 ?)
I'm using Mapguide Server 6.5 but never had to use its API before (exwcept fo SdfToolkit and MapGuide Viewer). I had found another conversion library (ConversApi.dll) but I can't use it as it requires to write into the registry during runtime.
3. Spin your own solution, using whatever general solution (like PROJ.4) that you have available. You can save time coding access to the FGF content by using a handy example class that sits in GeometryTest.cpp, in the FDO unit test. Look for the GeometryConverter class. You just have to fill in or override the ConvertPosition() methods to call whatever conversion package you choose.
I haven't worked much directly with the components for #1 or #2 above, so hopefully someone else will give more details if one of those fits your case.
are there any ways to convert coordinates from one system to another using FDO ?
(In my case that would be from LAMBERT IIe to WGS84)
By the way I know my files are in this system, but is it possible to detect it using FDO ?
I thought I'd be able to do this by using using OSGeo.FDO.Commands.SpatialContext but I haven't obtained anything else that "Default" in GetName() for my test files ?