Revision 7390
org.gvsig.raster.wms/trunk/org.gvsig.raster.wms/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSConnector.java | ||
---|---|---|
356 | 356 |
// Transparency |
357 | 357 |
myNode.setTransparency(node.hasTransparency()); |
358 | 358 |
|
359 |
for (int i = 0; i < node.getAllSrs().size(); i++) { |
|
360 |
String srs = (String)node.getAllSrs().get(i); |
|
361 |
if(node.getBbox(srs) == null) { |
|
362 |
IProjection projSrc = CRSFactory.getCRS("EPSG:4326"); |
|
363 |
try { |
|
364 |
IProjection projDst = CRSFactory.getCRS(srs); |
|
365 |
if(projDst != null) { |
|
366 |
try { |
|
367 |
ICoordTrans t = projSrc.getCT(projDst); |
|
368 |
Rectangle2D r = t.convert(getRectangleFromBoundaryBox(node.getLatLonBox())); |
|
369 |
BoundaryBox bbox = getBoundaryBoxFromRectangle(r); |
|
370 |
bbox.setSrs(srs); |
|
371 |
node.addBBox(bbox); |
|
372 |
} catch (Exception e) { |
|
373 |
log.info("I cannot get the transformation between EPSG:4326 and " + srs, e); |
|
374 |
} |
|
375 |
} |
|
376 |
} catch (Exception e1) { |
|
377 |
log.info("I cannot get " + srs, e1); |
|
378 |
node.removeSrs(srs); |
|
379 |
} |
|
380 |
} |
|
381 |
} |
|
359 |
// CRS |
|
360 |
|
|
361 |
// for (int i = 0; i < node.getAllSrs().size(); i++) { |
|
362 |
// String srs = (String)node.getAllSrs().get(i); |
|
363 |
// if(node.getBbox(srs) == null) { |
|
364 |
// IProjection projSrc = CRSFactory.getCRS("EPSG:4326"); |
|
365 |
// try { |
|
366 |
// IProjection projDst = CRSFactory.getCRS(srs); |
|
367 |
// if(projDst != null) { |
|
368 |
// try { |
|
369 |
// ICoordTrans t = projSrc.getCT(projDst); |
|
370 |
// Rectangle2D r = t.convert(getRectangleFromBoundaryBox(node.getLatLonBox())); |
|
371 |
// BoundaryBox bbox = getBoundaryBoxFromRectangle(r); |
|
372 |
// bbox.setSrs(srs); |
|
373 |
// node.addBBox(bbox); |
|
374 |
// } catch (Exception e) { |
|
375 |
// log.info("I cannot get the transformation between EPSG:4326 and " + srs, e); |
|
376 |
// } |
|
377 |
// } |
|
378 |
// } catch (Exception e1) { |
|
379 |
// log.info("I cannot get " + srs, e1); |
|
380 |
// node.removeSrs(srs); |
|
381 |
// } |
|
382 |
// } |
|
383 |
// } |
|
382 | 384 |
myNode.setSrs(node.getAllSrs()); |
383 | 385 |
|
384 | 386 |
// Queryable |
Also available in: Unified diff