コード例 #1
0
        public static AppTypeGeoJson ToAppTypeGeoJson(this EntityType entityType)
        {
            var appType = new AppTypeGeoJson()
            {
                Identity = CatchmentIdentity.From(entityType.Identity),
                Name     = entityType.Name,
                MultiPolygonGeoJsonText = (entityType.Boundary as MultiPolygon).ToGeoJsonMultiPolygonJsonString(),
            };

            return(appType);
        }
コード例 #2
0
        public static EntityType ToEntityType(this AppType appType, IGeometryFactory geometryFactory)
        {
            var polygon = appType.Boundary.ToPolygon(geometryFactory);

            var entity = new EntityType()
            {
                Identity = appType.Identity.Value,
                Name     = appType.Name,
                Boundary = polygon,
            };

            return(entity);
        }
コード例 #3
0
        public static AppType ToAppType(this EntityType entityType)
        {
            var appType = new AppType()
            {
                Identity = CatchmentIdentity.From(entityType.Identity),
                Name     = entityType.Name,
            };

            var lngLats = entityType.Boundary.ToLngLats();

            appType.Boundary.AddRange(lngLats);

            return(appType);
        }