Hello Patrick,
you can get the ncWMS code used in the TDS from this github repository:
https://github.com/Unidata/ncWMS
in particular, the commit tagged as: v1.0.tds.4.3.20121211.1130 is the
code used in the 4.3.15 release.
Cheers!
On 01/21/2013 07:17 AM, Patrick Brockmann wrote:
Hi all,
I would like to modify some lines of ncWMS to
get color maps with saturation levels and not black.
I have already done this modification by installing the ncWMS source from
University of Reading and
then following http://sourceforge.net/mailarchive/message.php?msg_id=27429262
The diff of the code is simple :
$ ls -1 ncWMS/trunk/src/java/uk/ac/rdg/resc/ncwms/graphics/ImageProducer.java*
/home/webportals/ncWMS/trunk/src/java/uk/ac/rdg/resc/ncwms/graphics/ImageProducer.java
/home/webportals/ncWMS/trunk/src/java/uk/ac/rdg/resc/ncwms/graphics/ImageProducer.java.orig
$ diff ncWMS/trunk/src/java/uk/ac/rdg/resc/ncwms/graphics/ImageProducer.java*
292,302c292,298
< }
< else if (value< this.scaleRange.getMinimum())
< {
< return 0;
< }
< else if (value> this.scaleRange.getMaximum())
< {
< return this.numColourBands - 1;
< }
< else
< {
---
}
else if (!this.scaleRange.contains(value))
{
return this.numColourBands + 1; // represents an out-of-range pixel
}
else
{
Now I would like to do the same with the ncWMS dirstributed in the last TDS
release
and referenced in the source as ncwms-1.0.tds.4.3.20121211.1130.jar
The reason is that I prefer to use the ncWMS from the TDS because the request
is formed with the file name
and not a unique ID as in the ncWMS standalone WAR from Reading University.
Compare the 2 calls:
ncWMS from TDS -->
wms/CARBON/fco2.lmdz_matrix_peylin.1996-2004.nc?&REQUEST=GetMap&VERSION=1.3.0&CRS=EPSG:4326&WIDTH=300&HEIGHT=600&FORMAT=image/png&LAYERS=poste_land&TIME=1997-06-16&BBOX=-100,-30,100,60&STYLES=boxfill/redblue&COLORSCALERANGE=-100,100
ncWMS standalone -->
http://webportals.ipsl.jussieu.fr:8080/ncWMS/wms?REQUEST=GetMap&VERSION=1.3.0&CRS=EPSG:4326&WIDTH=300&HEIGHT=600&FORMAT=image/png&LAYERS=F05/poste_land&TIME=1997-06-16&BBOX=-100,-30,100,60&STYLES=boxfill/redblue&COLORSCALERANGE=-100,100
Note the use of the "unique ID" F05 you must have declared in an adminstration
mode.
Any info to share on this topic is welcome.
Best regards
Patrick