DO NOT USE VSCODE terminal and make sure uname -m returns arm64
- First Install Xcode command line tool
xcode-select --install- Create and change
/optdirectories owner
| #!/bin/bash | |
| CUID=$(id -u) | |
| CGID=$(id -g) | |
| # Run docker as the current user in the current diretory | |
| docker run \ | |
| --user $CUID:$CGID \ | |
| --volume $PWD:$PWD \ | |
| --workdir $PWD \ | |
| --rm \ |
$ brew install nghttp2
$ brew uninstall curl --force --ignore-dependencies
# Due to recent change to curl formula we need to use an old version
# more https://github.com/Homebrew/homebrew-core/issues/31510
#
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/ec361bc7710ffffa46ad7aceb76bfad8513a7399/Formula/curl.rb … --with-nghttp2 --HEADIn case anyone is interested, I've been trying to use turf.js on both Mapbox and Mapzen vector tiles, and I've learned a few things I wish I'd known going in.
This thing I've been working on for a month or so here and there, to make maps like this:
| fio cat ../missed.shp | rio zonalstats -r amfam.vrt --categorical | jq '.features[].properties | {APN: .APN,pool: ._1}' | jq --slurp . | in2csv -f json > test.csv | |
| jq '.features[].properties | {APN: .APN,pool: ._1}' pools.geojson | jq --slurp . | in2csv -f json > test.csv | |
| fio cat countries.shp | rio zonalstats -r dem.tif --prefix "elevation_" > countries_with_elevation.geojson | |
| fio cat large.shp | rio zonalstats -r elevation.tif --sequence | some-other-process | |
| time fio cat ../parcels/parcels_pools.shp | parallel --pipe "rio zonalstats -r amfam.vrt --categorical" > out | |
| fio cat test.shp | jq '{geometry: .geometry, PARCEL_ID: .properties.PARCEL_ID}' -c | fio collect > test.geojson |
| @echo off | |
| :: rev 0.1 2008.Mar.10, Matt.Wilkie@gov.yk.ca | |
| :: rev 0.2 2008.Sept.18 - updated to account for change in ftp source folders | |
| :: rev 0.3 2014.Feb.06 - enable timestamp (only download if source newer) | |
| echo. | |
| echo. ----------------------------------------------------------------------- | |
| echo. Going to download National Hydrographic Network Yukon, which could take | |
| echo. awhile. This script can be aborted and rerun, it will resume | |
| echo. where it left off. | |
| echo. ----------------------------------------------------------------------- |
I am sheepish to admit a certain type of routine Microsoft Excel use.
Current example: I am marking for STAT 545. I use R to create a comma delimited marking sheet, by joining the official class list and peer reviews. The sheet contains variables, initially set to NA, where the TAs and I enter official marks and optional comments.
This is where Excel comes in. I like its visual organization of this comma delimited file much more than, say, using a plain text editor. I use the ability to hide columns, resize columns, wrap text, and (gasp!) even fill rows with grey to indicate I am done.
I keep saving the file as comma delimited and I put up with Excel's incessant freak out about "losing features". This is not a one time thing. I need to save and commit this file many times before it is considered done.
| #!/bin/bash | |
| # rename TMS tiles to the XYZ schema | |
| # no quoting, since all files have simple numeric names | |
| # do not run this anywhere else than INSIDE your tiles directory | |
| # run it like this: find . -name "*.png" -exec ./tms2xyz.sh {} \; | |
| filename=$1 | |
| tmp=${filename#*/} # remove to first / |