Skip to content

Instantly share code, notes, and snippets.

@cholmes
cholmes / Lantern Invite
Last active December 21, 2015 18:09
New Lantern invite text.
[email protected] is using [Lantern](http://getlantern.org) and thought you might be interested in joining the network to circumvent censorship on the Internt.
*Users in Censored Countries* - [email protected] suggests you try Lantern to get access to the open internet. It designed to be is faster, more blocking-resistant and easier to use than other solutions (VPNs, GoAgent, UltraSurf, Tor)
*Users in other countries* - For Lantern to work for users in censored countries we need people like you to join the network and run Lantern on your computer. It is completely automatic once set up and won't cost you anything if your computer is connected at home or work. If your friends are in censored countries you will be directly helping them get free access to the open internet. And every additional person on the network improves Lantern's ability to resist censors, so please invite friends!
Questions? See [Q&A](https://github.com/getlantern/lantern/wiki/Questions-and-Answers) or jump on the [forum](https://groups.goo
{
"id":"landsat-8-l1/landsat:wrs_path/175/landsat:wrs_row/23",
"title":"Landsat 8 L1: Path 175, Row 23",
"description":"Landsat 8 imagery radiometrically calibrated and orthorectified using ground points and Digital Elevation Model (DEM) data to correct relief displacement.",
"links":[
{"href":"https://stac.boundlessgeo.io/stac", "rel":"root"},
{"href":"https://stac.boundlessgeo.io/stac/landsat-8-l1/landsat:wrs_path/175/landsat:wrs_row/23", "rel":"self"},
{"href":"https://stac.boundlessgeo.io/stac/landsat-8-l1/landsat:wrs_path/175/landsat:wrs_row/23/items", "rel":"items"},
{"href":"https://stac.boundlessgeo.io/stac/landsat-8-l1/landsat:wrs_path/175/landsat:wrs_row", "rel":"parent"}
{"href":"https://stac.boundlessgeo.io/collections/landsat-8-l1/items/LC08_L1TP_175023_20180709_20180709_01_RT", "rel":"item"},
import sqlalchemy
import geopandas as gpd
import dask_geopandas as dgd
import pandas as pd
import dask.dataframe
from shapely import wkb
import time
TOTAL_ROWS = 150000000
CHUNKSIZE = 2500000
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
29.2690636016938,
-1.8876694684082196
import duckdb
import pandas as pd
# Function to count records with 'area_in_meters' over 1000
def count_large_areas(parquet_url):
# Connect to DuckDB
conn = duckdb.connect(database=':memory:')
# Read the remote Parquet file
buildings_df = conn.execute(f"SELECT * FROM read_parquet('{parquet_url}')").fetchdf()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cholmes
cholmes / geoparquet-to-pmtiles.md
Created December 3, 2024 18:25
Best way to convert GeoParquet to PMTiles

Download gpq, and then stream direct into tippecanoe:

gpq convert --to=geojson in.geoparquet | tippecanoe -o out.pmtiles

(This was originally in a tweet from Brandon Liu, thanking Tim Schaub for adding it, but now I can't find the tweet so just sticking it here so I can find it)

@cholmes
cholmes / time-duckdb.py
Created January 14, 2025 17:58
Time query of DuckDB httpfs spatial filtering
import time
import duckdb
def run_duckdb_query():
# Connect to DuckDB (using an in-memory database as an example)
conn = duckdb.connect(database=':memory:')
# Load the spatial extension
conn.execute("LOAD spatial")