[fdo-users] FDO Usage Questions

Jackie Ng jumpinjackie at gmail.com
Wed Jun 20 07:37:26 PDT 2012

1) Do a DescribeSchema and count the number of Class Definition elements
inside. Or do a GetClassNames and count the number of items. 

Feature Readers are uncountable, you have to spin through the whole reader
to get a total count. Alternatives are (if the provider supports them),
using the Count() aggregate function or executing an IExtendedSelect and
inspect the Count property of the returned scrollable feature reader.

2) The GetClassNames API does not support filtering on class types. Only on
the parent schema name (if one is given). This would actually be a nice FDO
API enhancement to have actually.

3) Geometry properties of Feature Classes are tied to spatial contexts (that
specify the coordinate system and extent). Such filtering would require
fetching the full schema and the spatial context list and walking through
the child Class Definitions for ones that match your desired spatial
context. Not the ideal solution.

4) 4 ways to do it:
 1. The extents of the associated spatial context (may be a static value and
not reliable)
 2. The SpatialExtents() aggregate function (the most reliable. Provider
support varies)
 3. Pass through SQL (provider support varies, syntax would have to be
specific to the provider)
 4. Raw spinning the feature reader (obviously slowest of the lot)

5) Not sure about this one. If the Class Definition is from a DescribeSchema
call, you should be able to interrogate its qualified name. Class
Definitions from other places (eg. A feature reader) are probably computed
so there wouldn't be a qualified name as such.

6) Anything inheriting from FdoIDisposable is a reference counted class,
though I think anything involving the FDO provider registry or the Feature
Access Manager is an exception to this.

7) Given the current constraints of the FDO API, this is probably all you
can do for now.

To be pedantic, ArcSDE isn't exactly a database. It's a middle-man to a
backing RDBMS. So therefore the provider would have to play by the APIs and
abstractions offered by ArcSDE. We can't exactly apply RDBMS-type
optimizations if we have to go through a non-RDBMS middleman.

- Jackie

View this message in context: http://osgeo-org.1560.n6.nabble.com/FDO-Usage-Questions-tp4982701p4982726.html
Sent from the FDO Users mailing list archive at Nabble.com.

More information about the fdo-users mailing list