Crates.io | arcrs |
lib.rs | arcrs |
version | 0.1.1-alpha.7 |
source | src |
created_at | 2021-01-04 13:14:44.868266 |
updated_at | 2021-01-19 17:57:29.754981 |
description | Thin Python wrapper for implementing Geoprocessing Tools using Rust. |
homepage | |
repository | |
max_upload_size | |
id | 331634 |
size | 39,951 |
Represents a thin Python wrapper for implementing Geoprocessing Tools using Rust. A Geoprocessing Tool performs specific tasks on geospatial data. The tools can be integrated in complex geospatial workflows. These workflows are usually designed by Geospatial Analysts in a "Model First" environment.
A custom Geoprocessing Tool can be implemented using Python. But, there is a need for implementing high sophistical geospatial analyses using solid rock runtime environments, libraries and frameworks. As an engineer I do not want to miss the capabilities of
Nowadays, the best option seems to be Rust.
pub trait GpTool {
fn label(&self) -> &str;
fn description(&self) -> &str;
fn parameters(&self) -> Vec<GpParameter>;
fn execute(&self, py: Python, parameters: Vec<PyParameterValue>, messages: PyGpMessages) -> PyResult<()>;
}
let pyresult = gp::tools::execute_tool(py, "arcpy", "ListFeatureClasses", ())?;
let results_as_text = pyresult.as_vecstr();
for result_as_text in results_as_text {
messages.add_message(&result_as_text)?;
}
Building the source by using cargo build release. There is a sample Python toolbox using the provided custom Geoprocessing Tools implemented in Rust.