Skip to content

Commit

Permalink
Custom configuration for solt (affects legend)
Browse files Browse the repository at this point in the history
  • Loading branch information
Belén Torrente committed Sep 9, 2024
1 parent 6a4031d commit f62c100
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
18 changes: 8 additions & 10 deletions data/config/datasets/adaguc.tests.solarterminator.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Configuration>
<Style name="solarterminator">
<Style name="soltstyle">
<Legend fixedclasses="true" tickinterval="0.1" tickround=".01">no2</Legend>
<Min>0</Min>
<Max>4</Max>
Expand All @@ -11,19 +11,17 @@
<ShadeInterval min="3.00" max="4.00" label="Civil Twilight" fillcolor="#999999"/>
<ShadeInterval min="4.00" max="5.00" label="Day" fillcolor="#FFFFFF"/>

<NameMapping name="nearest" title="Rainbow colors" abstract="Drawing with rainbow colors"/>
<NameMapping name="bilinear" title="Rainbow colors, bilinear" abstract="Drawing with rainbow colors, bilinear interpolation"/>
<NameMapping name="nearestcontour" title="Rainbow colors, contours" abstract="Drawing with rainbow colors, contours"/>
<NameMapping name="shadedcontour" title="Rainbow colors, shading and contours" abstract="Drawing with rainbow colors, shading and contours"/>
<RenderMethod>nearest,bilinear,nearestcontour,shadedcontour</RenderMethod>

<NameMapping name="shadedcontour" title="Shaded categories" abstract="Drawing with rainbow colors, shading and contours"/>
<RenderMethod>shadedcontour</RenderMethod>

</Style>

<Layer type="liveupdate">
<FilePath filter="" gfi_openall="true">{ADAGUC_PATH}data/datasets/testdata.nc</FilePath>
<FilePath filter="" gfi_openall="true">{ADAGUC_PATH}data/datasets/solt.nc</FilePath>
<DataPostProc algorithm="solarterminator"/>
<Variable>testdata</Variable>
<Styles>solarterminator</Styles>
<Variable>solarterminator</Variable>
<Styles>soltstyle</Styles>
</Layer>


</Configuration>
Binary file added data/datasets/solt.nc
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/AdagucTests/TestWMS.py
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,7 @@ def test_WMSGetMap_SolarTerminatorEquinox(self):

filename = "test_WMSGetMap_SolarTerminatorEquinox.png"
status, data, headers = AdagucTestTools().runADAGUCServer(
"DATASET=solarterminator&SERVICE=WMS&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=testdata&WIDTH=836&HEIGHT=638&CRS=EPSG%3A3857&BBOX=-27591378.677139122,-15819675.465716192,24482445.32432534,23920874.430138264&STYLES=solarterminator%2Fshadedcontour&FORMAT=image/png&TRANSPARENT=TRUE&&time=2023-03-21T00%3A00%3A00Z&",
"DATASET=solarterminator&SERVICE=WMS&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=solarterminator&WIDTH=836&HEIGHT=638&CRS=EPSG%3A3857&BBOX=-27591378.677139122,-15819675.465716192,24482445.32432534,23920874.430138264&STYLES=solarterminator%2Fshadedcontour&FORMAT=image/png&TRANSPARENT=TRUE&&time=2023-03-21T00%3A00%3A00Z&",
env=env)
AdagucTestTools().writetofile(self.testresultspath + filename,
data.getvalue())
Expand All @@ -2511,7 +2511,7 @@ def test_WMSGetMap_SolarTerminatorSolstice(self):

filename = "test_WMSGetMap_SolarTerminatorSolstice.png"
status, data, headers = AdagucTestTools().runADAGUCServer(
"DATASET=solarterminator&SERVICE=WMS&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=testdata&WIDTH=836&HEIGHT=638&CRS=EPSG%3A3857&BBOX=-27591378.677139122,-15819675.465716192,24482445.32432534,23920874.430138264&STYLES=solarterminator%2Fshadedcontour&FORMAT=image/png&TRANSPARENT=TRUE&&time=2022-12-21T00%3A00%3A00Z&",
"DATASET=solarterminator&SERVICE=WMS&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=solarterminator&WIDTH=836&HEIGHT=638&CRS=EPSG%3A3857&BBOX=-27591378.677139122,-15819675.465716192,24482445.32432534,23920874.430138264&STYLES=solarterminator%2Fshadedcontour&FORMAT=image/png&TRANSPARENT=TRUE&&time=2022-12-21T00%3A00%3A00Z&",
env=env)
AdagucTestTools().writetofile(self.testresultspath + filename,
data.getvalue())
Expand All @@ -2534,7 +2534,7 @@ def test_WMSGetMap_SolarTerminatorQuarterPoint(self):

filename = "test_WMSGetMap_SolarTerminatorQuarterPoint.png"
status, data, headers = AdagucTestTools().runADAGUCServer(
"DATASET=solarterminator&SERVICE=WMS&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=testdata&WIDTH=836&HEIGHT=638&CRS=EPSG%3A3857&BBOX=-27591378.677139122,-15819675.465716192,24482445.32432534,23920874.430138264&STYLES=solarterminator%2Fshadedcontour&FORMAT=image/png&TRANSPARENT=TRUE&&time=2000-08-07T00%3A00%3A00Z&",
"DATASET=solarterminator&SERVICE=WMS&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=solarterminator&WIDTH=836&HEIGHT=638&CRS=EPSG%3A3857&BBOX=-27591378.677139122,-15819675.465716192,24482445.32432534,23920874.430138264&STYLES=solarterminator%2Fshadedcontour&FORMAT=image/png&TRANSPARENT=TRUE&&time=2000-08-07T00%3A00%3A00Z&",
env=env)
AdagucTestTools().writetofile(self.testresultspath + filename,
data.getvalue())
Expand Down

0 comments on commit f62c100

Please sign in to comment.