[Mapserver-users] TTF question

Zamil Murji Zamil.Murji at divestco.com
Mon Jul 26 18:24:38 EDT 2004


I changed my DATA statement to:
DATA "the_geom, chr(53) as well_symbol2 from main_well1"

I hardcoded the 53.

but I cannot do the following:
LABELITEM "well_symbol2"

Upon further inspection the sql statement that is submitted to postgres is wrong:
SELECT uwi::text,well_symbol2::text,asbinary(force_collection(force_2d(the_geom, chr(53) as well_symbol2)),'NDR'),OID::text from main_well1 WHERE the_geom, chr(53) as well_symbol2 && setSRID('BOX3D(-110.512694599519 49.2613550490844,-110.341093492594 49.3487157185165)'::BOX3D, find_srid('','main_well1','the_geom, chr(53) as well_symbol2') )

It fails with the error:
ERROR:  parser: parse error at or near "as" at character 90

Any more suggestions?
Thanks in advance,
Zamil

-----Original Message-----
From: Paul Ramsey [mailto:pramsey at refractions.net]
Sent: Monday, July 26, 2004 3:08 PM
To: Zamil Murji
Cc: mapserver-users at lists.gis.umn.edu;
postgis-users-bounces at postgis.refractions.net
Subject: Re: [Mapserver-users] TTF question


You will have to get the character, but you might find you can do it 
on-the-fly in your PostgreSQL query using the chr() function.

select the_geom,chr(glyph) from thetable

On Monday, July 26, 2004, at 12:40 PM, Zamil Murji wrote:

> Hello,
>
> I'm using mapserver 4.2. I have a layer that uses a postgis db. 
> Everything works fine when I use a simple symbol like a filled circle 
> to display the points. Inside the db, I have a column that has the 
> glyph index into the TTF file to show. So instead of showing a filled 
> circle, I would like to display the glyph index. Can this be done? Or 
> should I find out what character corresponds to that glyph index, 
> create another column, perform an update statement to convert the 
> glyph index to the character, and then display this layer as type 
> annotation?
>
> Any help would be appreciated.
> Zamil
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
      Paul Ramsey
      Refractions Research
      Email: pramsey at refractions.net
      Phone: (250) 885-0632





More information about the mapserver-users mailing list