Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
304b2aa
Only load localstate if params are not included in url request
bo-lu Sep 12, 2024
5c793cf
Clear all params other than organizations
bo-lu Sep 13, 2024
3982122
Update localStorage.ts
bo-lu Sep 13, 2024
6c229c4
Removed if statement to force filter reset if url params are provided
bo-lu Sep 17, 2024
80336a3
Update localStorage.ts
bo-lu Sep 17, 2024
b96c953
Update localStorage.ts
bo-lu Sep 17, 2024
520e632
Update localStorage.ts
bo-lu Sep 17, 2024
e35412f
Update localStorage.ts
bo-lu Sep 17, 2024
ee02823
Update thumbnail-config.json to use different api endpoint which bett…
bo-lu Sep 25, 2024
53cccbe
Initial commit for RCM-ARD
bo-lu Oct 29, 2024
2550dbc
Fixing logic to enable the loading of COG from rcm-ard collection
bo-lu Nov 1, 2024
d59b7a8
debug for rcm-ard
bo-lu Nov 1, 2024
0a2a6ea
typo
bo-lu Nov 1, 2024
2249df4
Improve readability of imageUrls variable and add application/geotiff
bo-lu Nov 1, 2024
2b0c1f1
typo
bo-lu Nov 1, 2024
1c2b080
c;ode cleanup to determine if thumnail png or COG geotiff should be l…
bo-lu Nov 1, 2024
ae3826a
set max to 98th percentile to improve shading for rcm-ard
bo-lu Nov 1, 2024
80ce4f7
Invalidate localstorage after 5 minutes instead of checking params in…
bo-lu Nov 5, 2024
3981507
Adjust padding to account for left search panel
bo-lu Nov 5, 2024
75e5eef
Use longitude offset based on zoom level
bo-lu Nov 5, 2024
aa0bd3c
add debug code
bo-lu Nov 5, 2024
35eec29
set new time for session after session expiry
bo-lu Nov 5, 2024
6a2c957
bug fixes to localstorage
bo-lu Nov 5, 2024
ab71b53
Update geosearch.tsx
bo-lu Nov 5, 2024
2be76ac
adjust longitude offset
bo-lu Nov 5, 2024
e98e075
Update geosearch.tsx
bo-lu Nov 5, 2024
2d61595
Update geosearch.tsx
bo-lu Nov 5, 2024
ddcacce
use getBoundsZoom to calculate best zoom level
bo-lu Nov 5, 2024
ef2138e
Update geosearch.tsx
bo-lu Nov 5, 2024
9d06038
fix bug related to console output
bo-lu Nov 7, 2024
23f5424
Update geosearch.tsx
bo-lu Nov 7, 2024
7cafd78
Update geosearch.tsx
bo-lu Nov 7, 2024
ed0a74e
Update geosearch.tsx
bo-lu Nov 7, 2024
0d64e6e
Update geosearch.tsx
bo-lu Nov 7, 2024
71b5a67
Update geosearch.tsx
bo-lu Nov 7, 2024
8df71d5
Update geosearch.tsx
bo-lu Nov 7, 2024
70be151
Update geosearch.tsx
bo-lu Nov 7, 2024
0f2a2aa
Update geosearch.tsx
bo-lu Nov 7, 2024
93c5e0c
Update geosearch.tsx
bo-lu Nov 7, 2024
e31627c
Update geosearch.tsx
bo-lu Nov 7, 2024
f4eaa08
Update geosearch.tsx
bo-lu Nov 7, 2024
174b846
Update geosearch.tsx
bo-lu Nov 7, 2024
785b122
Update geosearch.tsx
bo-lu Nov 7, 2024
fb22157
Update geosearch.tsx
bo-lu Nov 7, 2024
876eb3b
Update geosearch.tsx
bo-lu Nov 8, 2024
b756766
Update geosearch.tsx
bo-lu Nov 8, 2024
0449c97
Update geosearch.tsx
bo-lu Nov 8, 2024
e7e694e
Update geosearch.tsx
bo-lu Nov 8, 2024
9e726b8
Update geosearch.tsx
bo-lu Nov 8, 2024
d66a9d8
Update geosearch.tsx
bo-lu Nov 8, 2024
ac19825
Update geosearch.tsx
bo-lu Nov 8, 2024
2976df0
Update geosearch.tsx
bo-lu Nov 8, 2024
62c035a
Update geosearch.tsx
bo-lu Nov 8, 2024
31cde5f
Update geosearch.tsx
bo-lu Nov 8, 2024
2dcf830
Update geosearch.tsx
bo-lu Nov 8, 2024
b3e74e5
Removes bbox when paging. Zoom to extent of canada before zoom/panning
bo-lu Nov 12, 2024
39d98d2
Create reset to initial map function
bo-lu Nov 12, 2024
1a40cb3
debug map reset
bo-lu Nov 12, 2024
176dea9
Update geosearch.tsx
bo-lu Nov 12, 2024
0179401
Update geosearch.tsx
bo-lu Nov 12, 2024
460f6ec
Update geosearch.tsx
bo-lu Nov 12, 2024
dda9a66
Update geosearch.tsx
bo-lu Nov 12, 2024
2f17bb3
Update geosearch.tsx
bo-lu Nov 12, 2024
45d8b9b
Update geosearch.tsx
bo-lu Nov 14, 2024
fd82f0f
Add tooltip for rcm-ard in en/fr
bo-lu Nov 14, 2024
4b0df2c
Set min zoom to 4 to improve stability of the app
bo-lu Nov 14, 2024
6556a50
refactor display of eo and thumbnails on search page
bo-lu Nov 18, 2024
99ec0fa
Change default text
bo-lu Nov 19, 2024
ad1a7fc
minor fixes
bo-lu Nov 19, 2024
d733ee4
change rcm-ard polarization to new format
bo-lu Nov 19, 2024
57065ef
For colour ramp use 98th percentile instead of max
bo-lu Nov 19, 2024
ae985d4
Change to draw bbox if tiling fails
bo-lu Nov 19, 2024
c1bace8
Merge branch 'prod' into dev
bo-lu Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const lccMapOptionsParam: MapOptions = {
// Web Mercator map options
const wmMapOptionsParam: MapOptions = {
zoomFactor: 5,
minZoom: 2,
minZoom: 4,
maxZooom: 19,
maxBounds: new LatLngBounds({ lat: -89.999, lng: -180 }, { lat: 89.999, lng: 180 }),
maxBoundsViscosity: 0.0,
Expand Down
4 changes: 4 additions & 0 deletions src/components/search/data-collection-option.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
{
"label": "datacollection.SENTINEL1",
"value": "sentinel-1"
},
{
"label": "datacollection.RCM-ARD",
"value": "rcm-ard"
}
]
252 changes: 184 additions & 68 deletions src/components/search/geosearch.tsx

Large diffs are not rendered by default.

86 changes: 57 additions & 29 deletions src/components/search/metadatapage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,43 +170,63 @@ const MetaDataPage = (props) => {
setSimilarRecords(sims);
setShowSimilarRecords(sims.slice(0, 5));
}
if(res.options){
const imageUrls=res.options.filter(o=>o.url && o.url!==null && o.description && o.description.en && (o.description.en.toLowerCase().indexOf("data;tiff;")>=0||o.description.en.toLowerCase().indexOf("image/tiff")>=0
||o.description.en.toLowerCase().indexOf("thumbnail;png")>=0
||o.description.en.toLowerCase().indexOf("image/png")>=0
||o.description.en.toLowerCase().indexOf("thumbnail;jpeg")>=0
||o.description.en.toLowerCase().indexOf("image/jpeg")>=0));
if(res.options){
const imageUrls = res.options.filter(o =>
o.url && o.url !== null &&
o.description && o.description.en &&
(
o.description.en.toLowerCase().indexOf("data;tiff;") >= 0 ||
o.description.en.toLowerCase().indexOf("image/tiff") >= 0 ||
o.description.en.toLowerCase().indexOf("thumbnail;png") >= 0 ||
o.description.en.toLowerCase().indexOf("image/png") >= 0 ||
o.description.en.toLowerCase().indexOf("thumbnail;jpeg") >= 0 ||
o.description.en.toLowerCase().indexOf("image/jpeg") >= 0 ||
o.description.en.toLowerCase().indexOf("application/geotiff") >= 0
)
);
let url;
const isSentinel1=imageUrls.length>0 && res.sourceSystemName.toLowerCase().indexOf("eodms")>=0 && res.eoCollection==='sentinel-1' && thumbnailConfig['eodms_use_image'];
const isSentinel1=imageUrls.length>0 && res.sourceSystemName.toLowerCase().indexOf("ccmeo-eodms")>=0 && res.eoCollection==='sentinel-1' && thumbnailConfig['eodms_use_image'];
const isRCMARD=imageUrls.length>0 && res.sourceSystemName.toLowerCase().indexOf("ccmeo-eodms")>=0 && res.eoCollection==='rcm-ard';
const isDatacube=imageUrls.length>0 && res.sourceSystemName.toLowerCase().indexOf("ccmeo-datacube")>=0;
if (isSentinel1) setTileServiceUrl(null);
const hasImage=imageUrls.length>0 && res.keywords.toLowerCase().indexOf("stac")>=0;
if(imageUrls.length>0){
const hasImage=imageUrls.length>0 && res.keywords.toLowerCase().indexOf("stac")>=0;
if (isSentinel1 && imageUrls.length > 0) {
// Set URL to load the thumbnail image
let thumbnail_correction = thumbnailConfig['thumbnail_correction_proxy_dev'];
let orbitDirection = res.eoFilters[0]?.orbitState;
//console.log(orbitDirection);
url=thumbnail_correction + imageUrls[0].url + "&side=" + orbitDirection;
//handling if image is type tiff
let imgUrlsTIFF=imageUrls.filter(o=>o.description.en.toLowerCase().indexOf("data;tiff;")>=0||o.description.en.toLowerCase().indexOf("image/tiff")>=0);
if(imgUrlsTIFF.length>0){
url=imgUrlsTIFF[0].url;
}
url = thumbnail_correction + imageUrls[0].url + "&side=" + orbitDirection;
}

if(!isSentinel1 && hasImage){
else if ((isRCMARD || isDatacube) && imageUrls.length > 0) {
// Set URL to load the COG geotiff
let imgUrlsTIFF = imageUrls.filter(o => (
o.description.en.toLowerCase().indexOf("data;tiff;") >= 0 ||
o.description.en.toLowerCase().indexOf("image/tiff") >= 0 ||
o.description.en.toLowerCase().indexOf("application/geotiff") >= 0
));

if (imgUrlsTIFF.length > 0) {
url = imgUrlsTIFF[0].url;
}
}
console.log(imageUrls);
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;
const max=res2.data.b1.percentile_98;
setTileServiceUrl(`${EnvGlobals.COG_TILESERVICE_URL}?url=${url}&resampling_method=nearest&bidx=1&rescale=${min}%2C${max}`);
setLoading1(false);
setLoading1(false);
});
}).catch(err=>{
//console.log('tilejson', err);
Expand Down Expand Up @@ -437,12 +457,20 @@ const MetaDataPage = (props) => {
const desc = option.description[language].split(";");
return { name: option.name[language], type: desc[0], format: desc[1], language: t(`page.${desc[2].toLowerCase().replace(',', '')}`), url: option.url };
});
const imageUrls=formattedOption.filter(o=>o.url && o.url!==null && o.description && o.description.en && (o.description.en.toLowerCase().indexOf("data;tiff;")>=0
||o.description.en.toLowerCase().indexOf("image/tiff")>=0
||o.description.en.toLowerCase().indexOf("thumbnail;png")>=0
||o.description.en.toLowerCase().indexOf("image/png")>=0
||o.description.en.toLowerCase().indexOf("thumbnail;jpeg")>=0
||o.description.en.toLowerCase().indexOf("image/jpeg")>=0));

const imageUrls = formattedOption.filter(o =>
o.url && o.url !== null &&
o.description && o.description.en &&
(
o.description.en.toLowerCase().indexOf("data;tiff;") >= 0 ||
o.description.en.toLowerCase().indexOf("image/tiff") >= 0 ||
o.description.en.toLowerCase().indexOf("thumbnail;png") >= 0 ||
o.description.en.toLowerCase().indexOf("image/png") >= 0 ||
o.description.en.toLowerCase().indexOf("thumbnail;jpeg") >= 0 ||
o.description.en.toLowerCase().indexOf("image/jpeg") >= 0 ||
o.description.en.toLowerCase().indexOf("application/geotiff") >= 0
)
);
let url;
const isSentinel1=imageUrls.length>0 && result.sourceSystemName==='ccmeo-eodms' && result.eoCollection==='sentinel-1' && thumbnailConfig['eodms_use_image'];
const hasImage=imageUrls.length>0 && result.keywords.toLowerCase().indexOf("stac")>=0;
Expand Down Expand Up @@ -848,7 +876,7 @@ const MetaDataPage = (props) => {
<ImageOverlay
url={url}
bounds={bounds}
opacity={1}
opacity={0.75}
zIndex={10}
/>
</MapContainer>}
Expand Down
14 changes: 14 additions & 0 deletions src/components/search/polarization-option-rcm-ard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"label": "polarization.DEFAULT",
"value": ""
},
{
"label": "polarization.CHCV",
"value": "CH + CV"
},
{
"label": "polarization.HHHV",
"value": "HH + HV"
}
]
38 changes: 38 additions & 0 deletions src/components/search/polarization-option-sentinel-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"label": "polarization.DEFAULT",
"value": ""
},
{
"label": "polarization.VV",
"value": "VV"
},
{
"label": "polarization.VVVH",
"value": "VV + VH"
},
{
"label": "polarization.HH",
"value": "HH"
},
{
"label": "polarization.HHHV",
"value": "HH + HV"
},
{
"label": "polarization.HHHVVHVV",
"value": "HH + HV + VH + VV"
},
{
"label": "polarization.HHVV",
"value": "HH + VV"
},
{
"label": "polarization.HV",
"value": "HV"
},
{
"label": "polarization.VH",
"value": "VH"
}
]
5 changes: 4 additions & 1 deletion src/components/searchfilter/eo-filter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
}
.sentinel-1 {
padding-left: 10px;
}
}
.rcm-ard {
padding-left: 10px;
}
32 changes: 30 additions & 2 deletions src/components/searchfilter/eo-filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import dataCollectionOptions from '../search/data-collection-option.json';
import orbitOptions from '../search/orbit-direction-option.json';
import polarizationOptions from '../search/polarization-option.json';
import polarizationOptionsSentinel from '../search/polarization-option-sentinel-1.json';
import polarizationOptionsRCMARD from '../search/polarization-option-rcm-ard.json';
import DropdownSelection from './dropdown-selection';
import './eo-filter.scss';

Expand Down Expand Up @@ -47,7 +48,7 @@ export default function EoSearchFilter(props: EoSearchProps): JSX.Element {
{ dataCollection === 'sentinel-1' && (<div className="sentinel-1">
<DropdownSelection
label="filter.label.eofilter.polarization"
options={polarizationOptions}
options={polarizationOptionsSentinel}
labelClassName="dropdown-select-label"
selectClassName="dropdown-select"
optionClassName="dropdown-select-option"
Expand All @@ -56,7 +57,34 @@ export default function EoSearchFilter(props: EoSearchProps): JSX.Element {
onSelect={handlePolarizationChange}
tooltip
tooltipTitle='filter.label.eofilter.polarization-tooltip'
/>
<DropdownSelection
label="filter.label.eofilter.orbit"
options={orbitOptions}
labelClassName="dropdown-select-label"
selectClassName="dropdown-select"
optionClassName="dropdown-select-option"
iconClassName="dropdown-select-icon"
defaultValue={orbit}
onSelect={handleOrbitChange}
tooltip
tooltipTitle='filter.label.eofilter.orbit-tooltip'
/>
</div>
) }
{ dataCollection === 'rcm-ard' && (<div className="rcm-ard">
<DropdownSelection
label="filter.label.eofilter.polarization"
options={polarizationOptionsRCMARD}
labelClassName="dropdown-select-label"
selectClassName="dropdown-select"
optionClassName="dropdown-select-option"
iconClassName="dropdown-select-icon"
defaultValue={polarization}
onSelect={handlePolarizationChange}
tooltip
tooltipTitle='filter.label.eofilter.polarization-tooltip'
/>
<DropdownSelection
label="filter.label.eofilter.orbit"
options={orbitOptions}
Expand Down
17 changes: 10 additions & 7 deletions src/locales/en-CA/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
"data-collection-tooltip":"",
"polarization-tooltip":"Determines with which polarisation the data was acquired. The first letter indicates the polarisation when sending the signal, the second letter when receiving the signal, e.g., HV = horizontal polarisation when sending the signal and vertical polarisation when receiving. <br/>Data can be acquired in single polarisation HH (SH) or VV (SV) or in dual polarisation HH&HV (DH) or VV&VH (DV), depending on the instrument mode. <br/>SM, IW and EW can be acquired in single or dual polarisation. WV can only be acquired in single polarisation.",
"orbit-tooltip":"Determines whether the data was recorded during a descending orbit (flight direction: north - south) or an ascending orbit (flight direction: south - north).",
"sentinel-1-tooltip":"<Strong>Sentinel-1</Strong> provides all-weather, day and night radar imagery for land and ocean services. <br/>EO Browser provides data acquired in Interferometric Wide Swath (IW) and Extra Wide Swath (EW) modes processed to Level-1 Ground Range Detected (GRD)."
"sentinel-1-tooltip":"<Strong>Sentinel-1</Strong> provides all-weather, day and night radar imagery for land and ocean services. <br/>EO Browser provides data acquired in Interferometric Wide Swath (IW) and Extra Wide Swath (EW) modes processed to Level-1 Ground Range Detected (GRD).",
"rcm-ard-tooltip":"<Strong>Radarsat Constellation Mission (RCM) - Analysis Ready Data (ARD) </Strong> includes a trio of Earth observation satellites, capable of scanning Earth day or night and in any weather conditions. The three-satellite configuration allows for daily revisits of Canada's vast territory and maritime approaches, as well as daily access to 90% of the world's surface and the Arctic up to four times a day."
}
}
},
Expand Down Expand Up @@ -292,25 +293,27 @@
"NU": "Nunavut",
"NT": "Northwest Territories",
"YT": "Yukon",
"DEFAULT": "Please select one"
"DEFAULT": "Show all"
},
"datacollection": {
"DEFAULT": "Please select one",
"SENTINEL1": "Sentinel-1"
"DEFAULT": "Show all",
"SENTINEL1": "Sentinel-1",
"RCM-ARD": "Radarsat Constellation Mission (RCM) - Analysis Ready Data (ARD)"
},
"polarization": {
"DEFAULT": "Please select one",
"DEFAULT": "Show all",
"VV": "VV",
"VVVH": "VV+VH",
"HH": "HH",
"HHHV": "HH+HV",
"HHHVVHVV":"HH+HV+VH+VV",
"HHVV":"HH+VV",
"HV": "HV",
"VH": "VH"
"VH": "VH",
"CHCV": "CH+CV"
},
"orbit": {
"DEFAULT": "Please select one",
"DEFAULT": "Show all",
"ASC": "Ascending",
"DESC": "Descending"
},
Expand Down
17 changes: 10 additions & 7 deletions src/locales/fr-CA/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
"data-collection-tooltip":"",
"polarization-tooltip":"Détermine la polarisation avec laquelle les données ont été acquises. La première lettre indique la polarisation lors de l'envoi du signal, la deuxième lettre lors de la réception du signal, par exemple, HV = polarisation horizontale lors de l'envoi du signal et polarisation verticale lors de la réception.<br/>Les données peuvent être acquises en polarisation simple HH (SH) ou VV (SV) ou en polarisation double HH&HV (DH) ou VV&VH (DV), selon le mode de l'instrument.<br/>SM, IW et EW peuvent être acquis en polarisation simple ou double. WV ne peut être acquis qu'en polarisation simple.",
"orbit-tooltip":"Détermine si les données ont été enregistrées sur une orbite descendante (direction de déplacement : nord - sud) ou une orbite ascendante (direction de déplacement : sud - nord).",
"sentinel-1-tooltip":"<strong>Sentinel-1</strong> fournit des images radar de jour et de nuit, par tous les temps, pour les services terrestres et océaniques. EO Browser fournit des données acquises en mode interférométrique Wide Swath (IW) et Extra Wide Swath (EW), traitées en niveau 1 de détection de la portée au sol (GRD). traitées en niveau 1 Ground Range Detected (GRD)."
"sentinel-1-tooltip":"<strong>Sentinel-1</strong> fournit des images radar de jour et de nuit, par tous les temps, pour les services terrestres et océaniques. EO Browser fournit des données acquises en mode interférométrique Wide Swath (IW) et Extra Wide Swath (EW), traitées en niveau 1 de détection de la portée au sol (GRD). traitées en niveau 1 Ground Range Detected (GRD).",
"rcm-ard-tooltip":"<strong>Mission de la Constellation RADARSAT (MCR) - données prêtes à l'analyse (DPA)</strong> Les trois satellites d'observation de la Terre identiques balaient la Terre jour et nuit, quelles que soient les conditions météorologiques. La configuration à trois satellites permet des réobservations journalières du vaste territoire et des approches maritimes du Canada ainsi qu'un accès à 90 % de la surface terrestre tous les jours et à l'Arctique jusqu'à quatre fois par jour."
}
}
},
Expand Down Expand Up @@ -292,25 +293,27 @@
"NU": "Nunavut",
"NT": "Territoires du Nord-Ouest",
"YT": "Yukon",
"DEFAULT": "Sélectionnez une option"
"DEFAULT": "Tout afficher"
},
"datacollection": {
"DEFAULT": "Sélectionnez une option",
"SENTINEL1": "Sentinel-1"
"DEFAULT": "Tout afficher",
"SENTINEL1": "Sentinel-1",
"RCM-ARD": "Mission de la Constellation RADARSAT (MCR) - données prêtes à l'analyse (DPA)"
},
"polarization": {
"DEFAULT": "Sélectionnez une option",
"DEFAULT": "Tout afficher",
"VV": "VV",
"VVVH": "VV+VH",
"HH": "HH",
"HHHV": "HH+HV",
"HHHVVHVV":"HH+HV+VH+VV",
"HHVV":"HH+VV",
"HV": "HV",
"VH": "VH"
"VH": "VH",
"CHCV": "CH+CV"
},
"orbit": {
"DEFAULT": "Sélectionnez une option",
"DEFAULT": "Tout afficher",
"ASC": "ascendante",
"DESC": "descendante"
},
Expand Down
Loading
Loading