Skip to content

Commit

Permalink
Merge pull request #30 from 12rambau/master
Browse files Browse the repository at this point in the history
improve test download
  • Loading branch information
12rambau authored Apr 12, 2021
2 parents 72693b7 + 2fd4e8f commit ab36841
Show file tree
Hide file tree
Showing 36 changed files with 1,110 additions and 24 deletions.
21 changes: 11 additions & 10 deletions component/message/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"fad": {
"title": "FAD: Forest Area Density",
"description": "This module will conduct the fragmentation analysis at five fixed observation scales. Because forest fragmentation is scale-dependent, fragmentation is reported at five observation scales, which allows different observers to make their own choice about scales and threshold of concern. The change of fragmentation across different observation scales provides additional interesting information. Fragmentation is measured by determining the Forest Area Density (FAD) within a shifting, local neighborhood. It can be measured at pixel or patch level. The result are spatially explicit maps and tabular summary statistics. Details on the methodology and input/output options can be found in the (mac: right+click or windows: cmd+click to open in new tab) [Fragmentation](https://ies-ows.jrc.ec.europa.eu/gtb/GTB/psheets/GTB-Fragmentation-FADFOS.pdf) product sheet.",
"prescision": "Computation prescision",
"prescision": "Computation precision",
"no_prescision": "Please set the prescision"
},
"frag": {
Expand All @@ -63,7 +63,7 @@
"description": "This module will conduct the Morphological Spatial Pattern Analysis. MSPA analyses shape and connectivity and conducts a segmentation of foreground patches in up to 25 feature classes. The result are spatially explicit maps and tabular summary statistics. Details on the methodology and input/output options can be found in the (mac: right+click or windows: cmd+click to open in new tab) [Morphology](https://ies-ows.jrc.ec.europa.eu/gtb/GTB/psheets/GTB-Pattern-Morphology.pdf) product sheet.",
"edge_width": "edge width (pixels)",
"transition": "transition",
"int_ext": "int ext",
"int_ext": "intext",
"no_edge_width": "Please provide a positive edge width"

},
Expand Down Expand Up @@ -91,16 +91,16 @@
"description": "This module will recode categorical land cover classes."
},
"requirement": [
"select a classified tiff image. The image must contain at least 2 different classes. 0 will be considered as missing data.",
"Provide a byte-formatted input image. The image must contain at least 2 different classes. 0 will be considered as missing data.",
"",
"Provide a byte image. Recode the classes into the following 2 classes : background (nonforest), foreground (forest). All remaining classes will be considered as missing data.",
"Provide a byte images. Recode the classes into the 3 dominant land cover classes. All remaining classes will be considered as missing data.",
"Provide a byte images. Recode the classes into the 4 following classes : background (nonforest), foreground (forest), special background 1 (e.g. water) and special background 2. All remaining classes will be considered as missing data.",
"Provide a byte images. Recode the classes into the 3 following classes : background (nonforest), foreground (forest), special background 1 (for P23 only). All remaining classes will be considered as missing data."
"Provide a byte-formatted input image. Recode the classes into the following 2 classes : background (nonforest), foreground (forest). All remaining classes will be considered as missing data.",
"Provide a byte-formatted input image. Recode the classes into the 3 dominant land cover classes. All remaining classes will be considered as missing data.",
"Provide a byte-formatted input image. Recode the classes into the following 4 classes: background (nonforest), foreground (forest), special background 1 (optional, e.g. water) and special background 2 (optional). All remaining classes will be considered as missing data.",
"Provide a byte-formatted input image. Recode the classes into the 3 following classes : background (nonforest), foreground (forest), special background 1 (for P23 only). All remaining classes will be considered as missing data."
],
"bin": {
"btn": "Convert the image classes",
"title": "Select map classes",
"btn": "Convert the input image classes",
"title": "Select input map classes",
"file_exist": "the file {} already exists, no new bin maps have been created",
"running": "The bin map is being processed",
"finished": "the bin map is ready to be used",
Expand All @@ -110,7 +110,8 @@
"no_bin": "Please provide a bin map using the first process tile",
"default": {
"btn": "Download test dataset",
"msg": "the test files {} and {} have been added to the download folder"
"msg": "the test files \"{}\" and \"{}\" have been added to the \"downloads\" folder",
"tooltip": "Click the button above to download the test files \"clc3class.tif\" and \"example.tif\" into the folder \"downloads\""
}
},
"gwb": {
Expand Down
6 changes: 3 additions & 3 deletions component/parameter/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
'label': [
'background',
'foreground',
'special background 1',
'special background 2'
'special background 1 (optional)',
'special background 2 (optional)'
],
'io': [
'background',
Expand All @@ -31,7 +31,7 @@
'label': [
'Dominant land cover 1 (Agriculture)',
'Dominant land cover 2 (Natural)',
'Dominant land cover 3 (developped)'
'Dominant land cover 3 (Developed)'
],
'io': [
'lc_1',
Expand Down
14 changes: 7 additions & 7 deletions component/parameter/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
]

acc_options = [
{'value':'default', 'text': "stats + image of viewport" },
{'value':'default', 'text': "stats + image of viewport (default)" },
{'value':'detailed', 'text': 'stats + images of ID, area, viewport'}
]

####################
## dist ##
####################
dist_options = [
{'text': 'Euclidian distance only', 'value': 1},
{'text': 'Euclidian distance only (default)', 'value': 1},
{'text': 'Euclidian distance + Hysometric Curve', 'value': 2}
]

Expand All @@ -29,7 +29,7 @@
]

prescision = [
{'text': "float precision (require more disk space)", 'value': 1},
{'text': "float precision (default, require more disk space)", 'value': 1},
{'text': 'rounded byte', 'value': 0}
]

Expand All @@ -51,8 +51,8 @@
## spa ##
###################
spa_options = [
{'text': 'Small & linear features (SLF), Coherent', 'value': 2},
{'text': 'Core, Core-Openings, Margin', 'value': 3},
{'text': 'Core, Core-Openings, Edge, Perforation, Margin', 'value': 5},
{'text': 'Core, Core-Openings, Edge, Perforation, Islet, Margin', 'value': 6}
{'text': '2: Small & linear features (SLF), Coherent', 'value': 2},
{'text': '3: Core, Core-Openings, Margin', 'value': 3},
{'text': '5: Core, Core-Openings, Edge, Perforation, Margin', 'value': 5},
{'text': '6: Core, Core-Openings, Edge, Perforation, Islet, Margin', 'value': 6}
]
8 changes: 6 additions & 2 deletions component/tile/convert_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ def __init__(self, io, nb_class):
# gather the io
self.io = io

# create the widgets
# create the download layout
self.down_test = sw.Btn(cm.bin.default.btn, icon="mdi-cloud-download-outline", small=True, outlined=True, class_="ma-5")
tooltip = sw.Tooltip(widget=self.down_test, tooltip=cm.bin.default.tooltip)

# create the widgets

self.file = sw.FileInput(['.tif', '.tiff'])
self.classes = [v.Select(
label = cp.convert[nb_class]['label'][i],
Expand All @@ -39,7 +43,7 @@ def __init__(self, io, nb_class):
super().__init__(
self.io.tile_id,
cm.bin.title,
inputs = [self.down_test, v.Divider(), requirements, self.file] + self.classes,
inputs = [tooltip, v.Divider(), requirements, self.file] + self.classes,
output = self.output,
btn = btn
)
Expand Down
Loading

0 comments on commit ab36841

Please sign in to comment.