public static CoverageData < ? > getCoverageData ( GeoPackage geoPackage , TileDao tileDao , Integer width , Integer height , Projection requestProjection ) { TileMatrixSet tileMatrixSet = tileDao . getTileMatrixSet ( ) ; GriddedCoverageDao griddedCoverageDao = geoPackage . getGriddedCoverageDao ( ) ; GriddedCoverage griddedCoverage = null ; try { if ( griddedCoverageDao . isTableExists ( ) ) { griddedCoverage = griddedCoverageDao . query ( tileMatrixSet ) ; } } catch ( SQLException e ) { throw new GeoPackageException ( "Failed to get Gridded Coverage for table name: " + tileMatrixSet . getTableName ( ) , e ) ; } CoverageData < ? > coverageData = null ; GriddedCoverageDataType dataType = griddedCoverage . getDataType ( ) ; switch ( dataType ) { case INTEGER : coverageData = new CoverageDataPng ( geoPackage , tileDao , width , height , requestProjection ) ; break ; case FLOAT : coverageData = new CoverageDataTiff ( geoPackage , tileDao , width , height , requestProjection ) ; break ; default : throw new GeoPackageException ( "Unsupported Gridded Coverage Data Type: " + dataType ) ; } return coverageData ; }
Get a Tiled Gridded Coverage Data