if (spatialIndexes == null || spatialIndexes.size() == 0) {
Debug.message("shape", "MultiShapeLayer: spatialIndexes is empty!");
return new OMGraphicList();
}
Projection projection = getProjection();
if (projection == null) {
// This can happen if the layer is part of a
// ScaleFilterLayer, and the redraw button for this layer
// is pressed before the ScaleFilterLayer gives it a
// projection (which only happens if the layer is the
// active one).
Debug.message("basic", "MultiShapeLayer|" + getName()
+ ": prepare called with null projection");
return new OMGraphicList();
}
LatLonPoint ul = projection.getUpperLeft();
LatLonPoint lr = projection.getLowerRight();
float ulLat = ul.getLatitude();
float ulLon = ul.getLongitude();
float lrLat = lr.getLatitude();
float lrLon = lr.getLongitude();
OMGraphicList masterList = new OMGraphicList();
OMGraphicList list = null;
SpatialIndexHandler sih;
Iterator sii;
// check for dateline anomaly on the screen. we check for
// ulLon >= lrLon, but we need to be careful of the check for
// equality because of floating point arguments...
if (ProjMath.isCrossingDateline(ulLon, lrLon, projection.getScale())) {
if (Debug.debugging("shape")) {
Debug.output("MultiShapeLayer.computeGraphics(): Dateline is on screen");
}
double ymin = (double) Math.min(ulLat, lrLat);