Here I want the midpoint of every polyline and add that point to List.
List<IPoint> pList = new ArrayList<IPoint>();
Polyline polyline = null;
IPoint point = null;
for(int i=0;i<pFeatureLayerList.size();i++)
{
IFeatureClass pFeatureClass = pFeatureLayerList.get(i).getFeatureClass();
int numFeatures = pFeatureClass.featureCount(null);
if(pFeatureClass.getShapeType()==com.esri.arcgis.geometry.esriGeometryType.esriGeometryPolyline)
{
for(int j=0; j<numFeatures; j++)
{
IFeature pFeature = pFeatureClass.getFeature(j);
polyline = (Polyline)pFeature.getShape();
point = polyline.getCentroidEx();
pList.add(point);
}
}
}
n / 2
-position of the corresponding pointlist. If the latter how would you handle multipart-geometries?