private IFeatureBuffer SetFLine2Feature(IFeatureBuffer fb, FLine_AREAWATER model, long lineNum) { fb.Shape = model.WKT.ToGeometry(spatialReference);; #region fieldIndex = fields.FindField("ALAND"); if (fieldIndex >= 0) { fb.Value[fieldIndex] = model.ALAND; } fieldIndex = fields.FindField("ANSICODE"); if (fieldIndex >= 0) { fb.Value[fieldIndex] = model.ANSICODE; } fieldIndex = fields.FindField("AWATER"); if (fieldIndex >= 0) { fb.Value[fieldIndex] = model.AWATER; } fieldIndex = fields.FindField("FULLNAME"); if (fieldIndex >= 0) { fb.Value[fieldIndex] = model.FULLNAME; } fieldIndex = fields.FindField("HYDROID"); if (fieldIndex >= 0) { fb.Value[fieldIndex] = model.HYDROID; } fieldIndex = fields.FindField("INTPTLAT"); if (fieldIndex >= 0) { fb.Value[fieldIndex] = model.INTPTLAT; } fieldIndex = fields.FindField("INTPTLON"); if (fieldIndex >= 0) { fb.Value[fieldIndex] = model.INTPTLON; } fieldIndex = fields.FindField("MTFCC"); if (fieldIndex >= 0) { fb.Value[fieldIndex] = model.MTFCC; } fieldIndex = fields.FindField("ID"); if (fieldIndex >= 0) { fb.Value[fieldIndex] = lineNum; } #endregion return(fb); }
private FLine_AREAWATER Line2Model(FLine_AREAWATER FModel, string[] line) { FModel.WKT = line[0]; FModel.ANSICODE = line[1]; FModel.HYDROID = line[2]; FModel.FULLNAME = line[3]; FModel.MTFCC = line[4]; FModel.ALAND = line[5]; FModel.AWATER = line[6]; FModel.INTPTLAT = line[7]; FModel.INTPTLON = line[8]; return(FModel); }