Python bindings for val3dity.
- Clone the repository:
git clone /~https://github.com/tudelft3d/val3ditypy
git submodule init
git submodule update
-
Install val3dity and all its dependencies and make sure you can compile it
-
Compile the bindings and install the Python package:
python setup.py install
import val3ditypy
import json
mycity = json.load(open("/home/elvis/delft.city.json"))
if val3ditypy.is_valid_cityjson(mycity) == True:
print("valid!")
else:
print("oh no invalid :(")
report = val3ditypy.validate_cityjson(mycity)
print(report["validity"])
bool is_valid_onegeom(json mydata)
json validate_onegeom(json mydata)
bool is_valid_tu3djson(json mydata)
bool is_valid_tu3djson_each(json mydata)
json validate_tu3djson(json mydata)
bool is_valid_cityjson(json mydata)
json validate_cityjson(json mydata)
bool is_valid_indoorgml(string myindoors)
json validate_indoorgml(string myindoors)