polygonize_text#
- zeroheliumkit.src.utils.polygonize_text(text: str = 'abcdef', size: float = 1000) MultiPolygon[source]#
Converts text to a MultiPolygon geometry.
- Parameters:
text (str, optional) – text in str format. Defaults to “abcdef”.
size (float, optional) – defines the size of the text. Defaults to 1000.
- Returns:
A MultiPolygon object representing the text.
- Return type:
MultiPolygon
- Raises:
ValueError – If a character in the text does not have a corresponding geometry.
Example
>>> result = polygonize_text("Hello World", size=1000) >>> print(result) MULTIPOLYGON ...