Skip to content

Commit

Permalink
Change label for legend sorting (qgis and kepler)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f committed Oct 9, 2023
1 parent 712279e commit 2815071
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,14 @@ public BezierContouring(List<Double> isoLevels, int srid) {
for (int idiso = 0; idiso < isoLevels.size(); idiso++) {
double lvl = isoLevels.get(idiso);
this.isoLevels.add(dbaToW(lvl));
// Symbols ( and [ are used for ordering legend in application
// in ascii ( is 40 and [ is 91, numbers are between the two
if (idiso == 0) {
this.isoLabels.add(String.format(Locale.ROOT, "< %s", format.format(lvl)));
this.isoLabels.add(String.format(Locale.ROOT, "%s)", format.format(lvl)));
} else if(idiso < isoLevels.size() - 1){
this.isoLabels.add(String.format(Locale.ROOT, "%s-%s", format.format(isoLevels.get(idiso - 1)), format.format(lvl)));
} else {
this.isoLabels.add(String.format(Locale.ROOT, "> %s", format.format(isoLevels.get(idiso - 1))));
this.isoLabels.add(String.format(Locale.ROOT, "[%s", format.format(isoLevels.get(idiso - 1))));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ inputs = [
name : 'Polygon smoothing coefficient',
title : 'Polygon smoothing coefficient',
description: 'This coefficient (<a href="https://en.wikipedia.org/wiki/B%C3%A9zier_curve" target="_blank">Bezier curve</a> coefficient) will smooth the generated isosurfaces. </br> </br>'+
'If equal to 0, it disables the smoothing step and will keep the altitude of receivers.</br> </br>' +
'If equal to 0, it disables the smoothing step and will keep the altitude of receivers (3D geojson can be viewed on https://kepler.gl).</br> </br>' +
'&#128736; Default value: <b>0.5 </b>',
min : 0, max: 1,
type : Double.class
Expand Down

0 comments on commit 2815071

Please sign in to comment.