public List < Rasterlite2Coverage > getRasterCoverages ( boolean doOrder ) throws Exception { List < Rasterlite2Coverage > rasterCoverages = new ArrayList < Rasterlite2Coverage > ( ) ; String orderBy = " ORDER BY " + Rasterlite2Coverage . COVERAGE_NAME ; if ( ! doOrder ) { orderBy = "" ; } String sql = "SELECT " + Rasterlite2Coverage . COVERAGE_NAME + ", " + Rasterlite2Coverage . TITLE + ", " + Rasterlite2Coverage . SRID + ", " + Rasterlite2Coverage . COMPRESSION + ", " + Rasterlite2Coverage . EXTENT_MINX + ", " + Rasterlite2Coverage . EXTENT_MINY + ", " + Rasterlite2Coverage . EXTENT_MAXX + ", " + Rasterlite2Coverage . EXTENT_MAXY + " FROM " + Rasterlite2Coverage . TABLENAME + orderBy ; return database . execOnConnection ( connection -> { try ( IHMStatement stmt = connection . createStatement ( ) ; IHMResultSet rs = stmt . executeQuery ( sql ) ) { while ( rs . next ( ) ) { int i = 1 ; String coverageName = rs . getString ( i ++ ) ; String title = rs . getString ( i ++ ) ; int srid = rs . getInt ( i ++ ) ; String compression = rs . getString ( i ++ ) ; double minX = rs . getDouble ( i ++ ) ; double minY = rs . getDouble ( i ++ ) ; double maxX = rs . getDouble ( i ++ ) ; double maxY = rs . getDouble ( i ++ ) ; Rasterlite2Coverage rc = new Rasterlite2Coverage ( database , coverageName , title , srid , compression , minX , minY , maxX , maxY ) ; rasterCoverages . add ( rc ) ; } return rasterCoverages ; } } ) ; }
Get the list of available raster coverages .