[mapguide-users] can maestro create sdf?
mika at digikartta.net
mika at digikartta.net
Thu Dec 12 13:16:29 PST 2013
Yes it can.
It's ICreateDataStore not IApplySchema..
Line 158 ..\MaestroAPITests\ConnectionTestBase.cs
- mika -
mika at digikartta.net kirjoitti 2013-12-12 22:42:
> Hi,
> Maestro 5 and AIMS 2014 again,
> I can create featuresource like this:
>
> IFeatureSource fs =
> ObjectFactory.CreateFeatureSource(this.mgSiteConn, "OSGeo.SDF");
> fs.SetConnectionProperty("File",
> "%MG_DATA_FILE_PATH%zone.sdf");
> fs.SetConnectionProperty("ReadOnly", "FALSE");
> this.resSrvc.SaveResourceAs(fs, dataSourceId);
>
> But this doesn't create the SDF and how could it, I understand that.
> But without knowing how SDF works I thought I could create some sort
> of empty SDF and insert data into it later. I tried to create a
> schema
> for it:
>
> com.IApplySchema cmd =
>
> (com.IApplySchema)this.mgSiteConn.CreateCommand((int)com.CommandType.ApplySchema);
> cmd.Schema = schema;
> cmd.FeatureSourceId = dataSourceId;
> cmd.Execute();
>
> This will crash on excecute.
>
> If I recall right this all was done like this in the MG API:
>
> MgCreateSdfParams sdfParams = new MgCreateSdfParams(string, srs,
> schema);
> featSrvc.CreateFeatureSource(dataSourceId, sdfParams);
>
> How should I implement the same in Maestro API?
>
> - mika -
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list