Skip to content

Instantly share code, notes, and snippets.

View nknize's full-sized avatar
🌴
away...

Nick Knize nknize

🌴
away...
View GitHub Profile
@nknize
nknize / TriangleEncoder.java
Created December 5, 2018 22:34
Encodes LatLonShape.Triangle w/ shortcut implementations for points and lines
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@nknize
nknize / Orientation.java
Created November 29, 2018 16:24
Adaptive Orientation
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@nknize
nknize / keybase.md
Created October 4, 2018 17:44
keybase.md
### Keybase proof
I hereby claim:
* I am nknize on github.
* I am nknize (https://keybase.io/nknize) on keybase.
* I have a public key whose fingerprint is 95B0 1F0E 7811 1D63 D331 C1A7 51F0 CC22 F625 308A
To claim this, I am signing this object:
/**
* Finds a point along a bearing from a given lon,lat geolocation using great circle arc
*
* @param lon origin longitude in degrees
* @param lat origin latitude in degrees
* @param bearing azimuthal bearing in degrees
* @param dist distance in meters
* @param pt resulting point
* @return the point along a bearing at a given distance in meters
*/
@nknize
nknize / selftouching_interior.json
Created March 25, 2015 20:38
selftouching_interior
"coordinates": [
[
[
9.43443767223334,
48.9020766694563
],
[
9.43907095532756,
48.9023277179747
],
@nknize
nknize / InaccurateShapeFilter.geojson
Created February 13, 2015 14:11
InaccurateShapeFilter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nknize
nknize / poleCrossingCorrect.geojson
Last active August 29, 2015 14:15
poleCrossingCorrect.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nknize
nknize / poleCrossingWrong.geojson
Last active August 29, 2015 14:15
poleCrossingWrong.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nknize
nknize / valid_MultiPolygon.geojson
Created December 26, 2014 18:40
valid_MultiPolygon.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <iostream>
#include <math.h>
using namespace std;
long long int maximum(long long int a, long long int b) {
long long int max = (a > b) ? a : b;
return max;
}
long long int lpf(long long int input) {