Show
Ignore:
Timestamp:
08/21/08 15:25:34 (5 months ago)
Author:
arneke
Message:

Tons of minor tweaks and fixes. Separated out the XStream stuff a bit more. Cleaned up dependencies.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/geowebcache/src/main/java/org/geowebcache/layer/GridCalculator.java

    r337 r338  
    2626 
    2727    // We may want to change this later 
    28     private static final int TILEPIXELS = 256; 
     28    public static final int TILEPIXELS = 256; 
    2929     
    3030    //private BBOX gridBounds = null; 
    3131    private Grid grid; 
    3232     
    33     public final static double[] RESOLUTIONS4326 =  
     33    // The following are created to save memory.  
     34    // Note that they can be modified by external code -> not 100% safe! 
     35    protected final static double[] RESOLUTIONS4326 =  
    3436        GridCalculator.getResolutionArray(180.0, TILEPIXELS, 26); 
    3537     
    36     public final static double[] RESOLUTIONS900913 =  
     38    protected final static double[] RESOLUTIONS900913 =  
    3739        GridCalculator.getResolutionArray(20037508.34*2,TILEPIXELS, 26); 
    3840     
     
    248250 
    249251        // Get the bounds 
    250         BBOX layerBounds = grid.bounds; 
     252        //BBOX layerBounds = grid.bounds; 
    251253        BBOX gridBounds = grid.gridBounds; 
    252254         
     
    499501         
    500502        while (low <= high) { 
    501             int mid = (low + high) / 2; 
     503            int mid = (low + high) >>> 1; 
    502504             
    503505            if(resolutions[mid] > reqUpper) { 
     
    528530    } 
    529531     
     532    public static double[] get900913Resolutions() { 
     533        return GridCalculator.RESOLUTIONS900913; 
     534    } 
     535     
     536    public static double[] get4326Resolutions() { 
     537        return GridCalculator.RESOLUTIONS4326; 
     538    } 
     539     
    530540}