Search Results for

    Show / Hide Table of Contents

    Interface IFeatureReader

    Provides a forward-only, read-only iterator for reading features selected from a feature source

    Inherited Members
    IReader.ReadNext()
    IReader.Close()
    System.IDisposable.Dispose()
    IFeature.ClassDefinition
    IFeature.GetFeatureObject(String)
    IFeature.GetFeatureObject(Int32)
    IRecord.FieldCount
    IRecord.GetName(Int32)
    IRecord.GetFieldType(Int32)
    IRecord.IsNull(String)
    IRecord.IsNull(Int32)
    IRecord.GetBoolean(String)
    IRecord.GetByte(String)
    IRecord.GetBlob(String)
    IRecord.GetClob(String)
    IRecord.GetDouble(String)
    IRecord.GetDateTime(String)
    IRecord.GetInt16(String)
    IRecord.GetInt32(String)
    IRecord.GetInt64(String)
    IRecord.GetSingle(String)
    IRecord.GetString(String)
    IRecord.GetGeometry(String)
    IRecord.GetBoolean(Int32)
    IRecord.GetByte(Int32)
    IRecord.GetBlob(Int32)
    IRecord.GetClob(Int32)
    IRecord.GetDouble(Int32)
    IRecord.GetDateTime(Int32)
    IRecord.GetInt16(Int32)
    IRecord.GetInt32(Int32)
    IRecord.GetInt64(Int32)
    IRecord.GetSingle(Int32)
    IRecord.GetString(Int32)
    IRecord.GetGeometry(Int32)
    IRecord.Item[Int32]
    IRecord.Item[String]
    IRecord.GetPropertyType(String)
    IRecord.GetPropertyType(Int32)
    System.Collections.Generic.IEnumerable<OSGeo.MapGuide.MaestroAPI.Feature.IFeature>.GetEnumerator()
    Namespace: OSGeo.MapGuide.MaestroAPI.Feature
    Assembly: OSGeo.MapGuide.MaestroAPI.dll
    Syntax
    public interface IFeatureReader : IReader, IDisposable, IFeature, IRecord, IEnumerable<IFeature>, IEnumerable
    Remarks
    • You must call ReadNext before you can access the data
    • For each property, determine the property type and then call the appropriate Get<type>() method to get the value of the property.
    • The exception for this is if you are access the value via the indexer. In this case you only need determine the property type when casting from the System.Object that is returned by the indexer
    Examples

    How an IFeatureReader is normally used

        IServerConnection conn = ConnectionProviderRegistry.CreateConnection("Maestro.Http",
            "Username", "Administrator",
            "Password", "admin",
            "Url", "http://localhost/mapguide/mapagent/mapagent.fcgi");
        using (IFeatureReader reader = conn.FeatureService.QueryFeatureSource("Library://Test/Parcels.FeatureSource", "Default:Parcels", null))
        {
            while (reader.ReadNext())
            {
                //Process the current feature
            }
            reader.Close();
        }
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2009 - 2022 Jackie Ng