This repository houses Python scripts intended for use within QGIS and the Archaeology sector.
The ArchDensity
script calculates the total area in square meters of archaeological features within a specified excavation area. Additionally, it computes the density of these features within the excavation zone, excluding any invalid geometries during calculation.
To utilize the ArchDensity
script:
- Open QGIS and access the Python Console.
- Copy and paste the script into the console or save it as a Python file in the QGIS Python directory.
- Ensure the necessary QGIS processing modules are installed.
- Execute the script and provide inputs for the Excavation Area and Archaeology Area.
- QGIS (version X.X or later)
- PyQt5 (QGIS-compatible version)
The Transect Generator
script creates transects within a defined polygon area based on specified intervals and directions. It generates lines that intersect with the polygon layer, creating transects suitable for archaeological surveys or land analysis.
To generate transects using the script:
- Load the polygon layer defining the area in QGIS.
- Ensure the script is accessible within the QGIS Python environment.
- Invoke the
generate_transects
function and provide the required parameters: polygon layer name, interval distance, and direction.
- QGIS (version X.X or later)
- PyQt5 (QGIS-compatible version)
Here's an example of how to generate transects:
generate_transects("ExcavationArea", 10, "N-S")