How to figure out the metadata types

Apr 29, 2011 at 10:09 PM

The project returns the values of the metadata, but it does not return the type (i.e integer or string).  Is there a way to do this?

Apr 30, 2011 at 12:37 AM

No, you need to know (or deduce) the type and convert it as needed. 

Jan 18, 2012 at 7:01 PM

A simple fix/improvement would be to replace the StringDictionary metaData in in the base Shape class with a reference to the System.Data.IDataRecord derived from the DbDataReader in the ShapeFile class.

The Shape.GetMetadata() and Shape.GetMetadatanames() methods would be replaced with a System.Data.IDataRecord "Attributes" property.

This would provide a performance improvement because all the attributes would not need to be unnecessarily parsed and converted to String with every read of the Enumerator,

Also, The code accessing the Shape descendant would have access to the underlying type metadata AND ordinal, typed access to the underlying values. Another performance gain.


Jan 28, 2012 at 3:53 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.