champingfor,您好!
forgot to say, my envirment is :
MapGuide Studio 2008
MapGuide Open Source 1.2
VS2005 % .net 2.0
======= 2007-12-12 15:02:53 您在来信中写道:=======
>Hi,All!
>
> I am trying to load sdf2 resource into mapguide server using mapguide
> studio API. My sdf files has a default coordinate system -- LL84, what am
> doing is to override the coordinate system to XY-M. I have noticed that I can
> do it in MapGuide studio 2008 by edit and override it, so this shoule be done
> programmtically.
>
> I have looked into the Autodesk.MapGuide.Studio.Load.dll using
> reflector, there is a variable "coordinateSystemWkt" defined ,which read-get
> by the property "CoordinateSystem" , but I can't find how to used this
> variable or the property where the loadprocedure executed.
>
> Anyone has some idea? Thank's in advance!
>
> My Code goes like that:
>
>
>SdfLoadProcedure sdfLoadProcedure = new SdfLoadProcedure();
>sdfLoadProcedure.SourceFiles.Add(this.textBox3.Text); // my sdf file path
>sdfLoadProcedure.RootPath = "Library://MyTest";
>sdfLoadProcedure.GenerateSpatialDataSources = true;
>sdfLoadProcedure.SpatialDataSourcesFolder = "Data";
>sdfLoadProcedure.SpatialDataSourcesPath = "";
>sdfLoadProcedure.GenerateLayers = true;
>sdfLoadProcedure.LayersFolder = "Layers";
>sdfLoadProcedure.LayersPath = "";
>sdfLoadProcedure.Generalization = 100;
>sdfLoadProcedure.CoordinateSystem = "LOCAL_CS[\"Non-Earth
>(Meter)\",LOCAL_DATUM[\"Local Datum\",0],UNIT[\"Meter\",
>1],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]]"; //** seemed to not work here
>
>sdfLoadProcedure.SdfKeyTreatment = SdfKeyTreatment.AutogenerateAll;
>
>sdfLoadProcedure.Execute(siteConnection);
>
>
>
>
> 致
>礼!
>
>
> champingfor
>[EMAIL PROTECTED]
> 2007-12-12
>---------------------------------
>MapGuide Developer Network(China)
>http://www.mgdn.com.cn
>_______________________________________________
>mapguide-users mailing list
>[email protected]
>http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
= = = = = = = = = = = = = = = = = = = =
致
礼!
champingfor
[EMAIL PROTECTED]
2007-12-12
---------------------------------
MapGuide Developer Network(China)
http://www.mgdn.com.cn
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users