<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.17063" name=GENERATOR><!-- converted from rtf -->
<STYLE>.EmailQuote {
PADDING-LEFT: 4pt; MARGIN-LEFT: 1pt; BORDER-LEFT: #800000 2px solid
}
</STYLE>
</HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial>
<DIV dir=ltr align=left><FONT face=Tahoma>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010><SPAN class=751564700-29072011>Hi
Mark,</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010><SPAN
class=751564700-29072011></SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010>You can use an OGR connection <SPAN
class=356315200-29072011>for formatting of number fields when</SPAN>
labelling<SPAN class=751564700-29072011> in MapServer version 5.x</SPAN>. I
think you need GDAL 1.6 or later.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=686030723-06062010><FONT face=Arial><FONT
color=#0000ff><FONT size=2>For example with a shapefile called test.shp with a
field, testfld1, you can do the following<SPAN
class=751564700-29072011> <SPAN class=356315200-29072011>to show
only</SPAN> two decimal places.</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010>LAYER</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010> ..</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010> CONNECTIONTYPE OGR</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010> CONNECTION "test.shp"</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010> DATA "select CAST(testfld1 AS <SPAN
class=751564700-29072011>numeric</SPAN> (4<SPAN
class=751564700-29072011>,2</SPAN>)) from test"</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010> ..</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010> CLASS</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010>
...</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010> TEXT
([testfld1)]</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010>
LABEL</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010>
..</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010>
END</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010> END</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010>END</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010>Regards,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=686030723-06062010>Kathleen</SPAN></FONT></DIV></FONT></DIV></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <B>On Behalf Of </B>Mark
Volz<BR><B>Sent:</B> Thursday, 28 July 2011 5:26 AM<BR><B>To:</B>
mapserver-users@lists.osgeo.org<BR><B>Subject:</B> [mapserver-users] display
labels as an integer instead of scientific notations.<BR></FONT><BR></DIV>
<DIV></DIV><FONT face=Calibri size=2><SPAN style="FONT-SIZE: 11pt">
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>I have a label that displays a number in scientific notation; for
example 2.08+e002. I would like the label to display as an integer such as
2.08. In the past I asked a similar question about HTML templates and
someone mentioned that I should use “[item name="area" precision=2]”
Unfortunately, the statement seems invalid as a label in the .map file.</DIV>
<DIV> </DIV>
<DIV>Does anyone know how I can display a number as an integer? Or will I
have to convert all my values to Text? I am using mapserver 5.4</DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV> </DIV>
<DIV>Mark</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV></SPAN></FONT></BODY></HTML>