Tony,
Thanks for the information. I want you to be able to use your own
language setting while using LAS so I'll use the information in you
sent to work out the problem so you can keep your language setting and
still get the right formatting in LAS. I'll try to get that work done
for Armstrong 1.2.
Roland
Tony Jolibois wrote:
Roland,
I tried replacing the line below in the 2 java classes, but no effect.
But, in a very simple way I changed the environment variable "LANG"
from LANG=fr_FR.UTF-8 to LANG=en_US.UTF-8 (yes, I know it's a
problem I'm french ;-) and it works !
For your information, I don't know exactly the reason of that : the
problem comes from the get of minimum or maximum of a value of an axis
in the constraints, when this value is decimal (when it is a real like
180 it is OK, but with 49.23 no).
- The get is done by _javascript_ (I don't use the applet) in the
constraint_include.vm in LAS webapps ->
this.wx[0].setValue($mapstate.getXloText());
- These value are transformed in String by java in the classes you
pointed below (ConstraintBean.java for example) with a toString ->
mapState.setXlo(Double.toString(ym));
- I don't know if these value are stored in mysql (?) because I had
the same problem with these decimal format before in DB.
So one of these method use the environment variable LANG, and it must
take US value.
In conclusion, it works, so thank you very much !
Best regards,
Tony
Le mercredi 07 novembre 2007 à 15:45 -0600, Roland Schweitzer a écrit :
Tony,
Try replacing this:
DecimalFormat format = new DecimalFormat("###.####");
with this:
NumberFormat f = NumberFormat.getInstance(new Locale("us",
"EN"));
DecimalFormat format;
if ( f instanceof DecimalFormat ) {
format = (DecimalFormat) f;
format.applyPattern("###.####");
} else {
format = new DecimalFormat("###.####");
}
in ConstrainBean.java and Constraint_compareBean.java.
Roland
Tony Jolibois wrote:
I have the longitude and latitude axis
defined like that :
<mercatorPsy3v1R1v_nat_mean_best_estimate_latitude
units="degrees_north" type="y">
<v>0.1666
</v>
<v>0.3333
</v>
<v>0.4999
</v>
...
I tried to generate another configuration file with the addXml 1.5.1 on
http://opendap.aviso.oceanobs.com/thredds/dodsC/duacs_global_nrt_madt_merged_h
but no success.
If I don't use a comma, what should I use ? I tried with some "," it
was not that.
You can test on this server http://las.aviso.oceanobs.com/
(which is linked on the welcome web site of LAS).
Thank you,
Tony
Le mercredi 07 novembre 2007 à 11:09 -0600, Roland Schweitzer a écrit :
Hi Tony,
This is an Java locale/internationalization problem. The problem may
have started with the Java addXML. Check your configuration files and
see if you have any axes definitions that have floating point numbers
defined using a comma to separate the tens and tenths place. If so,
change them to periods. The latest version of addXML sets the Locale
to us_EN to force a decimal point. For now, LAS is going to force you
to use the English form of the floating point number. You can get the
latest addXML from: ftp://ftp.pmel.noaa.gov/ferret/pub/las/addXML.
If it's not in the config file, the problem is deeper in the code and
we'll have to investigate further.
Roland
Tony Jolibois wrote:
Re-Hi,
I have some exception when I choose Google Earth plot or Arcview
gridded plot for certain dataset in the constraints page. I don't
understand why, it seems that there is a problem with some value of
longitude.
No problem for color plot.
java.lang.NumberFormatException: For input
string: "81,9746"
at
sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
at java.lang.Double.valueOf(Double.java:447)
at
gov.noaa.pmel.tmap.las.luis.MapStateBean.getYhiAsDouble(MapStateBean.java:212)
at
gov.noaa.pmel.tmap.las.luis.ConstrainBean.init(ConstrainBean.java:231)
at
gov.noaa.pmel.tmap.las.luis.TemplateServlet.handleRequest(TemplateServlet.java:159)
at
org.apache.velocity.servlet.VelocityServlet.doRequest(VelocityServlet.java:358)
at
org.apache.velocity.servlet.VelocityServlet.doGet(VelocityServlet.java:317)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
gov.noaa.pmel.tmap.las.luis.FormFilter.doFilter(FormFilter.java:100)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
gov.noaa.pmel.tmap.las.luis.SessionFilter.doFilter(SessionFilter.java:506)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
gov.noaa.pmel.tmap.las.luis.ExceptionFilter.doFilter(ExceptionFilter.java:24)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Cliquez ici
si ce message est indésirable (pourriel).
|