{% extends "default.html" %} {% block title %}Picture | gigadata{% endblock %} {% macro shape_label(x, y, text) %} {% if text %}
{{ text }}
{% endif %} {% endmacro %} {% block content %}

{{ resource.title }}

{{ resource.description }}

Original source | View | Download | Annotate

{{ resource.title }} {% for region in resource.regions %} {% if region.json.type == "bbox" %} {% set centre_x = region.json.shape.x + region.json.shape.w / 2 %} {% set centre_y = region.json.shape.y + region.json.shape.h / 2 %} {{ shape_label(centre_x, centre_y, region.object_id) }} {% elif region.json.type == "polygon" %} {% set top = region.json.shape | sort(attribute='y') | last %} {% set left = region.json.shape | sort(attribute='x') | first %} {% set bottom = region.json.shape | sort(attribute='y') | first %} {% set right = region.json.shape | sort(attribute='x') | last %} {% set centre_x = (left.x + right.x) / 2 %} {% set centre_y = (top.y + bottom.y) / 2 %} {{ shape_label(centre_x, centre_y, region.object_id) }} {% elif region.json.type == "polyline" %} {# Median point #} {% set centre_x = region.json.shape | map(attribute="x") | median %} {% set centre_y = region.json.shape | map(attribute="y") | median %} {{ shape_label(centre_x, centre_y, region.object_id) }} {% elif region.json.type == "point" %} {{ shape_label(region.json.shape.x, region.json.shape.y, region.object_id) }} {% endif %} {% endfor %}
Type: {{ resource.nature.id }} File format: {{ resource.file_format }} Size: {{ size[0] }}×{{ size[1] }}
{% set licences = resource.licences | map(attribute="licence") | list %} Available under: {% for licence in licences %} {{ licence.title }} {% if not loop.last %}, {% endif %} {% endfor %} {% for licence in licences %} {% if licence.logo_url %} {# An equivalent link already exists, only one is focusable #} {% endif %} {% endfor %}
{% endblock %}