read FeatureClass, name

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

read FeatureClass, name

mdelsinne
This post was updated on .
Hello, I would like to recover the features class name of a sdf file. I need to have the name of the feature class and then do a delete feature.

I tried using the command "GetClassName" but he replied that the command is not supported by the provider ("OSGeo.SDF.3.6"), I do not see how? Have you any idea?

thank you
Reply | Threaded
Open this post in threaded view
|

RE: read a FeatureClass

Romica Dascalescu
Hi,

Get class names  (FdoCommandType_GetClassNames) is not supported by SDF in FDO 3.6, is only implemented in FDO 3.7
You still can use describe schema  (FdoCommandType_DescribeSchema) and get the whole schema, look for your class in the schema.
To delete a feature you need to create a delete command (FdoCommandType_Delete).
You can find more how to do it in the unit tests (https://svn.osgeo.org/fdo/trunk/Providers/SDF/Src/UnitTest)

Regards,
Romica

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of mdelsinne
Sent: Thursday, November 03, 2011 10:07 AM
To: [hidden email]
Subject: [fdo-internals] read a FeatureClass

Hello, I would like to recover the features class name of a sdf file. I need to have the name of the feature class and then do a delete feature.

I tried using the command "GetClassName" but he replied that the command is not supported by the provider ("OSGeo.SDF.3.6"), I do not see how? Have you any idea?

thank you

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/read-a-FeatureClass-tp6959138p6959138.html
Sent from the FDO Internals mailing list archive at Nabble.com.
_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Reply | Threaded
Open this post in threaded view
|

RE: read a FeatureClass

mdelsinne
ok, thank's, I work on it.
Reply | Threaded
Open this post in threaded view
|

RE: read a FeatureClass

mdelsinne
it's work:

IDescribeSchema cmdDescriptSchema = conn.CreateCommand(OSGeo.FDO.Commands.CommandType.CommandType_DescribeSchema) as IDescribeSchema;
                       
FeatureSchema myFeatureSchema = cmdDescriptSchema.Execute()[i];
ClassDefinition myFeatureClass = myFeatureSchema.Classes[i];

Thank you