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
{ | |
"AD": "ca", | |
"AE": "ar-AE,fa,en,hi,ur", | |
"AF": "fa-AF,ps,uz-AF,tk", | |
"AG": "en-AG", | |
"AI": "en-AI", | |
"AL": "sq,el", | |
"AM": "hy", | |
"AN": "nl-AN,en,es", | |
"AO": "pt-AO", |
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
class Bitwise { | |
static trailingZeros8(b) { | |
let lsb = (b & -b) | |
if(lsb === 0) { return 8 } | |
return 31 - Math.clz32(lsb) | |
} | |
static trailingZeros64(a) { | |
for(let i=7; i>=0; i--) { | |
let z = Bitwise.trailingZeros8(a[i]) | |
if(z < 8) { return ((7-i) * 8) + z } |
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
const fs = require('fs') | |
const path = require('path') | |
const fetch = require('node-fetch') // npm i node-fetch@2 | |
// Usage: node configure.js planet-v1.20.osm.pbf daylight | |
// A file named 'extract.sh' will be generated along with the `./configs` and `./extracts` directories | |
// first argument is the input .pbf file | |
const inputFile = process.argv[2] | |
if (!fs.existsSync(inputFile)) { throw new Error('input file not found') } |
We can't make this file beautiful and searchable because it's too large.
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
3041129 Sant Vicenç d’Enclar Sant Vicenc d'Enclar Castell de Sant Vicenc,Castell de Sant Vicens,Castell de Sant Vicenç,Sant Vicenc d'Enclar,Sant Vicenç d’Enclar 42.49571 1.49372 S HSTS AD 07 0 1184 Europe/Andorra 2020-06-10 | |
8225419 Qaşr aḑ Ḑiyāfah Qasr ad Diyafah H.H. The Ruler's Guesthouse,H.H. The Ruler’s Guesthouse,Qasr ad Diyafah,Qaşr aḑ Ḑiyāfah,qsr aldyaft,قصر الضيافة 25.2412 55.26796 S HSTS AE 03 0 6 Asia/Dubai 2012-04-06 | |
8469451 Bayt ash Shaykh ‘Ubayd Bin Thānī Bayt ash Shaykh `Ubayd Bin Thani Bayt ash Shaykh `Ubayd Bin Thani,Bayt ash Shaykh ‘Ubayd Bin Thānī,House of Sheikh Obaid Bin Thani,byt alshykh ʿbyd bn thany,بيت الشيخ عبيد بن ثاني 25.26859 55.29059 S HSTS AE 03 0 4 Asia/Dubai 2020-06-12 | |
8469455 Murabba‘at ash Shindaghah Murabba`at ash Shindaghah Al-Shindagha Square Fort,Murabba`at ash Shindaghah,Murabba‘at ash Shindaghah,mrbʿt alshndght,مربعة الشندغة 25.26525 55.29031 S HSTS AE 03 0 4 Asia/Dubai 2020-06-12 | |
8469463 Al Burj al Gharbī Al Burj al Gharbi Al Burj al Gharbi,Al Burj |
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 | |
# ref: https://github.com/data61/gnaf/blob/master/gnaf-db/src/main/script/createGnafDb.sh | |
# input dir | |
DATA_DIR="/data/gnaf/G-NAF/G-NAF AUGUST 2021" | |
EXTRAS_DIR="/data/gnaf/G-NAF/Extras" | |
# fast import pragmas | |
echo '.output /dev/null' | |
echo 'PRAGMA main.foreign_keys=OFF;' |
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
85632505|meso|0|Self-intersection[-69.31 -28.27]|POINT(-69.31 -28.27) | |
85632793|quattroshapes-reversegeo|-1|| | |
85632793|quattroshapes|-1|| | |
85681583||0|Self-intersection[144.652483533911 -40.3811760786903]|POINT(144.652484 -40.381176) | |
85770383|quattroshapes|0|Ring Self-intersection[147.317205739621 -42.9812372030377]|POINT(147.317206 -42.981237) | |
85775753|quattroshapes|0|Ring Self-intersection[150.501708984 -23.3725138223999]|POINT(150.501709 -23.372514) | |
85781949|quattroshapes|0|Ring Self-intersection[117.927246094 -35.0344943317]|POINT(117.927246 -35.034494) | |
85632475|meso|0|Self-intersection[88.906686 22.921783]|POINT(88.906686 22.921783) | |
85801287|quattroshapes|0|Ring Self-intersection[4.47143554686997 50.8891740489]|POINT(4.471436 50.889174) | |
85929283|quattroshapes|0|Ring Self-intersection[23.3294677734 42.6622413763001]|POINT(23.329468 42.662241) |
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
# based on: https://s2geometry.io/about/platforms | |
# note: set -DOPENSSL_ROOT_DIR instead of -DOPENSSL_INCLUDE_DIR | |
brew install gflags glog openssl | |
brew install cmake | |
# Download Googletest release 1.8.0 and unpack it in a directory of your choosing. | |
# (Take note of this directory as you will need to point CMake to it.) | |
# https://github.com/google/googletest/releases/tag/release-1.8.0 |
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 | |
featureCollectionSandwich() { | |
echo '{ "type": "FeatureCollection", "features":' | |
cat - | jq -s . | |
echo '}' | |
} |
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
const interval = { | |
millisecond: 1, | |
second: 1000, | |
minute: 1000 * 60, | |
hour: 1000 * 60 * 60, | |
day: 1000 * 60 * 60 * 24 | |
} | |
const period = 'day' | |
const d1 = truncate(new Date('2020-01-01 22:22:22'), period) |