[mapserver-users] 5.6.1 version and labels

Alan Boudreault aboudreault at mapgears.com
Tue Jan 12 16:29:06 EST 2010


Carlos, glad to hear that your issue is fixed.

This is a new feature of MapServer 5.6: the ability to automatically scale the 
symbology when resolution changes so that the map maintains the same look at 
each resolution. For more info: http://www.mapserver.org/development/rfc/ms-
rfc-55.html

What's happen with your mapfile is that you set the resolution to 99 (which 
means that you wanted an output map of reso 99), but you did not set the 
defresolution (which tells mapserver the initial resolution your mapfile is 
supposed to be). In this case, the behavior of mapserver is to scale all the 
values to preserve the look of the mapfile. Without this functionnality, to 
convert a mapfile that use initialy a resolution of 72 to a printable mapfile  
of resolution 300 (example), you would have to convert all the value/size of 
symbol line etc... manually.

regards,
Alan

On January 12, 2010 03:56:46 pm Carlos Ruiz wrote:
> Oh, I tought it was one or the other. Adding DEFRESOLUTION fixes the
>  label's visual size.
> 
> Why do I need now to add this tag if I never used before ?
> 
> Thanks for all, Alan
> 
> 
> IC Carlos Ruiz
> 
> From: Alan Boudreault <aboudreault at mapgears.com>
> 
> To: Carlos Ruiz <boolean10001 at yahoo.com>
> Cc: mapserver-users <mapserver-users at lists.osgeo.org>
> Sent: Tue, January 12, 2010 2:37:46 PM
> Subject: Re: [mapserver-users] 5.6.1 version and labels
> 
> emm, I mean, did you *added* the DEFRESOLUTION 99 ? and not replaced the
> RESOLUTION 99. You should have both.
> 
> Alan
> 
> On January 12, 2010 03:35:00 pm Carlos Ruiz wrote:
> > Hey Alan,
> >
> >
> > Using DEFRESOLUTION 99 now makes all the labels smaller than they was.
> >
> > Any other idea ?
> > Thanks for helping me on this issue
> >
> >
> > IC Carlos Ruiz
> >
> >
> >
> > ________________________________
> > From: Alan Boudreault <aboudreault at mapgears.com>
> > To: mapserver-users at lists.osgeo.org
> > Cc: Carlos Ruiz <boolean10001 at yahoo.com>; "Lime, Steve D (DNR)"
> >  <Steve.Lime at state.mn.us> Sent: Tue, January 12, 2010 1:43:48 PM
> > Subject: Re: [mapserver-users] 5.6.1 version and labels
> >
> > Carlos, you haven't attached the images.
> >
> > What's happen if you add the following line into your map definition:
> >
> > DEFRESOLUTION 99
> >
> > Alan
> >
> > On January 12, 2010 02:26:18 pm Carlos Ruiz wrote:
> > > Thanks Steve,
> > >
> > > Lets see something simple that is changing in the new Mapserver
> > > version, here's the LAYER definition:
> > >
> > > LAYER
> > >
> > >     NAME "my name"
> > >     TYPE annotation
> > >     STATUS ON
> > >     TRANSFORM ll
> > >     UNITS PIXELS
> > >
> > >       FEATURE
> > >           POINTS
> > >               135 -10
> > >         END
> > >         TEXT "my text"
> > >       END
> > >
> > >       CLASS
> > >         LABEL
> > >               FONT "arial"
> > >               TYPE TRUETYPE
> > >               SIZE 8
> > >               BUFFER 1
> > >               COLOR 0 0 0
> > >               BACKGROUNDCOLOR 255 255 255
> > >               FORCE TRUE
> > >         END
> > >     END
> > >
> > > END
> > >
> > > And now the MAP definition:
> > >
> > > MAP
> > >
> > >     EXTENT 427469.4518 2086656.9173 860880.8507 2523277.2962
> > >     FONTSET "fonts/fonts.txt"
> > >     SYMBOLSET "symbols.txt"
> > >     SIZE 640 480
> > >     STATUS ON
> > >
> > >     OUTPUTFORMAT
> > >         NAME jpeg
> > >         DRIVER "GD/JPEG"
> > >         MIMETYPE "image/jpeg"
> > >         IMAGEMODE RGB
> > >         EXTENSION "jpg"
> > >         FORMATOPTION "QUALITY=80"
> > >     END
> > >
> > >     QUERYMAP
> > >         COLOR 255 255 0
> > >         STYLE NORMAL
> > >     END
> > >
> > >     RESOLUTION 99
> > >
> > >     UNITS meters
> > >
> > > I've attached how it looks with the 5.4 version (before.jpg) and how it
> > >  looks now with the 5.6.1 version (after.jpg).
> > >
> > > Hope this helps you to find this strange behavior
> > >
> > > Thanks in advance !
> > >
> > >
> > > IC Carlos Ruiz
> > >
> > > ________________________________
> > > From: "Lime, Steve D (DNR)" <Steve.Lime at state.mn.us>
> > > To: Carlos Ruiz <boolean10001 at yahoo.com>;
> > > "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
> > > Sent: Mon, January 11, 2010 3:55:08 PM Subject: RE: [mapserver-users]
> > > 5.6.1 version and labels
> > >
> > >
> > > What does your layer def look like? What renderer are you using?
> > > Are you setting a specific RESOLUTION? There may be some subtle sizing
> > >  changes but I haven’t run across anything significant yet.
> > >
> > > Before and after images are helpful too.
> > >
> > > Steve
> > >
> > > From:mapserver-users-bounces at lists.osgeo.org
> > >  [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Carlos
> > > Ruiz Sent: Monday, January 11, 2010 3:43 PM
> > > To: mapserver-users at lists.osgeo.org
> > > Subject: [mapserver-users] 5.6.1 version and labels
> > >
> > > Hi all,
> > >
> > > I have updated my Mapserver version from 5.4 to 5.6.0 (and later to
> > > 5.6.1 because the queries). There's something odd with the labels
> > > because appears bigger than i had defined.
> > >
> > > Does anybody knows why ?
> > >
> > > Thanks in advance
> > > IC
> > > Carlos Ruiz
> 

-- 
Alan Boudreault
Mapgears
http://www.mapgears.com


More information about the mapserver-users mailing list