internal static int seekGeometryTransform(esriGeometryType theS, esriGeometryType theD)
{
// acceptable transforms include
// 1 Polygon to Point as Centroid
// 2 Polygon to Polyline as Boundary
// 3 Polyline to Point as MidPoint
// 4 Point to Polygon as Buffer 1
switch (theS)
{
case esriGeometryType.esriGeometryPoint:
if (theD == esriGeometryType.esriGeometryPolygon) { return 4; } // Point to Polygon as Buffer
break;
case esriGeometryType.esriGeometryPolygon:
if (theD == esriGeometryType.esriGeometryPoint) { return 1; } // Polygon to Point as Centroid
if (theD == esriGeometryType.esriGeometryPolyline) { return 2; } // Polygon to Polyline as Boundary
break;
case esriGeometryType.esriGeometryPolyline:
if (theD == esriGeometryType.esriGeometryPoint) { return 3; } // Polyline to Point as Midpoint
break;
}
return -1;
}