This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CACHE = "cache_name_here"; | |
self.addEventListener("fetch", (event) => { | |
const handled = handler(event).then((response) => { | |
if (!(response instanceof Response)) { | |
return new Response("Something went wrong", { | |
status: 500, | |
}); | |
} | |
return response; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
consolidated_file="./consolidated.json" | |
for i in $(find . -name '*.shp'); do | |
if [ ! -f "$consolidated_file" ]; then | |
# first file - create the consolidated output file | |
ogr2ogr -f GeoJSON $consolidated_file -t_srs EPSG:4326 $i | |
else | |
# update the output file with new file content | |
ogr2ogr -f GeoJSON -update -append $consolidated_file -t_srs EPSG:4326 $i | |
fi |