[mapserver-users] labeling

Joe Bussell joe at otsys.com
Wed Jul 10 19:32:33 EDT 2002


This is an artifact of my data source.  I have data from five counties
which had to be assembled into a tile set first.  The classitem is
necesary for the expression syntax to work I think.  It defines the bit
in the *.dbf file that you split the cases on.

Joe Bussell
On Time Systems

On Wed, Jul 10, 2002 at 04:19:01PM -0700, Seamus Thomas Carroll wrote:
> My method is very similiar except you have TILEINDEX and I have DATA and I 
> dont use CLASSITEM.  My EXPRESSIONs work without CLASSITEM.
> 
> Is there a reason for using TILEINDEX over DATA and using CLASSITEM?
> 
> Seamus
> 
> 
> 
> 
> 
> On Wed, 10 Jul 2002, Joe Bussell wrote:
> 
> > We use a road classification value which is present in our *.dbf files.
> > The trick is to define different classes depending on the data.
> > 
> > LAYER
> >     NAME    cityCenter
> >     GROUP   defaultLayer
> >     TYPE    POINT
> >     TILEINDEX td_sm.shp
> >     STATUS  ON
> >     LABELITEM "NAME"
> >     CLASSITEM "DISPCLASS"
> >     MAXSCALE 9000
> > 
> >     CLASS
> >         EXPRESSION ( ( [DISPCLASS] = 3 ) )
> >         #NAME    "Big City"
> >         ...
> >     END
> > 
> >     CLASS
> >         EXPRESSION ( ( [DISPCLASS] = 6 ) )
> >         #NAME    "Medium City"
> >         ...
> >     END
> > END
> > 
> > For roads it is very similar, except I have a functional road class to
> > work with.
> > 
> > Joe Bussell
> > On Time Systems
> > 
> > 
> >         
> > On Wed, Jul 10, 2002 at 12:41:26PM -0700, Seamus Thomas Carroll wrote:
> > > Hi,
> > > 
> > > I am labeling various cities and roads I have the problem of roads and  
> > > smaller cities being labelled and the larger cities not being labeled.  
> > > All cities are part of the same layer and all roads are part of the same layer.
> > > The map file is outlined as follows:
> > > 
> > > LAYER # road drawing layer
> > > 
> > >   CLASS 
> > >     # highway drawing layer
> > >   END
> > > 
> > >   CLASS
> > >     # road drawing layer
> > >   END
> > > END # end of road drawing layer
> > > 
> > > LAYER # road label layer
> > > 
> > >   CLASS
> > >     # highways label info
> > >   END
> > > 
> > >   CLASS
> > >     # road label info
> > >   END
> > > END # end of road label layer
> > > 
> > > 
> > > LAYER # city layer
> > > 
> > >   CLASS 
> > >     #Largest city info
> > >     #Labeling and drawing of points
> > >   END
> > > 
> > >   CLASS
> > >     #Medium city info
> > >   END
> > > 
> > >   CLASS
> > >     #Small city info
> > >     #Labeling and drawing of points
> > >   END
> > > END # end of city layer
> > > 
> > > I want the labeling to go in this order of precedence:
> > > 1) larger city
> > > 2) small city
> > > 3) highway
> > > 4) road
> > > Any suggestions?
> > > 
> > > At some zoom levels things look correct and at others they dont.  I have 
> > > tried changing the order of the layers and the order of the classes 
> > > within the layers.  The FORCE command wont be useful because there are 
> > > major cities side by side and I dont want overlap.
> > > Thanks for reading this far and any suggestions would be much appreciated.
> > > 
> > > Seamus
> > > 
> > > 
> > 
> 
> 



More information about the mapserver-users mailing list