if (this.cache == null) {
Debug.message("rpf", getName() + "|RpfLayer: Creating cache!");
this.cache = new RpfCacheManager(frameProvider, viewAttributes, subframeCacheSize, auxSubframeCacheSize);
}
Projection projection = getProjection();
if (coverage != null && coverage.isInUse()) {
coverage.prepare(frameProvider,
projection,
viewAttributes.chartSeries);
}
// Check to make sure the projection is CADRG
if (!(projection instanceof EqualArc)
&& (viewAttributes.showMaps || viewAttributes.showInfo)) {
fireRequestInfoLine("RpfLayer requires an Equal Arc projection (CADRG/LLXY) for images or attributes!");
return null;
}
Debug.message("basic", getName() + "|RpfLayer.prepare(): doing it");
// Setting the OMGraphicsList for this layer. Remember, the
// OMGraphicList is made up of OMGraphics, which are generated
// (projected) when the graphics are added to the list. So,
// after this call, the list is ready for painting.
// call getRectangle();
if (Debug.debugging("rpf")) {
Debug.output(getName() + "|RpfLayer.prepare(): "
+ "calling getRectangle " + " with projection: "
+ projection + " ul = " + projection.getUpperLeft()
+ " lr = " + projection.getLowerRight());
}
if (frameProvider.needViewAttributeUpdates()) {
frameProvider.setViewAttributes(viewAttributes);
}
Projection cadrgProj = projection;
if (!(projection instanceof CADRG)) {
cadrgProj = new CADRG(projection.getCenter(), projection.getScale(), projection.getWidth(), projection.getHeight());
Point ulp = cadrgProj.forward(projection.getUpperLeft());
Point lrp = cadrgProj.forward(projection.getLowerRight());
int w = (int) Math.abs(lrp.getX() - ulp.getX());
int h = (int) Math.abs(lrp.getY() - ulp.getY());
// float cadrgScale =