Skip to content

Commit fc24d55

Browse files
Merge pull request #29 from TaskarCenterAtUW/utils-update-1
Updating utilities. - Delete `update-quest-ids.ps1` No longer needed. Long Form Quest Definition Schema 3.0.0 includes new quest_id numbering schema. - Delete `update-exif-recursive.ps1` No longer needed. Merged into `update-exif.ps1`. - Update `update-exif.ps1` Merge in `-Recursive` functionality from old `update-exif-recursive.ps1` --- Standardize documentation and formatting: - Update `gtfs-to-tdei-converter.ps1` - Update `sli-guardian.ps1` - Update `workspaces-export.ps1` - Update `workspaces-josm.ps1` --- - Update `update-exif.ps1` Replace "GoInfoGame" with "TDEI Tools" and sync version number - Update `README.md` Replace "GoInfoGame" with "AVIV ScoutRoute" or "TDEI Tools", fix links
2 parents b5d2bee + 789c101 commit fc24d55

File tree

8 files changed

+316
-209
lines changed

8 files changed

+316
-209
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Documentation files, schema definitions, and examples.
88

99
### [Imagery Layers](docs/imagery-layer)
1010

11-
[Schema](docs/imagery-layer/schema.json) and [example](docs/imagery-layer/example.json) for imagery layers for use in GoInfoGame.
11+
[Schema](docs/imagery-layer/schema.json) and [example](docs/imagery-layer/example.json) for imagery layers for use in AVIV ScoutRoute.
1212

1313
### [Quest Definitions](docs/quest-definition)
1414

@@ -18,22 +18,20 @@ Additional documentation and guides can be found on the [TCAT Wiki](https://task
1818

1919
## [Images](images)
2020

21-
Images of pedestrian infrastructure and related features, intended to be used in GoInfoGame long form quest definitions. Uncropped original non-annotated images are included, and all of the images in the `/images/` directory and its subdirectories are CC0-licensed and free to use by anyone for any purpose.
21+
Images of pedestrian infrastructure and related features, intended to be used in AVIV ScoutRoute long form quest definitions. Uncropped original non-annotated images are included, and all of the images in the `/images/` directory and its subdirectories are CC0-licensed and free to use by anyone for any purpose.
2222

23-
Note that the intent of this resource is to facilitate the functioning of the GoInfoGame app. If you have images that you think would be useful to add - please upload them to [Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page)!
23+
Note that the intent of this resource is to facilitate the functioning of the AVIV ScoutRoute app. If you have images that you think would be useful to add - please upload them to [Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page)!
2424

2525
## [Quests](quests)
2626

27-
GoInfoGame Long Form Quest JSON Definitions for use in [TDEI Workspaces](https://workspaces.sidewalks.washington.edu/), sorted by Environment and Project Group.
27+
AVIV ScoutRoute Long Form Quest JSON Definitions for use in [TDEI Workspaces](https://workspaces.sidewalks.washington.edu/), sorted by Environment and Project Group.
2828

2929
## [Utilities](utilities)
3030

3131
Utilities related to the TDEI.
3232

33-
- **[GoInfoGame Images Exif Data Update Script](utilities/update-exif.ps1)**
34-
- **[GoInfoGame Images Exif Data Update Script (Recursive)](utilities/update-exif-recursive.ps1)**
33+
- **[TDEI Tools Images Exif Data Update Script](utilities/update-exif.ps1)**
3534
- **[GTFS-to-TDEI Converter Script](utilities/gtfs-to-tdei-converter.ps1)**
36-
- **[Quest ID Update Script](utilities/update-quest-ids.ps1)**
3735
- **[SLI Guardian](utilities/sli-guardian.ps1)**
38-
- **[Workspaces Export Script](utilities/workspace-export.ps1)**
39-
- **[Workspaces JOSM Settings Script](utilities/workspace-josm.ps1)**
36+
- **[Workspaces Export Script](utilities/workspaces-export.ps1)**
37+
- **[Workspaces JOSM Settings Script](utilities/workspaces-josm.ps1)**

utilities/gtfs-to-tdei-converter.ps1

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,36 @@
1+
#!/usr/bin/env pwsh
2+
# This script is designed to be run in a PowerShell environment.
3+
14
# Name: GTFS-to-TDEI Converter Script
2-
# Version: 3.0.0
3-
# Description: This script takes a GTFS archive, processes it to convert stops.txt to stops.geojson, and zips the result into an archive ready for upload to TDEI.
5+
# Version: 4.0.0
6+
# Date: 2025-09-23
47
# Author: Amy Bordenave, Taskar Center for Accessible Technology, University of Washington
5-
# Date: 2025-09-09
68
# License: CC-BY-ND 4.0 International
79

810
<#
911
.SYNOPSIS
10-
Converts GTFS stops.txt to TDEI-compatible GeoJSON format.
12+
Converts GTFS stops.txt to TDEI-compatible GeoJSON format
1113
1214
.DESCRIPTION
1315
This script takes a GTFS archive, extracts the stops.txt file, converts it to
1416
OpenSidewalks-compatible GeoJSON format, and packages it as a ZIP file ready
1517
for upload to the TDEI (Transportation Data Exchange Initiative).
1618
17-
The script validates the input GTFS data, ensures required fields are present,
18-
and validates coordinate values before conversion.
19-
2019
.PARAMETER InputZip
2120
Path to the GTFS ZIP archive containing stops.txt file.
22-
This parameter is mandatory.
2321
2422
.PARAMETER OutputDir
2523
Directory where the output stops.zip file will be created.
26-
If not specified, uses the current working directory.
27-
The directory will be created if it doesn't exist.
24+
If not specified, uses the current working directory by default.
2825
2926
.EXAMPLE
30-
.\gtfs-to-tdei-converter.ps1 -InputZip "C:\data\gtfs.zip"
31-
27+
.\gtfs-to-tdei-converter.ps1 -InputZip "C:\example\gtfs.zip"
3228
Converts the GTFS archive and saves stops.zip in the current directory.
3329
3430
.EXAMPLE
35-
.\gtfs-to-tdei-converter.ps1 -InputZip "C:\data\gtfs.zip" -OutputDir "C:\output"
36-
31+
.\gtfs-to-tdei-converter.ps1 -InputZip "C:\example\ingest\gtfs.zip" -OutputDir "C:\example\export"
3732
Converts the GTFS archive and saves stops.zip in the specified output directory.
3833
39-
.EXAMPLE
40-
Get-Help .\gtfs-to-tdei-converter.ps1 -Detailed
41-
42-
Shows detailed help including parameter descriptions and examples.
43-
4434
.NOTES
4535
Required GTFS fields: stop_id, stop_lat, stop_lon
4636
Output format: OpenSidewalks 0.2 schema compatible GeoJSON
@@ -54,8 +44,6 @@
5444
https://github.com/TaskarCenterAtUW/tdei-tools
5545
#>
5646

57-
# This script is designed to be run in a PowerShell environment.
58-
5947
param(
6048
[Parameter(Mandatory = $true, HelpMessage = "Path to the GTFS zip archive")]
6149
[string]$InputZip,
@@ -71,7 +59,7 @@ $OUTPUT_GEOJSON_FILENAME = 'stops.geojson'
7159
$OUTPUT_ZIP_FILENAME = 'stops.zip'
7260
$GTFS_STOPS_FILENAME = 'stops.txt'
7361

74-
Write-Host "GTFS-to-TDEI Converter Script v3.0.0" -ForegroundColor DarkBlue
62+
Write-Host "GTFS-to-TDEI Converter Script v4.0.0" -ForegroundColor DarkBlue
7563
Write-Host ""
7664

7765
# Check if input ZIP exists

utilities/sli-guardian.ps1

Lines changed: 84 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,88 @@
1+
#!/usr/bin/env pwsh
2+
# This script is designed to be run in a PowerShell environment.
3+
14
# Name: SLI Guardian
2-
# Version: 5.0
3-
# Description: This script applies an overlay to images, designed for use with pedestrian-perspective street-level imagery from a GoPro Max
5+
# Version: 6.0.0
6+
# Date: 2025-09-23
47
# Author: Amy Bordenave, Taskar Center for Accessible Technology, University of Washington
5-
# Date: 2025-09-03
68
# License: CC-BY-ND 4.0 International
7-
#
8-
# This script is designed to be run in a PowerShell environment.
9-
# Prerequisites: ImageMagick and ExifTool must be installed and in PATH
10-
#
11-
# Usage:
12-
# .\sli-guardian.ps1 -inputDir <input_directory> -outputDir <output_directory> -overlay <overlay_file> -maxParallel <n> -batchSize <n> -jpegQuality <n>
13-
#
14-
# Examples:
15-
# .\sli-guardian.ps1
16-
# .\sli-guardian.ps1 -inputDir ".\input" -outputDir ".\output" -overlay ".\overlay.png" -maxParallel 8 -batchSize 50 -jpegQuality 90
17-
# .\sli-guardian.ps1 -inputDir "C:\TCAT GoPro\ingest\2025-07-25\101\1" -outputDir "C:\TCAT GoPro\export\2025-07-25\101\1" -overlay "C:\TCAT GoPro\overlay\tcat-purple.png" -jpegQuality 85
9+
10+
<#
11+
.SYNOPSIS
12+
Applies overlay images to street-level imagery
13+
14+
.DESCRIPTION
15+
This script applies an overlay to images, designed for use with pedestrian-perspective
16+
street-level imagery from devices like GoPro Max cameras. It processes images in
17+
parallel batches for optimal performance, copying input images to an output directory,
18+
applying the specified overlay, and preserving EXIF metadata from the original files.
19+
20+
The script supports various image formats and includes validation for overlay
21+
compatibility, progress reporting, and comprehensive error handling.
22+
23+
.PARAMETER InputDir
24+
Path to the directory containing input images to process
25+
26+
.PARAMETER OutputDir
27+
Path to the directory where processed images will be saved
28+
29+
.PARAMETER Overlay
30+
Path to the PNG overlay file to apply to all images
31+
32+
.PARAMETER MaxParallel
33+
Maximum number of parallel processing jobs
34+
35+
.PARAMETER BatchSize
36+
Number of images to process in each batch
37+
Default: 50
38+
39+
.PARAMETER JpegQuality
40+
JPEG compression quality (1-100) for JPEG output files
41+
Default: 70
42+
43+
.PARAMETER SkipExif
44+
Skip copying EXIF metadata from original files
45+
46+
.EXAMPLE
47+
.\sli-guardian.ps1 -inputDir ".\input" -outputDir ".\output" -overlay ".\overlay.png"
48+
49+
Processes images from .\input directory using default settings
50+
51+
.EXAMPLE
52+
.\sli-guardian.ps1 -inputDir "C:\TCAT GoPro\ingest\2025-07-25\101\1" -outputDir "C:\TCAT GoPro\export\2025-07-25\101\1" -overlay "C:\TCAT GoPro\overlay\tcat-purple.png" -jpegQuality 85
53+
54+
Processes images with custom parallel processing and quality settings
55+
56+
.NOTES
57+
Prerequisites:
58+
- ImageMagick must be installed and available in PATH
59+
- ExifTool must be installed and available in PATH (unless -skipExif is used)
60+
61+
Supported image formats:
62+
- Input: .jpg, .jpeg, .png, .gif, .bmp, .tiff, .tif
63+
- Overlay: .png only
64+
65+
The script performs these operations:
66+
1. Validates all inputs and prerequisites
67+
2. Copies input images to output directory
68+
3. Validates overlay dimensions match image dimensions
69+
4. Applies overlay to images in parallel batches
70+
5. Preserves EXIF metadata from original files (unless -skipExif)
71+
6. Provides detailed progress reporting and error handling
72+
73+
JPEG handling:
74+
- JPEG files are processed with quality settings
75+
- Extensions are normalized to lowercase .jpg
76+
- Non-JPEG files are processed without quality settings
77+
78+
Exit codes:
79+
- 0: All images processed successfully
80+
- 1: No images processed (validation errors or no input images)
81+
- 2: Some images failed processing (partial success)
82+
83+
.LINK
84+
https://github.com/TaskarCenterAtUW/tdei-tools
85+
#>
1886

1987
param(
2088
[Parameter(Mandatory = $true)]
@@ -34,7 +102,7 @@ param(
34102

35103
[Parameter(Mandatory = $false)]
36104
[ValidateRange(1, 100)]
37-
[int]$jpegQuality = 70,
105+
[int]$jpegQuality = 90,
38106

39107
[Parameter(Mandatory = $false)]
40108
[switch]$skipExif
@@ -44,7 +112,7 @@ param(
44112
$script:ImageExtensions = @('.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.tif')
45113
$script:JpegExtensions = @('.jpg', '.jpeg')
46114

47-
Write-Host "SLI Guardian v5.0" -ForegroundColor Cyan
115+
Write-Host "SLI Guardian v6.0.0" -ForegroundColor Cyan
48116
Write-Host "Max Parallel Jobs: $maxParallel | Batch Size: $batchSize | JPEG Quality: $jpegQuality" -ForegroundColor Cyan
49117

50118
# Step 1: Validation

utilities/update-exif-recursive.ps1

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)