Step 1)
Create a new Github repo. Name it: koop-provider-remote-geojson
Step 2)
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), |
-- 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) | |
( |
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 |
Step 1)
Create a new Github repo. Name it: koop-provider-remote-geojson
Step 2)
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; |