Skip to content

Commit

Permalink
Fix error in ALTO line polygons
Browse files Browse the repository at this point in the history
The correct line polygons are now included in ALTO outputs.
  • Loading branch information
viklofg committed Oct 11, 2024
1 parent 1f2b3a9 commit 1d2d391
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/htrflow/serialization/templates/alto
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
{%- endif %}
{%- for line in node.children %}
<TextLine ID="{{ line.label }}" HPOS="{{ line.coord.x }}" VPOS="{{ line.coord.y }}" HEIGHT="{{ line.height}}" WIDTH="{{ line.width }}">
{%- if node.polygon|length > 4 %}
{%- if line.polygon|length > 4 %}
<Shape>
<Polygon POINTS="{% for point in node.polygon %}{{ point|join(',') }}{% if not loop.last %} {% endif %}{% endfor %}"/>
<Polygon POINTS="{% for point in line.polygon %}{{ point|join(',') }}{% if not loop.last %} {% endif %}{% endfor %}"/>
</Shape>
{%- endif %}
{%- if line.children %}
Expand Down

0 comments on commit 1d2d391

Please sign in to comment.