public static Feature ToFeature(this EntityGeo entity)
        {
            var type = entity.GetType();

            var attributes = type
                .GetProperties()
                .Where(x => x.PropertyType != typeof(Geometry) && (x.Name != "CreatedAt" && x.Name != "UpdatedAt"))
                .ToDictionary(key => key.Name.Camelize(), value => value.GetValue(entity));

            return new Feature(entity.Geom, new AttributesTable(attributes))
            {
                BoundingBox = entity.Geom.Envelope.EnvelopeInternal
            };
        }
Esempio n. 2
0
 public async Task <EntityGeo> Transform(EntityGeo entityGeo, int wkid)
 {
     entityGeo.EditarGeom(await Transform(entityGeo.Geom, wkid));
     return(entityGeo);
 }