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
import duckdb | |
import flask | |
# Initialize Flask app | |
app = flask.Flask(__name__) | |
# Setup a global DuckDB connection with spatial extension loaded | |
# Connect to a persistent database file with the geometry data | |
config = {"allow_unsigned_extensions": "true"} | |
con = duckdb.connect("tiles.db", True, config) |
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
/* | |
* File: geoparquet.cpp | |
* | |
* Purpose: A minimal example to build a GeoParquet file using Apache Arrow. | |
* | |
* Prerequisites: The Apache Arrow library is needed and can be installed as follows | |
* $ git clone https://github.com/apache/arrow.git | |
* $ cd arrow/cpp | |
* $ mkdir build | |
* $ cd build |
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
x | y | z | vx | vy | vz | |
---|---|---|---|---|---|---|
0.10 | 0.10 | 0.50 | 0.20 | 1.99 | 0.50 | |
0.10 | 0.10 | -0.58 | 0.20 | 1.99 | -0.58 | |
0.10 | 0.10 | -1.66 | 0.20 | 1.99 | -1.66 | |
60.00 | 60.00 | -17.84 | -0.61 | -1.90 | -17.84 | |
60.00 | 60.00 | -18.92 | -0.61 | -1.90 | -18.92 | |
60.00 | 60.00 | -20.00 | -0.61 | -1.90 | -20.00 |
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
// Möller-Trumbore algorithm | |
// Find intersection point - from PBRT - www.pbrt.org | |
float intersect(Ray & ray, bool cullback, float & b1, float & b2) | |
{ | |
vec3 e1(b - a), e2(c - a); | |
vec3 pvec = cross(ray.dir, e2); | |
float det = dot(e1, pvec); | |
if (cullback) | |
{ |
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
// SAGE2 is available for use under the SAGE2 Software License | |
// | |
// University of Illinois at Chicago's Electronic Visualization Laboratory (EVL) | |
// and University of Hawai'i at Manoa's Laboratory for Advanced Visualization and | |
// Applications (LAVA) | |
// | |
// See full text, terms and conditions in the LICENSE.txt included file | |
// | |
// Copyright (c) 2014 |