This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "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": {}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "CityObjects": | |
| { | |
| "id-1": | |
| { | |
| "geometry": | |
| [ | |
| { | |
| "type": "Solid", | |
| "lod": "1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| allo les amis | |
| ça va? | |
| oh oh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import polyscope as ps | |
| import laspy | |
| import point_cloud_utils as pcu | |
| with laspy.open('m1-off-ground.laz') as fh: | |
| las = fh.read() | |
| #-- get the coordinates as numpy array nx3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import sys | |
| from datetime import datetime | |
| import numpy as np | |
| fin = open("/Users/hugo/temp/result.json") | |
| j = json.loads(fin.read()) |