Skip to content

Instantly share code, notes, and snippets.

View hugoledoux's full-sized avatar

Hugo Ledoux hugoledoux

View GitHub Profile
@hugoledoux
hugoledoux / reto5.py
Created February 9, 2024 15:27 — forked from lokilloboss/reto5.py
Reto del dia 5
import re
# Variable global para almacenar ids
ids_usuarios = []
# Variable global para almacenar información de usuarios
usuarios = {}
# Función para generar ID único
def generate_id():
@hugoledoux
hugoledoux / bos_geomatics_2223.md
Last active February 13, 2024 12:28
Draft BoS geomatics summary 2022-2023

Position of the BoS MSc Geomatics within the A+BE Faculty

The Board of Studies (BoS) for the program "MSc Geomatics" was established on 2023-01-01 as a separate and independent board of studies at the Faculty of Architecture and the Built Environment (A+BE).

Before 2023-01-01, there were 2 members from the MSc Geomatics (one teacher and one student) in the BoS of the Faculty A+BE. This BoS covered 5 different programmes (at both the BSc and MSc levels, on different topics, and having different teaching languages (Dutch and English)). The general feeling was that since the program MSc Geomatics is somewhat different from the other ones, a specific BoS that would address the specificities of the program would be better for ensuring that the quality of the education stays high.

We therefore present the activities and advices we gave during the period 2023-01-01 to 2023-08-30.

import startinpy
import laspy
import numpy as np
import sys
np.set_printoptions(precision=3, suppress=True)
las = laspy.read('/Users/hugo/teaching/hw04-marking/data/area_full.laz')
print(las)
pts = np.vstack((las.x, las.y, las.z)).transpose()
@hugoledoux
hugoledoux / laspy_create.py
Created January 26, 2024 10:00
laspy create file + matplotlib
import laspy
import numpy as np
import sys
np.set_printoptions(precision=2, suppress=True)
# 0. Creating some dummy data
my_data_xx, my_data_yy = (np.random.random_sample(size=1000) * 100, np.random.random_sample(size=1000) * 100)
# print(my_data_xx)
my_data_zz = np.random.random_sample(size=1000) * 2
my_data = np.hstack((my_data_xx.reshape((-1, 1)), my_data_yy.reshape((-1, 1)), my_data_zz.reshape((-1, 1))))
@hugoledoux
hugoledoux / laspy_filter1.py
Last active January 25, 2024 13:25
laspy filter
import laspy
import numpy as np
import sys
las = laspy.read('/Users/hugo/teaching/hw04-marking/data/area_full.laz')
#-- fetch all points within 100m of the median xyz of the file
coords = np.vstack((las.x, las.y, las.z)).transpose()
median = np.median(coords, axis=0)
{
"type": "CityJSONExtension",
"name": "WeixiaoBuilding",
"description": "Extension to model the building parts",
"url": "https://someurl.org/noise.ext.json",
"version": "0.1",
"versionCityJSON": "2.0",
"extraAttributes": {},
"extraCityObjects": {},
"extraRootProperties": {},
@hugoledoux
hugoledoux / fetch.py
Last active October 13, 2023 11:46
3dbag api fetch
import urllib.request
import json
import sys
# myurl = "http://localhost:3200//collections/pand/items/NL.IMBAG.Pand.1655100000500568"
myurl = "http://localhost:3200//collections/pand/items?bbox=75900.011,447000.034,76000.011,447200.034"
# myurl = "http://localhost:3200//collections/pand/items?bbox=75877.011,446130.034,92446.593,460259.369"
try:
@hugoledoux
hugoledoux / torus.city.json
Created May 11, 2023 09:27
a cube with a genus of 1
{
"CityObjects":
{
"id-1":
{
"geometry":
[
{
"type": "Solid",
"lod": "1",
@hugoledoux
hugoledoux / test.txt
Last active April 26, 2023 09:47
testing 1 2 testing
allo les amis
ça va?
oh oh
@hugoledoux
hugoledoux / sqlal2.py
Last active April 27, 2023 09:21
read from cjdb tests
import sys
import json
import copy
import psycopg2
def remove_duplicate_vertices(j):
def update_geom_indices(a, newids):
for i, each in enumerate(a):
if isinstance(each, list):