-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.njk
More file actions
171 lines (160 loc) · 8.76 KB
/
Copy pathindex.njk
File metadata and controls
171 lines (160 loc) · 8.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
---
layout: layouts/home
pageType: home
title: Python GIS CLI Toolcraft & Batch Processing
description: A practitioner-focused resource for building, packaging, testing, and deploying command-line tools for spatial workflows.
---
<section class="home-hero" aria-label="Hero">
<div class="page-wrapper home-hero__inner">
<div class="home-hero__badge">Python · GIS · CLI · Batch Processing</div>
<h1 class="home-hero__title">
Build Powerful<br>
<span>Geospatial CLI Tools</span>
</h1>
<p class="home-hero__desc">
A practitioner-focused resource for building, packaging, testing, and deploying
Python command-line tools for spatial workflows — from argument parsing to
production-grade async batch pipelines.
</p>
<div class="hero-cta-group">
{% for section in site.sections %}
<a href="{{ section.url }}" class="btn btn--primary">
<span class="btn__icon" aria-hidden="true">{{ section.icon }}</span>
{{ section.title }}
</a>
{% endfor %}
</div>
</div>
</section>
<section class="home-intro" aria-label="About this site">
<div class="page-wrapper">
<p>
Modern geospatial workflows demand more than ad-hoc scripts. Whether you're automating
raster tile processing across thousands of files, building internal toolchain CLIs for
a GIS team, or packaging reusable spatial utilities as open-source libraries,
<strong>Python GIS CLI Toolcraft & Batch Processing</strong> gives you the architecture
patterns, code templates, and production hardening techniques you need to ship tools
that scale.
</p>
<p>
Each guide is written for working practitioners — Python GIS developers, DevOps engineers,
and open-source maintainers — who need code that runs reliably in CI/CD pipelines,
Kubernetes jobs, and local development environments alike. You'll find complete,
runnable implementations alongside the reasoning behind every architectural decision.
</p>
<p>
The content is organised into two complementary sections: the first covers the
<strong>CLI layer</strong> — argument parsing with Typer and Click, subcommand organisation,
Rich console output, configuration management, and packaging & CI/CD for the
notoriously fragile GDAL stack. The second dives into the
<strong>processing layer</strong> — async I/O, multiprocessing, chunked vector reading,
memory-safe pipelines, dead-letter error handling, and checkpointing for long-running
spatial batch jobs.
</p>
</div>
</section>
<section class="home-start-here" aria-label="Start here — recommended reads">
<div class="page-wrapper">
<h2 class="home-start-here__heading">Start here</h2>
<p class="home-start-here__intro">
These guides are the highest-value entry points — each one is self-contained,
runnable, and covers a pattern you will reach for on every real project.
</p>
<div class="start-here-grid">
<a href="/cli-architecture-design-patterns/argument-parsing-with-typer/how-to-build-a-typer-cli-for-shapefile-conversion/" class="start-card">
<span class="start-card__tag">CLI layer</span>
<strong class="start-card__title">Build a Typer CLI for Shapefile Conversion</strong>
<p class="start-card__desc">
A complete walkthrough of argument parsing, type-safe options, and structured
error output using Typer — built around a real shapefile reprojection tool.
</p>
<span class="start-card__cta" aria-hidden="true">Read guide →</span>
</a>
<a href="/cli-architecture-design-patterns/argument-parsing-with-typer/adding-auto-completion-to-python-spatial-cli-tools/" class="start-card">
<span class="start-card__tag">CLI layer</span>
<strong class="start-card__title">Add Shell Auto-Completion to Spatial CLI Tools</strong>
<p class="start-card__desc">
How to wire Typer's built-in completion support to Bash, Zsh, and Fish so your
GIS tool behaves like a first-class command-line citizen.
</p>
<span class="start-card__cta" aria-hidden="true">Read guide →</span>
</a>
<a href="/spatial-batch-processing-async-workflows/async-io-for-raster-processing/processing-100k-geojson-files-with-python-asyncio/" class="start-card">
<span class="start-card__tag">Processing layer</span>
<strong class="start-card__title">Process 100 k GeoJSON Files with Python asyncio</strong>
<p class="start-card__desc">
End-to-end async pipeline for high-volume vector file I/O: concurrency controls,
back-pressure, structured error capture, and performance benchmarks.
</p>
<span class="start-card__cta" aria-hidden="true">Read guide →</span>
</a>
<a href="/spatial-batch-processing-async-workflows/multiprocessing-geospatial-tasks/optimizing-gdal-batch-operations-with-multiprocessing-pool/" class="start-card">
<span class="start-card__tag">Processing layer</span>
<strong class="start-card__title">Optimise GDAL Batch Operations with multiprocessing.Pool</strong>
<p class="start-card__desc">
Saturate all CPU cores with GDAL raster transforms while keeping memory bounded —
covers worker initialisation, chunk sizing, and graceful failure handling.
</p>
<span class="start-card__cta" aria-hidden="true">Read guide →</span>
</a>
<a href="/spatial-batch-processing-async-workflows/error-handling-in-spatial-pipelines/logging-spatial-transformation-results-to-structured-json/" class="start-card">
<span class="start-card__tag">Processing layer</span>
<strong class="start-card__title">Log Spatial Transformation Results to Structured JSON</strong>
<p class="start-card__desc">
Emit machine-readable log lines from batch pipelines so failures are queryable,
retryable, and observable in log aggregation systems.
</p>
<span class="start-card__cta" aria-hidden="true">Read guide →</span>
</a>
<a href="/spatial-batch-processing-async-workflows/progress-tracking-in-batch-jobs/implementing-checkpointing-for-interrupted-spatial-batches/" class="start-card">
<span class="start-card__tag">Processing layer</span>
<strong class="start-card__title">Implement Checkpointing for Interrupted Spatial Batches</strong>
<p class="start-card__desc">
Persist progress to disk so a crashed or cancelled job can resume from the last
successful record — essential for multi-hour raster pipelines.
</p>
<span class="start-card__cta" aria-hidden="true">Read guide →</span>
</a>
<a href="/cli-architecture-design-patterns/packaging-and-cicd/building-a-docker-image-with-gdal-for-a-python-cli/" class="start-card">
<span class="start-card__tag">CLI layer</span>
<strong class="start-card__title">Build a Docker Image with GDAL for a Python CLI</strong>
<p class="start-card__desc">
A reproducible multi-stage Dockerfile that pins GDAL and ships your geospatial CLI
so it runs identically in CI and production — no more "works on my machine".
</p>
<span class="start-card__cta" aria-hidden="true">Read guide →</span>
</a>
<a href="/spatial-batch-processing-async-workflows/chunked-vector-data-reading/pyogrio-vs-fiona-for-large-vector-datasets/" class="start-card">
<span class="start-card__tag">Processing layer</span>
<strong class="start-card__title">pyogrio vs Fiona for Large Vector Datasets</strong>
<p class="start-card__desc">
A benchmarked decision guide: when Arrow-based pyogrio's bulk reads win, and when
Fiona's record-by-record streaming keeps memory flat on huge Shapefiles.
</p>
<span class="start-card__cta" aria-hidden="true">Read guide →</span>
</a>
</div>
</div>
</section>
<section class="home-sections" aria-label="Content sections">
<div class="page-wrapper">
<h2 class="home-sections__heading">Explore the guides</h2>
<div class="sections-grid">
{% for section in site.sections %}
<div class="section-card">
<div class="section-card__icon" aria-hidden="true">{{ section.icon }}</div>
<a href="{{ section.url }}" class="section-card__title">{{ section.title }}</a>
<p class="section-card__desc">{{ section.description }}</p>
{% set subs = collections.subsections | subsectionsFor(section.url) %}
{% if subs.length %}
<ul class="link-list">
{% for sub in subs %}
<li><a href="{{ sub.url }}">{{ sub.data.title or sub.fileSlug }}</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endfor %}
</div>
</div>
</section>