[GRASS-dev] how to derive polygons (bounding boxes) from text strings

gisfisch at t-online.de gisfisch at t-online.de
Fri Dec 9 01:29:02 PST 2022


Hello list,

 

I have a point feature layer with attributes for a text string (call it
'label') and the fontsize in map units (which are meters in my case).

Is there a way in Grass to derive polygons (like boundig boxes) from this
input information which enclose the label string letter  when those are used
to label the points?

For those who know ArcMap: what I mean is exactly what happens when you
export Annotation features as Shapes in ArcCatalog: you get a polygon layer
in which each text string has a polygon hull which fits the height and
width, respectively.

 

>From a developer, I heard that this can be done d_get_text_box from display
library, which is not exposed to the end user.

 

Since I am not a programmer, I am looking for help how to use
d_get_text_box. My goal ist o integrate it in a simple Python script which I
already have. This script can import Shapefiles, do simple GIS processing
using GRASS modules and write the shapes back.

 

Of course, if coding is necessary to accomplish this, I will pay for it.

 

thank you and best regards, Uwe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20221209/84027416/attachment.htm>


More information about the grass-dev mailing list