@Override public void run(ProgressMonitor pm) { Envelope selectionEnvelope = null; try { selectionEnvelope = ReadTable.getTableSelectionEnvelope(dataManager, tableName, modelSelection, pm); if(selectionEnvelope!=null) { mapContext.setBoundingBox(selectionEnvelope); } }catch (SQLException ex) { LOGGER.error(I18N.tr("Unable to establish the selection bounding box"),ex); } }
/** * Compute the envelope based on the selection * @param pm * @param data * @param tableReference * @return * @throws SQLException */ private Envelope getLayerSelectionEnvelope(ProgressMonitor pm, Set<Long> data,String tableReference) throws SQLException { SortedSet<Long> sortedSet; if(data instanceof SortedSet) { sortedSet = (SortedSet<Long>)data; } else { sortedSet = new LongUnion(data); } return ReadTable.getTableSelectionEnvelope(mapContext.getDataManager(), tableReference,sortedSet, pm); }