Skip to content

Instantly share code, notes, and snippets.

View Youssef-Harby's full-sized avatar
🌍

Youssef Harby Youssef-Harby

🌍
View GitHub Profile
@marklit
marklit / places.sql
Last active May 19, 2024 22:43
Pull H3s for Overture's Places Dataset for May 2024
COPY (
WITH a AS (
SELECT h3_cell_to_parent(h3_string_to_h3(SUBSTR(id, 0, 17)), 2) h3_2,
COUNT(*) num_recs
FROM read_parquet('s3://overturemaps-us-west-2/release/2024-05-16-beta.0/theme=places/type=place/*.parquet',
filename=true,
hive_partitioning=1)
GROUP BY 1
)
SELECT h3_cell_to_boundary_wkt(h3_2),
@alexgleith
alexgleith / SimpleLoadS2.ipynb
Last active June 21, 2024 10:35
Simplest example for finding and loading Sentinel-2 data using Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wriglz
wriglz / snap_points_to_lines.sql
Last active September 1, 2022 04:21
SQL to snap points to the closest line within a predefined radius
-- Snap the points to their closest lines, found in the subquery below
SELECT
point_id,
line_id,
ST_LINE_INTERPOLATE_POINT(line_geom,
ST_Line_Locate_Point(line_geom, point_geom)) AS snapped_points --Create the snapped points
FROM
--Subquery to find the closest line to each point (within a pre-defined raidus)
(
@mortcanty
mortcanty / semantic_segmentation.ipynb
Last active July 2, 2024 14:50
Semantic_Segmentation.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@srmsoumya
srmsoumya / 2022-02-07_cmr-stac-api.ipynb
Last active May 28, 2024 12:59
# Create Monthly NDVI composites using Harmonized Landsat Sentinel (HLS) data from NASA CMR STAC api using `pystac_client` & `stackstac`
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GerardoLopez
GerardoLopez / save_xarray_to_gtiff.py
Created February 23, 2021 11:04
Save xarray to a Cloud Optimized GeoTIFF (COG)
import gdal
from osgeo import gdal_array
import osr
import numpy
def get_dst_dataset(dst_img, cols, rows, layers, dtype, proj, gt):
"""
Create a GDAL data set in Cloud Optimized GeoTIFF (COG) format
:param dst_img: Output filenane full path
@hhkaos
hhkaos / Koop_script_demo.md
Last active December 17, 2022 16:17
Esri DevSummit Berlin 2019 - https://bit.ly/DevSummitEU19

Esri DevSummit Berlin

Demo 1: Build and share your own Koop provider from scratch

Step 1)

Create a new Github repo. Name it: koop-provider-remote-geojson

Step 2)

@anjia0532
anjia0532 / nginx.conf
Created December 14, 2017 04:08
nginx proxy_pass add a static parameter
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@arthur-e
arthur-e / notes.md
Last active March 2, 2022 07:19
Ubuntu for GIS Installation and Setup

Post-Installation Fixes and Setup

# Install compilers and linking tools; other tools
sudo apt-get install g++ swig curl build-essential python-all-dev

# Install package manager
sudo apt-get install synaptic

# Install Unity customization tool

sudo apt-get install unity-tweak-tool