macOS & Linux¶
We provide the source code that you need to compile with CMake.
To compile val3dity yourself, you first need to install the following free libraries:
Under macOS, it’s super easy, we suggest using Homebrew:
$ brew install cgal --with-eigen $ brew install cmake $ brew install geos
Under Linux (at least Ubuntu), CGAL has to be compiled because apt-get doesn’t give you a version with Eigen. Thus, in a nutshell,
- download latest CGAL code
- install Eigen library:
$ sudo apt-get install libeigen3-dev
- compile CGAL by first activating the Eigen option in the CMake (
$ cmake . -DWITH_Eigen3=ON), or use cmake-gui and activate it (option is called
export CGAL_DIR=/path/to/CGAL-4.1xwhich will tell your shell to use that version of CGAL (thus more version of CGAL can be installed on the same computer; see that handy manual)
To compile and run val3dity (from the val3dity folder):
$ mkdir build $ cd build $ cmake .. $ make $ ./val3dity ../data/cityjson/cube.json
The summary of the validation is reported, and you should see that cube.json contains one valid primitive.
To verify that everything went fine during the compilation, run the unit tests (from the root folder of val3dity; must use Python3):
$ python3 -m pytest --runfull
You shouldn’t get any errors
Finally, to see all the options possible:
$ ./val3dity --help
For Windows, we offer an executable, and there’s a Visual Studio project code in the folder
vs_build, although installing the dependencies is slightly more complex than for macOS/Linux.
If you don’t want to go through the troubles of compiling and/or installing val3dity, we suggest you use the web application. Simply upload your file to our server and get a validation report back. We delete the file as soon as it has been validated. However, a file is limited to 50MB.