Skip to content

Commit

Permalink
debug for rcm-ard
Browse files Browse the repository at this point in the history
  • Loading branch information
bo-lu committed Nov 1, 2024
1 parent 2550dbc commit d59b7a8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/search/metadatapage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,21 @@ const MetaDataPage = (props) => {
url=imgUrlsTIFF[0].url;
}
}


console.log(isRCMARD);
console.log(isDatacube);
console.log(hasImage);
if((isRCMARD || isDatacube) && hasImage){
console.log("trying to load tile");
axios.get(`${EnvGlobals.COG_TILEJSON_URL}`, {params: {url}}).then((res)=>{
//console.log(res);
console.log(res);
const centers=res.data.center;
setCogCenter(new LatLng(centers[1], centers[0]));
setCogZoom(centers[2]);
const imageBounds = L.latLngBounds([[res.data.bounds[3], res.data.bounds[2]],[res.data.bounds[1], res.data.bounds[0]]]);
setCogBounds(imageBounds);
axios.get(`${EnvGlobals.COG_STATISTICS_URL}`, {params: {url, unscale: 'false', resampling:'nearest', max_size: '1024', categorical: 'false'}}).then((res2)=>{
//console.log(res2);
/console.log(res2);
const min=res2.data.b1.min;
const max=res2.data.b1.max;
setTileServiceUrl(`${EnvGlobals.COG_TILESERVICE_URL}?url=${url}&resampling_method=nearest&bidx=1&rescale=${min}%2C${max}`);
Expand Down

0 comments on commit d59b7a8

Please sign in to comment.