[Gdal-dev] RFC: additional styles for text labels

Frank Warmerdam warmerdam at pobox.com
Sat Sep 23 12:25:00 EDT 2006


Andrey Kiselev wrote:
> On Tue, Sep 12, 2006 at 08:07:30PM +0400, Andrey Kiselev wrote:
>> I want to add several new options for text label styles. I need these
>> styles in order to be compatible with some complex GIS (more precisely
>> with the file format used by that GIS). The code is ready to be commited
>> if there will be no objections against these new options.
>>
>> The new label parameters are:
>>
>> w		Stretch.
>> 		The stretch factor changes the width of all characters in the
>> 		font by factor percent. For example, setting factor to 150
>> 		results in all characters in the font being 1.5 times (ie.
>> 		150%) wider. The default stretch factor is 100.
>>
>> st		Strike out text.
>>
>> h		Colour of the shadow of label.
>>
>> m:h		New placement mode.  Every word of text attached to polyline
>> 		is placed horizontally in its segment, anchor point is a
>> 		center of segment.
>>
>> m:a		New placement mode.  Every word of text attached to polyline
>> 		is stretched to fit the segment of polyline and placed along
>> 		that segment. The anchor point is a start of a segment.
>>
>> p: {10,11,12}	New anchor positions relative to text bottom
>> 		See the image attached. Note, that positions {1,2,3} are
>> 		relative to baseline, not a bottom of text box.
> 
> There weren't any objections, so I decided commit these changes. This
> doesn't affect backward compatibility and should be pretty harmless.

Andrey,

Please ensure that gdal/ogr/ogr_feature_style.html gets updated.  I will
say I'm hesitant to add a great deal more complication to the OGR Feature
Style specification and related code.  Implementation is already very spotty
in existing drivers and applications, and it seems like their *ought* to
be some sort of OGR based model for feature styling we could migrate to
at some point in the future.

I'd add that I feel that while this does not break backward compatibility,
it really ought to be a formal RFC with the approval requirements that go
with it.  I didn't get around to responding to this, presumably because
it came in during my email swamping around the conference.  Since I didn't
raise the RFC issue or other concerns in a timely fashion, I'm willing to
let it pass now unless there are concerns from other PSC members.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list