diff --git a/.gitignore b/.gitignore index b7faf40..ed51dcb 100644 --- a/.gitignore +++ b/.gitignore @@ -205,3 +205,8 @@ cython_debug/ marimo/_static/ marimo/_lsp/ __marimo__/ + + + +README_files/ +README.html diff --git a/README.md b/README.md index 2de90a8..9736062 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,13 @@ ## 1. Overview -**AMCR Viewer** is a QGIS plugin designed to facilitate direct access to the Digital Archive of the Archaeological Map of the Czech Republic (AMČR). It allows researchers to **query, retrieve, and visualize Fieldwork events[^1] data (metadata and geometry) directly within the GIS environment**, eliminating the need to manually export data from the web interface. **Only publicly accessible data are supported at the time** (accessibility = anonymous). +**AMCR Viewer** is a QGIS plugin designed to facilitate direct access to the Digital Archive of the Archaeological Map of the Czech Republic (AMČR). It allows researchers to **query, retrieve, and visualize *Fieldwork events* and *Sites* data (metadata and geometry) directly within the GIS environment**, eliminating the need to manually export data from the web interface. **Only publicly accessible data are supported at the time** (accessibility = anonymous). -[^1]: Only Fieldwork events (Akce) are supported at the time. ### Key Features * **Spatial Querying:** Option to filter records based on the current map canvas extent (Bounding Box). -* **Advanced Attribute Filtering:** Supports multi-criteria filtering using controlled vocabularies (Cadastral Area, District, Period, Type of Fieldwork event, Organization, Fieldwork Manager). +* **Advanced Attribute Filtering:** Supports multi-criteria filtering using controlled vocabularies. * **Dynamic Geometry Retrieval:** Automatically downloads and categorizes spatial data into Point, Line, and Polygon layers. * **Semantic Interoperability:** Automatically translates internal system codes into human-readable labels using the AIS CR API. @@ -44,14 +43,14 @@ ### 3.1 Data Retrieval -To initiate a search query, click the **Load AMCR Data** icon. The filter dialog provides the following options: +To initiate a search query, click either the **Stáhnout data akcí** or the **Stáhnout data lokalit** icon from the dropdown menu. The filter dialog provides the following options. Shown options vary based on the choosed tool. * **Spatial Filter:** *Checkbox "Limit search to current map extent":* If checked, the query is restricted to the geographical area currently visible in the QGIS canvas. If unchecked, the query searches the entire database (use with caution regarding data volume). -* It is possible to view only those Fieldwork events with positive outcome, if "Positive findings only" is checked. Only PIANs marked as (or rather PIANs belonging to Documentation units marked as) "Type of evidence" = "positive" are rendered. +* It is possible to view only those Fieldwork events with positive outcome, if "Positive findings only" is checked. Only *PIANs* marked as (or rather *PIANs* belonging to Documentation units marked as) "Type of evidence" = "positive" are rendered. * **Attribute Filters:** - * The dialog utilizes "Picker" widgets for controlled vocabularies (Region, District, Cadastral area, Organisation, Period, Activity Area, PIAN accuracy. + * The dialog utilizes "Picker" widgets for controlled vocabularies (common: Region, District, Cadastral area, Period, Activity Area, *PIAN* accuracy; *events* related: Organisation, Researcher, Event type; *sites* related: Site type and class, Level of confidence, State of preservation). * Click **Select...** to open a searchable selection window. Multiple values can be selected simultaneously (Logic: OR). @@ -104,7 +103,7 @@ The plugin interacts with three primary endpoints of the AIS CR infrastructure: ### 4.3 Data Persistence * **Vocabularies:** Static vocabularies (e.g., Periods, Regions) are stored in `codelists/heslar.csv`. -* **Dynamic Data:** The list of investigators is downloaded on-demand and cached in `codelists/vedouci.csv`. +* **Dynamic Data:** The list of researchers is downloaded on-demand and cached in `codelists/vedouci.csv`. * **Layers:** Output layers are created as `memory` layers. They are non-persistent and will be lost if QGIS is closed without saving. ### 4.4 Constraints @@ -115,3 +114,4 @@ The plugin interacts with three primary endpoints of the AIS CR infrastructure: ## 6. Links and resources * [AMCR/Digiarchive Documentation](https://amcr-help.aiscr.cz/) (only in Czech). +* [AMCR Viewer tutorial](https://amcr-help.aiscr.cz/digiarchiv/qgis-viewer.html) (only in Czech). diff --git a/amcr_viewer/amcr_tools.py b/amcr_viewer/amcr_tools.py index 9dac666..dc64df5 100644 --- a/amcr_viewer/amcr_tools.py +++ b/amcr_viewer/amcr_tools.py @@ -46,7 +46,7 @@ def load_amcr_data(canvas, bb, filters=None, typ_dat="akce"): url = "https://digiarchiv.aiscr.cz/api/search/query" - iface.messageBar().pushMessage("AMCR", "Hledám akce...", level=1) + iface.messageBar().pushMessage("AMCR", "Hledám záznamy...", level=1) QApplication.setOverrideCursor(Qt.WaitCursor) try: @@ -221,7 +221,7 @@ def load_amcr_data(canvas, bb, filters=None, typ_dat="akce"): pian_lookup[dj_pian_value].append(dj_meta) if not target_pian_ids: - iface.messageBar().pushMessage("AMCR", f"Nalezeno {len(docs)} akcí, ale žádná nemá geometrii.", level=1) + iface.messageBar().pushMessage("AMCR", f"Nalezeno {len(docs)} záznamů, ale žádný nemá geometrii.", level=1) return @@ -233,7 +233,7 @@ def load_amcr_data(canvas, bb, filters=None, typ_dat="akce"): docs_pian = [] BATCH_PIAN = 50 - iface.messageBar().pushMessage("AMCR", f"Akcí: {len(docs)} (z toho {actions_with_geom} s mapou). Stahuji {total_pians} unikátních geometrií, vykresluji {target_pian_ids_count} geometrií...", level=1) + iface.messageBar().pushMessage("AMCR", f"Záznamů: {len(docs)} (z toho {actions_with_geom} s mapou). Stahuji {total_pians} unikátních geometrií, vykresluji {target_pian_ids_count} geometrií...", level=1) # Seznam polí pro PIAN fl_pian = ["ident_cely", "pian_typ", "pian_chranene_udaje", "pian_presnost"] @@ -269,7 +269,7 @@ def load_amcr_data(canvas, bb, filters=None, typ_dat="akce"): if typ_dat == "akce": archeologicky_zaznam = "Akce" elif typ_dat == "lokalita": - archeologicky_zaznam = "ID lokality" + archeologicky_zaznam = "Lokalita" # Definice sloupců atributové tabulky cols = [ @@ -412,7 +412,7 @@ def load_amcr_data(canvas, bb, filters=None, typ_dat="akce"): added += len(f) if added > 0: - iface.messageBar().pushMessage("AMCR", f"Hotovo. Akcí: {len(docs)} (s geom: {actions_with_geom}). Vykresleno: {added} prvků.", level=0) + iface.messageBar().pushMessage("AMCR", f"Hotovo. Záznamů: {len(docs)} (s geom: {actions_with_geom}). Vykresleno: {added} prvků.", level=0) else: iface.messageBar().pushMessage("AMCR", "Žádná data k zobrazení.", level=1) diff --git a/amcr_viewer/metadata.txt b/amcr_viewer/metadata.txt index 490d1f7..80eb118 100644 --- a/amcr_viewer/metadata.txt +++ b/amcr_viewer/metadata.txt @@ -1,16 +1,17 @@ # This file contains metadata for your plugin. -# This file should be included when you package your plugin.# Mandatory items: +# This file should be included when you package your plugin. +# Mandatory items: [general] name=AMČR Viewer qgisMinimumVersion=3.4 description=Viewing and downloading the AMČR data. -version=1.1.0 +version=1.2.0 author=David Spáčil email=spacil@arub.cz -about=This plugin is intended for downloading the data (Fieldwork events data only, at the time) from the Digiarchive of the Archaeological Map of the Czech Republic (AMCR). As of now, only publicly accessible data can be downloaded. +about=This plugin is intended for downloading the data (Fieldwork events data only, at the time) from the Digiarchive of the Archaeological Map of the Czech Republic (https://digiarchiv.aiscr.cz/). As of now, only publicly accessible data can be downloaded. tracker=https://github.com/ARUP-CAS/aiscr-qgis-amcr-viewer/issues repository=https://github.com/ARUP-CAS/aiscr-qgis-amcr-viewer