Example #1
0
        public static async Task <CatchmentIdentity> Add(this ICatchmentsRepository repository, string name, GeoJsonMultiPolygonJsonString geoJsonMultiPolygonJsonString)
        {
            var catchmentIdentity = CatchmentIdentity.New();

            var catchment = new Catchment()
            {
                Identity = catchmentIdentity,
                Name     = name,
            };

            await repository.Add(geoJsonMultiPolygonJsonString, catchment);

            return(catchmentIdentity);
        }
Example #2
0
        public static async Task <CatchmentIdentity> Add(this ICatchmentsRepository repository, string name, IEnumerable <LngLat> vertices)
        {
            var catchmentIdentity = CatchmentIdentity.New();

            var catchment = new Catchment()
            {
                Identity = catchmentIdentity,
                Name     = name,
            };

            catchment.Boundary.AddRange(vertices);

            await repository.Add(catchment);

            return(catchmentIdentity);
        }