public override NychaDevelopmentShape GetFeatureLookup(double x, double y) { // Validate Point is in Range var point = new Point(x, y); var model = new NychaDevelopmentShape(); var features = GetFeatures(); foreach (var f in features) { var exists = f.Geometry.Contains(point); if (exists) { model = new NychaDevelopmentShape { Development = f.Attributes["DEVELOPMEN"].ToString(), TdsNumber = f.Attributes["TDS_NUM"].ToString(), Borough = f.Attributes["BOROUGH"].ToString(), }; } } if (!model.ArePropertiesNotNull()) { return(null); } return(model); }
public IEnumerable <NychaDevelopmentShape> GetFeatureAttributes() { var features = GetFeatures(); var results = new List <NychaDevelopmentShape>(features.Count); foreach (var f in features) { var model = new NychaDevelopmentShape { Development = f.Attributes["DEVELOPMEN"].ToString(), TdsNumber = f.Attributes["TDS_NUM"].ToString(), Borough = f.Attributes["BOROUGH"].ToString(), }; results.Add(model); } return(results); }