Exemple #1
0
        /// <inheritdoc/>
        public DataTable GetSchemaTable()
        {
            // FeatureTable automatically has a long FID and binary Geometry.
            FeatureTable result = new FeatureTable();

            foreach (Field field in _attributeTable.Columns)
            {
                if (Fields != null && Fields.Length > 0)
                {
                    // only include desired fields in our output schema.
                    if (!Fields.Contains(field.ColumnName))
                    {
                        continue;
                    }
                }
                result.Columns.Add(field.ColumnName, field.DataType);
            }
            return(result);
        }
Exemple #2
0
        private int GetFieldCount()
        {
            if (_attributeTable == null)
            {
                return(2);
            }
            int count = 2;

            foreach (Field field in _attributeTable.Columns)
            {
                if (Fields != null && Fields.Length > 0)
                {
                    // only include desired fields in our output schema.
                    if (Fields.Contains(field.ColumnName))
                    {
                        count++;
                    }
                }
            }
            return(count);
        }