This is a good question.
You can accomplish many of these tasks by using lower level APIs in Map Suite. For example if you have a layer of counties and also a layer of cell phone coverage areas and you want to do spatial analysis so that you split all of the cell phone coverage areas by county then you would do the following. Note that there are many different kinds of spatial analysis and you can accomplish them using low level APIs. On the Layer.QueryTools API you have a number of ways to find related records. Once you convert a Feature to a Shape you can do things like Difference, Intersection, Union, Symetrical Difference etc.
1.Query all of the cell phone coverage polygons using an API like Layer.FeatureSource.GetAllFeatures. This will return all of the cell phone coverage areas.
2.Next you will want to loop through each of these records that are returned.
3.On each loop you will want to query all of the counties that intersect that cell phone area. To do this you can call the CountiesLayer.QueryTools.GetFeaturesIntersecting and pass in as the target the cell phone coverage area feature. This API will return all of the counties that intersect the cell phone coverage area.
4. Now what we need to do is to split the cell phone coverage area by the counties it intersects. To do this we need to convert the Features to shapes so we can perform spatial operation on than. To do this just call the Feature.GetShape and get the shape for the cell phone area and the counties.
5.To do the split we need to call the CountiesShape.Intersection(CellAreaShape). This will give you the intersecting area. Now just loop through the return results of the counties to get all of them.
6.Keep looping through the cell phone coverage area results from step 1 and when you are done you have the new set of features. If you want you can add these to an InMemoryLayer to display on a map. You can also create a new shape file and add these records to create a new permanent map layer.
Below is the pseudo code:
// Init the layers of data
ShapeFileLayer CellPhoneAreasLayer = new ShapeFileLayer(@"C:\DoesNotExist\CellPhoneAreas.shp");
CellPhoneAreasLayer.Open();
ShapeFileLayer USCountiesLayer = new ShapeFileLayer(@"C:\DoesNotExist\USCounties.shp");
USCountiesLayer.Open();
// This collection will hold the results.
Collection<Feature> splitCellPhoneAreas = new Collection<Feature>();
//Get all of the records from the cell area.
Collection<Feature> CellPhoneAreaFeatures = CellPhoneAreasLayer.FeatureSource.GetAllFeatures();
foreach (Feature cellPhoneArea in CellPhoneAreaFeatures)
{
// Cache a shape of the cell areas that will be used in the inner loop.
MultipolygonShape cellPhoneAreaShape = cellPhoneArea.GetShape();
// Find all of the counties that intersect with the cell phone areas.
Collection<Feature> IntersectingCounties = USCountiesLayer.QueryTools.GetFeaturesIntersecting(cellPhoneArea);
foreach (Feature county in IntersectingCounties)
{
//Convert the feature to a shape so we can do spatial operations
MultipolygonShape countyShape = county.GetShape();
// Perform the intersection spatial operation
MultipolygonShape splitCellPhoneAreaShape = countyShape.Intersection(cellPhoneAreaShape);
// Add the new shape to our results.
splitCellPhoneAreas.Add(new Feature(splitCellPhoneAreaShape));
}
}
// Close the layers.
CellPhoneAreasLayer.Close();
USCountiesLayer.Close();
// At the end you have a new collection of the split cell phone areas by county.
Tools like ArcView were designed to to be spatial analysis tools and provide easy to use end user GUI tools. Map Suite in contrast was designed to be a developer tool and provide developers with granular APIs to craft higher end GUI application. We do strive to make things simpler for developers and I will add an issue into our tracking system to make some higher level APIs to streamline this process. If you have specific operations you are having difficulty with please let us know and we can help.
David