private static float EstimateError(Layer batch, IGeometry geometry, BoundingRectangle screenSpaceBounds) { float totalError = 0; foreach (var bound in batch.Overlaps(screenSpaceBounds)) { var overlap = bound.Intersection(screenSpaceBounds); if (!overlap.HasValue) continue; var size = overlap.Value.Max - overlap.Value.Min; totalError += size.X * size.Y; } return totalError; }