Displaying Mapinfo text layer with rotation {Scanned} {Scanned}
Tamas Szekeres
szekeres.tamas at FREEMAIL.HU
Mon Aug 8 07:11:58 PDT 2005
Dear Zoltán!
I've debugged the mapserver's code and the following things could really
solve my problem:
Using "STYLEITEM AUTO" I had to set up a proper fontset in accordance with
the settings of the Mapinfo data source. A least a "default" font should
be declared in order to draw the labels with truetype fonts. Without this,
the layer is rendered using raster fonts that could not been rotated at
all.
The settings of the datasource is validated in the msOGRGetAutoStyle
function in mapogr.cpp. In most of my MapInfo files the label size is set
to zero, so the labels are rendered with the default minimum size (4) at
all scales (msGetLabelSize). (The current scale factor is multiplied with
the label size of the class which is zero.) To workaround this, I had to
change the code as setting the minimum label size coming from the OGR
source to 1.
I'm waiting for a correct solution, which can be suited into the overall
concept of the program.
Many thanks, for your suggestions,
Tamas Szekeres
On Fri, 5 Aug 2005 22:11:11 -0100, Siki Zoltan <siki at AGT.BME.HU> wrote:
>Hi Tamas,
>
>Some alternatives ...
>If you have MapInfo you can add a column for rotational angle and
>you can fill it up with a SQL command
>Update table_name set angle_column = ObjectGeography(obj, 7)
>
>I usually generate a line tab from the texts and display them as
>labels with ANGLE AUTO. I also use shape files where this is the solution
>to position annotations.
>
>To make your labels size depending on the zoom add
> SYMBOLSCALE scale
>line to your layer definition, the label SIZE parameter will be used at
>the given scale, at other scales mapserver will change the size of labels.
>
>Bye,
>Zoltan
>
>On Fri, 5 Aug 2005, Tamas Szekeres wrote:
>
>> How to display Mapinfo "text" layer correctly? It seems that using
>> STYLEITEM "AUTO" and TYPE ANNOTATION ensures the features to display,
but
>> the angle or the font display setting have not taken into account.
>>
>> The rotation angle and the displayable text do not appear as a separate
>> attribute, so it is not possible to set the appearance manually (eg. by
>> using LABELANGLEITEM).
>>
>> How to render the labels with the size depending on the scale as Mapinfo
>> does?
>>
>>
>> I would greatly thankful for any help.
>>
>> Tamas Szekeres
>>
More information about the MapServer-users
mailing list