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
# if you downloaded llvm manually above, replace with your chosen NEW_PATH/clang | |
LLVM_LOC = /opt/homebrew/opt/llvm | |
CC=$(LLVM_LOC)/bin/clang -fopenmp | |
CXX=$(LLVM_LOC)/bin/clang++ -fopenmp | |
# -O3 should be faster than -O2 (default) level optimisation .. | |
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe | |
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe | |
LDFLAGS=-L/opt/homebrew/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib | |
CPPFLAGS=-I/opt/homebrew/opt/gettext/include -I$(LLVM_LOC)/include |
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
# Convert between geojson and sp spatial objects in R | |
require(rgdal) | |
# https://stat.duke.edu/~cr173/Sta523_Fa14/spatial_data.html | |
s <- '{ "type": "MultiPolygon", "coordinates": [ | |
[ [[40, 40], [20, 45], [45, 30], [40, 40]] ], | |
[ [[20, 35], [10, 30], [10, 10], [30, 5], [45, 20], [20, 35]], | |
[[30, 20], [20, 15], [20, 25], [30, 20]] | |
] | |
]}' |