Skip to content

Instantly share code, notes, and snippets.

View bertt's full-sized avatar

Bert Temme bertt

View GitHub Profile
Install miniconda
$ conda create -n geo python=3.12 ipython
$ conda activate geo
$ conda install pip
$ pip install py3dtiles
@bertt
bertt / pdal_pipeline_convert_laz_to_csv.md
Last active August 15, 2024 06:00
PDAL pipeline to convert LAZ to CSV
@bertt
bertt / pg2b3dm_getting_started_sample.txt
Created April 9, 2024 10:30
pg2b3dm - getting started sample
Tool: pg2b3dm 2.8.0.0
Options: -h localhost -U postgres -c geom -d postgres -t sibbe -a identificatie
Password for user postgres:
Start processing 2024-04-09T12:18:51....
Input table: sibbe
Input geometry column: geom
App mode: Cesium
Spatial reference of sibbe.geom: 4979
Spatial index detected on sibbe.geom
Query bounding box of sibbe.geom...
@bertt
bertt / valuestypes.txt
Last active January 30, 2024 11:28
scalar values
[3dtiles] type / componentType -> [.net] -> [postgres]
boolean / - -> bool -> boolean
scalar / uint8 -> byte -> -
scalar / int8 -> sbyte -> -
scalar / int16 -> short -> smallint
scalar / uint16 -> ushort -> -
scalar / int32 -> int -> integer
scalar / uint32 -> uint -> -
scalar / int64 -> long -> bigint
scalar / uint64 -> ulong -> -
@bertt
bertt / tree.csv
Created August 18, 2023 12:28
tree.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 13 columns, instead of 2 in line 1.
Nederlandse naam,Wetenschappelijke naam,Plantjaar,Leeftijd,Eigenaar,Buurt,Wijk,Boomnummer,X,Y,Lat,Long,Exportdatum
Bolacacia,Robinia pseudoacacia
'Umbraculifera',2017,3,Gemeentelijk,Mariëndaalstraat e.o.,Noordwest,3022615,134958.072,457421.454,5.094669474551958,52.104669913710175,20201123
@bertt
bertt / dotnet_tagged_version
Last active August 10, 2023 13:36
dotnet tagged version
Tool: dotnetCampus.TagToVersion
https://github.com/dotnet-campus/dotnetCampus.TagToVersion
Writes a tag to file Build/Version.props
<Project>
<PropertyGroup>
<Version>0.11</Version>
</PropertyGroup>
@bertt
bertt / duckdb-open-buildings-tutorial.md
Last active July 13, 2023 08:34 — forked from cholmes/duckdb-open-buildings-tutorial.md
Tutorial on using DuckDB with the Google Open Buildings geoparquet files on source.coop

DuckDB and GeoParquet Tutorial

This is a quick tutorial on how you can use DuckDB to easily access the cloud-native version of the Google Open Buildings data set from source.coop and transform it into your favorite GIS format. A big thanks to Mark Litwintschik's post on DuckDB's Spatial Extension for lots of the key information, it's highly recommended.

About DuckDB?

DuckDB is an awesome new tool for working with data. In some ways it's a next generation 'SQLite' (which is behind GeoPackage in the geo world) - but fundamentally designed for analysis workflows. TODO: more explanation.

To install it just follow the instructions at: https://duckdb.org/docs/installation/index. This tutorial uses the command line version

// following works without gdalwarp:
$ wget https://ns_hwh.fundaments.nl/hwh-ahn/AHN3/DTM_5m/M5_65HZ2.zip
$ unzip M5_65HZ2.zip
$ gdalbuildvrt ahn.vrt M5_65HZ2.TIF
$ mkdir tiles
$ docker run -it -v D:/aaa/testdownload:/data tumgis/ctb-quantized-mesh ctb-tile -f Mesh -C -N -o tiles ahn.vrt
// following does not work with gdalwarp:
$ wget https://ns_hwh.fundaments.nl/hwh-ahn/AHN3/DTM_5m/M5_65HZ2.zip
$ unzip M5_65HZ2.zip
@bertt
bertt / 1.json
Created May 13, 2023 07:53
gmaps 1.json
{
"asset":{
"version":"1.0"
},
"geometricError":1e+100,
"root":{
"boundingVolume":{
"box":[
0,
0,
@bertt
bertt / gist:71aa40afd4c6a74e76808eeb784713dd
Created May 13, 2023 07:40
Gmaps 3D Tiles - root.json
{
"asset":{
"version":"1.0"
},
"geometricError":1e+100,
"root":{
"boundingVolume":{
"box":[
0,
0,