Skip to content

Python bindings for the award-winning val3dity software

License

Notifications You must be signed in to change notification settings

tudelft3d/val3ditypy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

val3ditypy

Python bindings for val3dity.

to install:

  1. Clone the repository:
git clone /~https://github.com/tudelft3d/val3ditypy
git submodule init
git submodule update
  1. Install val3dity and all its dependencies and make sure you can compile it

  2. Compile the bindings and install the Python package: python setup.py install

how to use it

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"])

input accepted

  1. one CityJSON object
  2. one tu3djson object
  3. one geometry of a tu3djson object
  4. IndoorGML

functions

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)

About

Python bindings for the award-winning val3dity software

Resources

License

Stars

Watchers

Forks

Packages

No packages published