[UMN_MAPSERVER-USERS] RE : [UMN_MAPSERVER-USERS] Labels Problem
Skweda O'Bomsawin
sobomsawin at KASSINI.COM
Wed Aug 11 15:05:07 PDT 2004
Sorry for the ambiguity of my first mail. Here is a more exhaustive part of
my map file:
LAYER #Roads Labels
CONNECTIONTYPE postgis
NAME "roads_labels"
# Connect to a remote spatial database
CONNECTION "user=XXXX password=XXXX dbname=roads host=localhost
port=5432"
# Get the lines from the 'geom' column of the table
DATA "wkb_geometry from roads"
STATUS OFF
TYPE LINE
MAXSCALE 200000
# Of the lines in the extents, only render the wide highways
UNITS DD
PROJECTION
"proj=latlong"
"datum=NAD83"
"ellps=GRS80"
END
# In the table, the label column name must be in smallcaps
LABELITEM "street"
LABELMAXSCALE 30000
CLASS
Name 'road_labels'
LABEL
TYPE TRUETYPE
FONT "arial"
SIZE 7
MINSIZE 4
MAXSIZE 256
POSITION CC
ANGLE AUTO
BUFFER 2
MINDISTANCE 150
MINFEATURESIZE 20
COLOR 100 50 0
SHADOWCOLOR 0 0 0
SHADOWSIZE 0 0
PARTIALS FALSE
END
END # Class
END #Layer
Hope this will help...
-----Message d'origine-----
De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la
part de Steve Lehr
Envoyé : 11 août 2004 17:29
À : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : Re: [UMN_MAPSERVER-USERS] RE : [UMN_MAPSERVER-USERS] Labels Problem
Skweda:
Its hard to tell from your map file you've given. Is the data you have an
annotation or is it a line type. If its a line type it should work, but if
its an annotation, the labels go where they have placed them. I always try
to get road center lines with a road name attribute. Perhaps if you have a
line_id with your road names and a matching attribute in the annotation you
can alter your DBF and merge in the road name attribute.
Steven Lehr
Assistant Professor
College of Engineering
Embry-Riddle Aeronautical University (LB159)
600 S. Clyde Morris Blvd.
Daytona Beach, FL 32114-3900
386-226-7740
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Skweda O'Bomsawin
Sent: Wednesday, August 11, 2004 5:24 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] RE : [UMN_MAPSERVER-USERS] Labels Problem
Thanks Steve, but that doesn't resolve my problem... I keep searching!
Skweda
-----Message d'origine-----
De : Stephen Woodbridge [mailto:woodbri at swoodbridge.com]
Envoyé : 11 août 2004 17:07
À : Skweda O'Bomsawin
Cc : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : Re: [UMN_MAPSERVER-USERS] Labels Problem
Try removing the "POSITION UC"
-Steve
Skweda O'Bomsawin wrote:
> Hi list!
>
>
>
> I have a weird label problem with Mapserver. I try to display street
names
> with an angle set to auto. My map file looks like this:
>
>
>
> CLASS
>
> Name 'road_labels'
>
> LABEL
>
> TYPE TRUETYPE
>
> FONT "arial"
>
> SIZE 7
>
> MINSIZE 4
>
> MAXSIZE 256
>
> POSITION UC
>
> ANGLE AUTO
>
> BUFFER 2
>
> MINDISTANCE 150
>
> MINFEATURESIZE 20
>
> COLOR 100 50 0
>
> SHADOWCOLOR 0 0 0
>
> SHADOWSIZE 0 0
>
> PARTIALS FALSE
>
> END
>
> END # Class
>
>
>
> As you can see on the picture I have sent, I am unable to get the labels
> centered on the street lines. Some names are as far as 400m from the
center
> of the street and the translation seems to be always parallel to the
street
> line. I'm using Mapserver 4.0 with Postgis 0.7 on a Whitebox Linux with
gd
> 1.8.4-12 and freetype 2.1.4-4.
>
>
>
> Thanks!
>
>
>
> Skweda O'Bomsawin
>
> sobomsawin at kassini.com
>
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.735 / Virus Database: 489 - Release Date: 2004-08-06
>
>
>
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.735 / Virus Database: 489 - Release Date: 2004-08-06
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.735 / Virus Database: 489 - Release Date: 2004-08-06
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.735 / Virus Database: 489 - Release Date: 2004-08-06
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.735 / Virus Database: 489 - Release Date: 2004-08-06
More information about the MapServer-users
mailing list