[Mapserver-users] TTF question

Zamil Murji Zamil.Murji at divestco.com
Mon Jul 26 18:35:42 EDT 2004


Got it! Thanks Paul

My data statement is now:
DATA "the_geom from (select oid, *, chr(53) as well_symbol from main_well1) as foo"

And I can now use:
LABELITEM "well_symbol"

Thanks
Zamil

-----Original Message-----
From: Paul Ramsey [mailto:pramsey at refractions.net]
Sent: Monday, July 26, 2004 4:37 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


Yeah, you have to use the "custom SQL" syntax for your PostGIS DATA  
statement:

DATA "(select the_geom, chr(53) as well_symbol2 from main_well1) as foo"

Check the "Using Mapserver" section of the PostGIS manual.

Paul

On Monday, July 26, 2004, at 03:24 PM, Zamil Murji wrote:

> 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_geo 
> m, 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
>
>
      Paul Ramsey
      Refractions Research
      Email: pramsey at refractions.net
      Phone: (250) 885-0632





More information about the mapserver-users mailing list