Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
139 changes: 138 additions & 1 deletion examples/cloud_optimized_geotiff.jGIS
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,144 @@
"interpolation": "linear",
"mode": "equal interval",
"nClasses": "15",
"renderType": "Singleband Pseudocolor"
"renderType": "Singleband Pseudocolor",
"stops": [
{
"output": [
0.0,
0.0,
0.0,
1.0
],
"stop": 2000.0
},
{
"output": [
58.0,
0.0,
0.0,
1.0
],
"stop": 3642.857142857143
},
{
"output": [
115.0,
0.0,
0.0,
1.0
],
"stop": 5285.714285714286
},
{
"output": [
173.0,
0.0,
0.0,
1.0
],
"stop": 6928.571428571428
},
{
"output": [
230.0,
0.0,
0.0,
1.0
],
"stop": 8571.428571428572
},
{
"output": [
236.0,
53.0,
0.0,
1.0
],
"stop": 10214.285714285714
},
{
"output": [
243.0,
105.0,
0.0,
1.0
],
"stop": 11857.142857142857
},
{
"output": [
249.0,
158.0,
0.0,
1.0
],
"stop": 13500.0
},
{
"output": [
255.0,
210.0,
0.0,
1.0
],
"stop": 15142.857142857143
},
{
"output": [
255.0,
218.0,
43.0,
1.0
],
"stop": 16785.714285714286
},
{
"output": [
255.0,
225.0,
85.0,
1.0
],
"stop": 18428.571428571428
},
{
"output": [
255.0,
233.0,
128.0,
1.0
],
"stop": 20071.428571428572
},
{
"output": [
255.0,
240.0,
170.0,
1.0
],
"stop": 21714.285714285714
},
{
"output": [
255.0,
248.0,
213.0,
1.0
],
"stop": 23357.14285714286
},
{
"output": [
255.0,
255.0,
255.0,
1.0
],
"stop": 25000.0
}
]
}
},
"type": "WebGlLayer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ const SingleBandPseudoColor: React.FC<ISymbologyDialogProps> = ({

setSelectedBand(band);
setSelectedFunction(interpolation);

if (layerParams.symbologyState?.stops) {
setStopRows(layerParams.symbologyState.stops as IStopRow[]);
} else {
buildColorInfo();
}
};

const buildColorInfo = () => {
Expand Down Expand Up @@ -254,6 +260,7 @@ const SingleBandPseudoColor: React.FC<ISymbologyDialogProps> = ({
colorRamp: colorRampOptionsRef.current?.selectedRamp,
nClasses: colorRampOptionsRef.current?.numberOfShades,
mode: colorRampOptionsRef.current?.selectedMode,
stops: stopRowsRef.current,
};

layer.parameters.symbologyState = symbologyState;
Expand Down
3 changes: 3 additions & 0 deletions packages/schema/src/schema/project/layers/webGlLayer.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
"type": "string",
"default": "equal interval",
"enum": ["continuous", "equal interval", "quantile"]
},
"stops": {
"type": "array"
}
},
"additionalProperties": false
Expand Down
Loading