You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-34Lines changed: 35 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@
4
4
# val3dity
5
5
6
6
val3dity---pronounced 'val-three-dity'---allows us to validate 3D primitives according to the international standard ISO19107.
7
-
Think of it as [PostGIS ST_IsValid](http://postgis.net/docs/ST_IsValid.html), but for 3D primitives (PostGIS only validates 2D primitives).
7
+
Think of it as [PostGIS ST_IsValid](http://postgis.net/docs/ST_IsValid.html), but for 3D primitives.
8
8
9
-
In short, it verifies whether a 3D primitive respects the definition as given in [ISO19107](http://www.iso.org/iso/catalogue_detail.htm?csnumber=26012) and [GML](https://en.wikipedia.org/wiki/Geography_Markup_Language).
9
+
In short, it verifies whether a 3D primitive respects the definition as given in [ISO19107](https://www.iso.org/standard/66175.html).
10
10
11
11
The validation of the following 3D primitives is fully supported:
12
12
@@ -17,13 +17,14 @@ The validation of the following 3D primitives is fully supported:
17
17
-``CompositeSolid``
18
18
19
19
Unlike many other validation tools in 3D GIS, inner rings in polygons/surfaces are supported and so are cavities in solids (also called voids or inner shells).
20
+
20
21
However, as is the case for many formats used in practice, only planar and linear primitives are allowed: no curves or spheres or other parametrically-modelled primitives are supported.
For the CityJSON and IndoorGML formats, extra validations are performed (specific to the format), eg the overlap between different parts of a building, or the validation of the navigation graph in IndoorGML.
34
35
35
36
36
-
## Usage
37
-
38
-
val3dity is a command-line interface (CLI) programme only, with [several options](https://val3dity.readthedocs.io/en/latest/usage/#options-for-the-validation).
_No demo visible here? View it on [asciinema](https://asciinema.org/a/329835)._
42
-
43
-
44
-
## Web application
45
-
46
-
If you don't want to go through the troubles of compiling and/or installing val3dity, we suggest you use the [web application](http://geovalidation.bk.tudelft.nl/val3dity).
47
-
Simply upload your file to our server and get a validation report back.
48
-
We delete the file as soon as it has been validated (promised!).
49
-
However, a file is limited to 50MB.
50
-
51
-
52
37
## Installation of the command-line tool
53
38
54
39
### macOS
@@ -81,7 +66,7 @@ and then
81
66
$ make
82
67
83
68
84
-
### linux
69
+
### Linux
85
70
86
71
Under Linux (at least Ubuntu), CGAL has to be compiled because apt-get doesn't give you a version with Eigen.
87
72
Thus, in a nutshell,
@@ -98,45 +83,52 @@ Thus, in a nutshell,
98
83
For Windows, we offer [an executable](https://github.com/tudelft3d/val3dity/releases).
99
84
100
85
It's also possible to compile val3dity yourself with the CMake file we offer, but it's slightly more complex with the dependencies.
101
-
We suggest you look at [how we build it on GitHub Actions](https://github.com/tudelft3d/val3dity/blob/main/.github/workflows/build_exe.yml) to get some inspirate (and help).
86
+
We suggest you look at [how we build it on GitHub Actions](https://github.com/tudelft3d/val3dity/blob/main/.github/workflows/build_exe.yml) to get some inspiration (and help).
102
87
103
88
104
89
## Usage
105
90
106
-
To compile and run val3dity (from the val3dity folder):
91
+
To run val3dity:
107
92
108
-
$ ./val3dity /data/cityjson/cube.json
93
+
val3dity ./data/cityjson/cube.json
109
94
110
95
The summary of the validation is reported, and you should see that `cube.json` contains one valid primitive.
111
96
112
97
Finally, to see all the options possible:
113
98
114
-
$ ./val3dity --help
99
+
val3dity --help
115
100
101
+
To validate a [CityJSONSeq stream](https://www.cityjson.org/cityjsonseq/), you need to pipe the stream into val3dity and use ``stdin`` for the input.
102
+
If you have a CityJSONSeq serialised in a file, then you can cat it:
116
103
117
-
## Using val3dity as a library
104
+
cat myfile.city.jsonl | val3dity stdin
118
105
119
-
val3dity can be compiled as a library:
106
+
The output shows, line by line, what the errors are.
107
+
If the list of error is empty (``[]``) this means the feature is geometrically valid 🎉
120
108
121
-
$ cmake .. -DLIBRARY=true
122
109
123
-
There is a simple example in `./demo_lib` with instructions to compile it.
110
+
## Using val3dity as a library
124
111
112
+
val3dity can be compiled and used as a library:
125
113
126
-
## Unit tests
114
+
cmake .. -DVAL3DITY_LIBRARY=true
115
+
116
+
There is a simple example in `./demo_lib` with instructions to compile it.
127
117
128
-
To verify that everything went fine during the compilation, run the unit tests (from the root folder of val3dity) (this requires `pip install pytest pyyaml`):
129
118
130
-
$ python -m pytest --runfull
119
+
## Web application
131
120
132
-
You shouldn't get any errors.
121
+
If you don't want to go through the troubles of compiling and/or installing val3dity, we suggest you use the [web application](http://geovalidation.bk.tudelft.nl/val3dity).
122
+
Simply upload your file to our server and get a validation report back.
123
+
We delete the file as soon as it has been validated (promised!).
124
+
However, a file is limited to 50MB.
133
125
134
126
135
127
## Simple visualiser for the errors: viz3dity
136
128
137
129

138
130
139
-
In the folder `tools/viz3dity/`, there is a simple Python script where you load a CityJSON file with geometries and one with the val3dity report, and you can see which objects have specific errors (each error gets a colour).
131
+
In the folder `tools/viz3dity/`, there is a simple Python script where you can load a CityJSON file with geometries and one with the val3dity report, and you can see which objects have specific errors (each error gets a colour).
140
132
141
133
However, it's not possible to see where in an object the error is (eg which surface is not planar).
142
134
This tool helps to quickly visualise where the errors are in a large dataset, for instance a city.
@@ -151,7 +143,16 @@ If you have a question or came across a bug, please submit an issue there.
151
143
However we ask you check first whether your problem has already been solved by someone else.
152
144
153
145
154
-
## If you use val3dity in a scientific context, please cite these articles:
146
+
## Unit tests
147
+
148
+
To verify that everything went fine during the compilation, run the unit tests (from the root folder of val3dity) (this requires `pip install pytest pyyaml`):
149
+
150
+
python -m pytest --runfull
151
+
152
+
You shouldn't get any errors, if you do then let us know by opening an issue.
153
+
154
+
155
+
## If you use val3dity in a scientific context, please cite these two articles:
Copy file name to clipboardExpand all lines: changelog.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,19 @@
3
3
4
4
## [Unreleased]
5
5
- validation of topological relationships between features, eg ensuring that buildings in a city do not overlap
6
-
- support for all GML3 primitives (for IndoorGML): the so-called "Compact Geometries" (http://schemas.opengis.net/gml/3.3/geometryCompact.xsd)
6
+
7
+
8
+
## [2.5.0] -
9
+
### Added
10
+
- val3dity now accepts a stream of CityJSONSeq as input from stdin: `cat myfile.jsonl | val3dity stdin` and it validates each line and outputs the result to stdout
11
+
- a new error was added: error 905--INVALID_JSON for handling wrong JSON lines in a CityJSONSeq stream
12
+
### Changed
13
+
- the validation report in JSON has been greatly simplified. Now the errors are a flat list of errors and the "id" gives the position of the error in the feature.
14
+
- the library/API has a new way to accept parameters for the validation (named parameters), it's more flexible and simpler to use. If you used v2.4 with defaults then nothing needs to be changed, if you passed them then a small change is required.
15
+
- the library/API now accepts arrays of points/faces (including with inner-rings) as input
16
+
- the library/API does not cout or clog anything anymore, so you can manage your own log without val3dity polluting it
17
+
- the val3dity binary doesn't output to clog anymore, instead the logger "spdlog" is used (when `--verbose` is activated) and a few logs are output
18
+
- the CMake should now compile directly on macOS/Linux/Windows if GEOS is installed on your machine
0 commit comments