I have an InMemoryFeatureLayer to store a series of EllipseShape objects.
I want to be able to dynamically alter the height and width of the EllipseShape objects.
I have tried to get each EllipseShape object from the InMemoryFeatureLayer in turn in order to use SetHeight and SetWidth as follows:
EllipseShape range_ring = (EllipseShape)rx_ring_layer.InternalFeatures[rx_entry.Id.ToString()].GetShape();
range_ring.SetHeightByUnit(radius, Map.MapUnit, DistanceUnit.Meter);
range_ring.SetWidthByUnit(radius, Map.MapUnit, DistanceUnit.Meter);
Unfotunately, I get an InvalidCastException as the EllipseShape objects appear to have been stored as PolygonShape objects, despite them being created as follows:
PointShape point = new PointShape(rx_entry.Longitude, rx_entry.Latitude);
if (Map.MapUnit == GeographyUnit.Meter)
point = (PointShape)proj4.ConvertToExternalProjection(point);
rx_ring_layer.InternalFeatures.Add(rx_entry.Id.ToString(), new Feature(new EllipseShape(point, radius)));
Also, I have read the following in the help documentation for GetShape:
This method allows you to get a shape class from a Feature. Because the Feature stores the geometry for itself in well-known binary, it may take some time to generate a shape class if the geometry is complex.
It seems that the way I am going about this is all wrong. As I am new to Map Suite and GIS software in general, I was wondering if anyone could point me in the right direction?