This file contains hidden or 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
.timer off | |
INSTALL spatial; | |
LOAD spatial; | |
INSTALL h3 FROM community; | |
LOAD h3; | |
.timer on | |
.width 180 |
This file contains hidden or 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
# BAG | |
# Website: https://www.kadaster.nl/zakelijk/registraties/basisregistraties/bag | |
## BAG Light | |
# Date of source (last modified): 01-08-2024 | |
# Atom: https://service.pdok.nl/lv/bag/atom/bag.xml | |
# Data: https://service.pdok.nl/lv/bag/atom/downloads/bag-light.gpkg | |
## BAG Extract | |
# Atom: https://service.pdok.nl/lv/bag/atom/bag.xml | |
# Data: # Data: https://service.pdok.nl/kadaster/adressen/atom/v1_0/downloads/lvbag-extract-nl.zip | |
# Date of source (last modified): 08-08-2024 |
This file contains hidden or 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
# fix encoding issues | |
iconv -f iso-8859-1 -t UTF-8 2024-2\ UNLOCODE\ CodeListPart1.csv > unlocode_utf8_part1.csv | |
iconv -f iso-8859-1 -t UTF-8 2024-2\ UNLOCODE\ CodeListPart2.csv > unlocode_utf8_part2.csv | |
iconv -f iso-8859-1 -t UTF-8 2024-2\ UNLOCODE\ CodeListPart3.csv > unlocode_utf8_part3.csv | |
# remove empty country dividers | |
grep -Ev '(,){8,}' unlocode_utf8_part1.csv > unlocode_utf8_part1_fixed.csv | |
grep -Ev '(,){8,}' unlocode_utf8_part2.csv > unlocode_utf8_part2_fixed.csv | |
grep -Ev '(,){8,}' unlocode_utf8_part3.csv > unlocode_utf8_part3_fixed.csv |
This file contains hidden or 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
-- Usage: SELECT INITCAP('the quick brown fox jumped over the lazy dog'); | |
-- Output: The Quick Brown Fox Jumped Over The Lazy Dog | |
-- Limitation: Does not work for SELECT INITCAP('the-quick_brown-fox-jumped-over-the-lazy-dog'); | |
CREATE OR REPLACE MACRO INITCAP(a) AS ([UPPER(x[1])||LOWER(x[2:]) for x in (a).string_split(' ')]).list_aggr('string_agg',' '); |
This file contains hidden or 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
# Extract building polygons | |
ogr2ogr -where "building IS NOT NULL" DE-building.fgb DE.pbf multipolygons -oo CONFIG_FILE=../osmconf_building.ini |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 | |
# Globals | |
PWD="$(pwd)" | |
WORKPATH=$PWD | |
# DB config | |
DBHOST="localhost" | |
DBPORT="5432" | |
DBUSER="postgres" |
This file contains hidden or 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 | |
#=============================================================================== | |
# | |
# FILE: getgeo.sh | |
# | |
# USAGE: ./getgeo.sh | |
# | |
# DESCRIPTION: run the script so that the geodata will be downloaded and inserted into your | |
# database | |
# |
NewerOlder