// Surface: the average of the surface (considers holes)
// MultiSurface: the average of all contained surfaces (considers holes)
if (this instanceof SurfaceImpl ||
this instanceof MultiSurfaceImpl) {
CentroidArea2D ca = new CentroidArea2D(this.crs);
ca.add(this);
return ca.getCentroid();
}
// Missing: CompositePoint, CompositeCurve, CompositeSurface