This file contains 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
# Returns the size of object in bytes | |
from sys import getsizeof | |
CityJSON = { | |
"appearance": { | |
"materials": [ | |
{ | |
"name": "door", | |
"ambientIntensity": 0.2000, | |
"diffuseColor": [0.9000, 0.1000, 0.7500], |
This file contains 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": "CityJSON", | |
"version": "1.0", | |
"CityObjects": { | |
"NL.IMBAG.Pand.0518100000285075": { | |
"type": "Building", | |
"geometry": [], | |
"address": [ | |
{ | |
"openbareRuimteNaam": "C.A. van Beverenplein", |
This file contains 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 requests | |
import pathlib | |
import gzip | |
import json | |
from cjio import cityjson | |
datadir = pathlib.Path(__file__).parent.absolute() | |
tile = "5908" | |
url = f"https://data.3dbag.nl/cityjson/v21031_7425c21b/3dbag_v21031_7425c21b_{tile}.json.gz" |
This file contains 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
#! /bin/bash | |
# Crop a LAS file by multiple polygons. Implemented for lastools. | |
# example: | |
# subset_las.sh <path to LAS file> <path to polygons directory> | |
LAS_IN=$1 | |
DIR=$2 | |
for f in $(dir $DIR) |
This file contains 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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
"""Split an OBJ file into separate files per named object | |
Ignores vertex texture coordinates, polygon groups, parameter space vertices. | |
The individual files are named as the object they contain. The material file | |
(.mtl) is not split with the objects. | |
Run: |
This file contains 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
# Attempt to prevent catastrophe by validating required settings | |
# and aborting on any subshell error | |
set -e | |
if [ -z "${PYXB_ROOT+notset}" ] ; then | |
echo 1>&2 ERROR: PYXB_ROOT not set | |
exit 1 | |
fi | |
BUNDLE_TAG=opengis |