[mapguide-users] Coordinate system transformation
Kenneth Skovhede, GEOGRAF A/S
ks at geograf.dk
Tue Sep 1 05:29:59 EDT 2009
For some reason, your FeatureSource does not have a spatial context.
I don't know how to fix this with Oracle, but for other providers, it is
not unusual that they lack spatial context.
Regards, Kenneth Skovhede, GEOGRAF A/S
mighty_duck skrev:
> Hello,
>
> Im having next problems during performing coordinate system transformation:
>
> Here is the code
>
> MgSpatialContextReader context;
> context =
> featureService1.GetSpatialContexts(layerFeatureResources1, true);
>
> context.ReadNext();
> string coordSys = context.GetCoordinateSystemWkt();
>
> MgCoordinateSystemFactory coordSysFac = new
> MgCoordinateSystemFactory();
>
> MgCoordinateSystem cs;
> cs = coordSysFac.Create(coordSys);
>
> string mapCoordSys = map1.GetMapSRS();
> MgCoordinateSystem csNew;
> csNew = coordSysFac.Create(mapCoordSys);
>
> MgCoordinateSystemTransform coordSysTransf;
> coordSysTransf = coordSysFac.GetTransform(cs, csNew);
>
>
> Problem starts at context object (second line) where I recieve
> exception "index is out of the range".
>
> Does anyone know what can be a problem? Im using Oracle as data source!!!
>
> thanks in advance
>
> regards
>
More information about the mapguide-users
mailing list