public static ReferencedEnvelope tile2boundingBox(final int x,final int y,final int zoom,int srid){
  ReferencedEnvelope referencedEnvelope;
switch (srid) {
case 4326:
    referencedEnvelope=new ReferencedEnvelope(tile2lon(x,zoom),tile2lon(x + 1,zoom),tile2lat(y + 1,zoom),tile2lat(y,zoom),CRS_4326);
  break;
case 3857:
case 900913:
referencedEnvelope=new ReferencedEnvelope(tile2xMercator(x,zoom),tile2xMercator(x + 1,zoom),tile2yMercator(y + 1,zoom),tile2yMercator(y,zoom),CRS_3857);
break;
default :
throw new IllegalArgumentException(srid + " is not allowed please use 4326, 900913 or 3857");
}
return referencedEnvelope;
}

public static ReferencedEnvelope tile2boundingBox ( final int x , final int y , final int zoom , int srid ) { ReferencedEnvelope referencedEnvelope ; switch ( srid ) { case 4326 : referencedEnvelope = new ReferencedEnvelope ( tile2lon ( x , zoom ) , tile2lon ( x + 1 , zoom ) , tile2lat ( y + 1 , zoom ) , tile2lat ( y , zoom ) , CRS_4326 ) ; break ; case 3857 : case 900913 : referencedEnvelope = new ReferencedEnvelope ( tile2xMercator ( x , zoom ) , tile2xMercator ( x + 1 , zoom ) , tile2yMercator ( y + 1 , zoom ) , tile2yMercator ( y , zoom ) , CRS_3857 ) ; break ; default : throw new IllegalArgumentException ( srid + " is not allowed please use 4326, 900913 or 3857" ) ; } return referencedEnvelope ; }
return the boundingbox in degree ( epsg : 4326 ) for the requested slippy map tile in the zoom level specified by the argument .
