[general]
name=TRACT Geolocation Formatter
qgisMinimumVersion=3.0
qgisMaximumVersion=4.99
description=Validate, clean, and convert geolocation layers into the TRACT GeoJSON template for sustainability and traceability workflows.
version=0.5.0
author=Luis Carrasco
email=luiscartor@gmail.com

about=The TRACT Geolocation Formatter is a QGIS plugin designed to help GIS practitioners prepare geolocation datasets for ingestion into the TRACT platform. The plugin validates and cleans polygon geometries, standardizes coordinate precision, and converts layers into the TRACT GeoJSON template format. It detects common geometry issues such as self-intersections, duplicate vertices, invalid polygons, and schema inconsistencies, while providing a validation report to help users identify and correct problematic features before upload.


repository=https://github.com/tract-eco/tract-geolocation-formatter
tracker=https://github.com/tract-eco/tract-geolocation-formatter/issues
homepage=https://github.com/tract-eco/tract-geolocation-formatter

hasProcessingProvider=no

changelog=
    0.5.0
    - Optional fixing of polygon holes. When holes are found you choose once per
      run: Fill (area grows), Cut a thin slit (area preserved), or Leave as-is
      (flagged). Fill and Cut ask you to confirm, as they alter the plot boundary.
      Fixed features are re-checked, so a hole-only problem becomes READY.
    - Z values are no longer stripped — TRACT accepts them, so Z is preserved end
      to end in the output GeoJSON. X/Y are still truncated to 6 decimals.
    - Master Data templates updated to TRACT's current schema: Reference_ID is now
      Node_ID in both templates, and the Farms GeoJson column has been dropped.
    - Cleaner report pop-up: labelled sections with counts, shown in the normal UI
      font with bold headings, and all output paths grouped at the end. Same
      information as before; the CSV validation report is unchanged.
    - Master Data files are now written without openpyxl, using only the Python
      standard library. The plugin ships 5.3 MB smaller with no third-party code,
      and generated files keep everything the template had — including the country
      drop-down, which was previously lost.
    0.4.0
    - Optional: split the clean GeoJSON output into 2–10 files so large datasets
      upload to TRACT under the size limit. Features sharing a NodeID always stay in
      the same file; feature counts are balanced across files. You cannot request
      more files than there are unique NodeIDs (you'll get an error if you try). On a
      successful split the combined file is replaced by the split files. (GH-8)
    - Lowered the minimum plot area threshold from 0.05 ha to 0.001 ha to
      harmonize with TRACT's platform validation.
    - Report: coordinate rounding and Z-value removal are now summarized as feature
      counts instead of one line per feature, so the summary is far less cluttered.
      Other repairs are still listed per feature, and the full per-feature log
      remains in the CSV validation report. (GH-9)
    0.3.0
    - Compatible with QGIS 4 (Qt6/PyQt6) and QGIS 3.x (Qt5/PyQt5) from a single codebase (GH-4)
    - Dialog UI now loaded at runtime from .ui (no generated form file shipped) (GH-4)
    - Replaced compiled Qt resources with filesystem icon loading (GH-4)
    - Internal: scoped Qt enums, .exec() everywhere, version-safe QgsField string type (GH-4)
    - Dialog is now scrollable so the OK / Cancel buttons stay reachable on small / laptop screens, even when the "Build from expression" controls expand (GH-5)
    - Optional Master Data XLSX writer alongside the GeoJSON output: pick Farms or Farmer Groups, select a country from TRACT's published list, and the plugin populates the TRACT-published template with one row per unique NodeID (GH-6)
    - Report approximate (lon, lat) coordinates of detected boundary self-intersections in the validation message, so users can copy them into QGIS's "Zoom to coordinate" widget to fix the geometry in place (GH-7)
    0.2.0
    - Preserve original input fields in the output GeoJSON alongside TRACT fields
    - Handle field name clashes with TRACT fields using _orig suffix
    - Exclude fields mapped to NodeID/PlotID via "Use existing field" from output
    - Check minimum area on individual polygon parts for multipolygon features
    - Separate reporting for whole-polygon vs per-part area issues in summary report
    - Add "Build from expression" option for NodeID and PlotID (prefix + up to 2 fields + suffix with custom separator)
    - Add PlotID UI state management (enable/disable controls based on selected option)
    0.1.0 Initial release
    - Validate polygon geometries
    - Remove duplicate vertices
    - Standardize coordinates
    - Export TRACT GeoJSON template
    - Generate validation report

# Tags
tags=GIS, GeoJSON, geometry validation, geolocation, QGIS, data cleaning, sustainability, traceability

category=Vector
icon=icon.png

# experimental flag
experimental=True




