Skip to content

Commit

Permalink
Update readme: fix typos mostly
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoledoux committed Aug 14, 2024
1 parent 4abf4b8 commit 37bc9ba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ The following error checks are performed:
It also verifies the following, these are not errors but warnings since the file is still considered valid and usable, but they can make the file larger and some parsers might not understand all the properties:

1. *extra_root_properties*: if CityJSON has extra root properties, these should be documented in an Extension. If not this warning is returned
1. *duplicate_vertices*: duplicated vertices in `"vertices"` are allowed, but they take up spaces and decreases the topological relationships explicitly in the file. If there are any, [cjio](https://github.com/cityjson/cjio) has the operator `clean` to fix this automatically.
1. *duplicate_vertices*: duplicated vertices in `"vertices"` are allowed, but they take up space and decrease the topological relationships explicitly in the file. If there are any, [cjio](https://github.com/cityjson/cjio) has the operator `clean` to fix this automatically.
1. *unused_vertices*: vertices that are not referenced in the file, they take extra space. If there are any, [cjio](https://github.com/cityjson/cjio) has the operator `clean` to fix this automatically.


## A Rust library + 2 binaries

`cjval` is a library, and has 2 different binaries:
`cjval` is a Rust library, and has 2 different binaries:

1. `cjval` to validate a CityJSON file or a CityJSONSeq stream (it downloads automatically Extensions)
1. `cjval` to validate a CityJSON file or a CityJSONSeq stream (it downloads Extensions automatically if the file contains some)
2. `cjvalext` to validate a [CityJSON Extension file](https://www.cityjson.org/specs/#the-extension-file)


Expand All @@ -50,7 +50,7 @@ It also verifies the following, these are not errors but warnings since the file

## Web application

The code is uses at [https://validator.cityjson.org](https://validator.cityjson.org), it is compiled as a WebAssembly ([WASM code here](https://github.com/cityjson/cjval_wasm)) and a simple GUI was built.
The code is used at [https://validator.cityjson.org](https://validator.cityjson.org), it is compiled as a WebAssembly ([WASM code here](https://github.com/cityjson/cjval_wasm)) and a simple GUI was built.


## CLI Usage
Expand All @@ -65,7 +65,7 @@ cjval myfile.city.json --verbose

(the latest schemas of a X.Y version will be automatically fetched)

`--verbose` is used to get a detailed report per error checks.
`--verbose` is used to get a detailed report per error check.

If the file contains one or more [Extensions](https://www.cityjson.org/extensions/), eg:

Expand All @@ -84,9 +84,9 @@ If the file contains one or more [Extensions](https://www.cityjson.org/extension
...
```

then `cjval` will download automatically the Extension schema files.
then `cjval` will download the Extension schema files automatically.

If instead you want to use your own local Extension schema(s), you can pass them as argument with the argument `-e` and this will overwrite the automatic download:
If instead you want to use your own local Extension schema(s), you can pass them as argument with the `-e` flag and this will overwrite the automatic download:

```sh
cjval myfile.city.json -e ./myextensions/generic.ext.json
Expand Down
36 changes: 16 additions & 20 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
//! # cjval: a validator for CityJSON
//!
//! A library to validate the syntax of CityJSON objects (CityJSON +
//! [CityJSONFeatures](https://www.cityjson.org/specs/#text-sequences-and-streaming-with-cityjsonfeature)).
//!
//! It validates against the [CityJSON schemas](https://www.cityjson.org/schemas) and additional functions have been implemented
//! (because these can't be expressed with [JSON Schema](https://json-schema.org/)).
//! A Rust library and binaries to validate the syntax of CityJSON objects (CityJSON + [CityJSONSeq](https://www.cityjson.org/cityjsonseq)).
//!
//! The following is error checks are performed:
//! It validates against the [CityJSON schemas](https://www.cityjson.org/schemas) and additional functions have been implemented (because these checks cannot be expressed with [JSON Schemas](https://json-schema.org/)).
//!
//! 1. *JSON syntax*: is the file a valid JSON file?
//! 1. *CityJSON schemas*: validation against the schemas (CityJSON v1.0 or v1.1)
//! 1. *Extension schemas*: validate against the extra schemas if there's an Extension in the input file
//! 1. *parents_children_consistency*: if a City Object references another in its `children`, this ensures that the child exists. And that the child has the parent in its `parents`
//! The following error checks are performed:
//!
//! 1. *JSON syntax*: is it a valid JSON object?
//! 1. *CityJSON schemas*: validation against the schemas (CityJSON v1.0 + v1.1 + v2.0)
//! 1. *Extension schemas*: validate against the extra schemas if there's an [Extension](https://www.cityjson.org/extensions/) (those are automatically fetched from a URL)
//! 1. *parents_children_consistency*: if a City Object references another in its `"children"`, this ensures that the child exists. And that the child has the parent in its `"parents"`
//! 1. *wrong_vertex_index*: checks if all vertex indices exist in the list of vertices
//! 1. *semantics_array*: checks if the arrays for the semantics in the geometries have the same shape as that of the geometry and if the values are consistent
//! 1. *textures*: checks if the arrays for the textures are coherent (if the vertices exist + if the texture linked to exists)
//! 1. *materials*: checks if the arrays for the materials are coherent with the geometry objects and if material linked to exists

//! 1. *textures*: checks if the arrays for the textures are coherent (if the vertices exist + if the texture exists)
//! 1. *materials*: checks if the arrays for the materials are coherent with the geometry objects and if the material exists
//!
//! It also verifies the following, these are not errors since the file is still considered valid and usable, but they can make the file larger and some parsers might not understand all the properties:
//! It also verifies the following, these are not errors but warnings since the file is still considered valid and usable, but they can make the file larger and some parsers might not understand all the properties:
//!
//! 1. *extra_root_properties*: if CityJSON has extra root properties, these should be documented in an Extension. If not this warning is returned
//! 1. *duplicate_vertices*: duplicated vertices in `vertices` are allowed, but they take up spaces and decreases the topological relationships explicitly in the file. If there are any, [cjio](https://github.com/cityjson/cjio) has the operator `clean` to fix this automatically.
//! 1. *duplicate_vertices*: duplicated vertices in `"vertices"` are allowed, but they take up space and decrease the topological relationships explicitly in the file. If there are any, [cjio](https://github.com/cityjson/cjio) has the operator `clean` to fix this automatically.
//! 1. *unused_vertices*: vertices that are not referenced in the file, they take extra space. If there are any, [cjio](https://github.com/cityjson/cjio) has the operator `clean` to fix this automatically.
//!
//! ## Library + 3 binaries
//!
//! `cjval` is a library and has 3 different binaries:
//! ## A library + 2 binaries
//!
//! 1. `cjval` to validate a CityJSON file (it downloads automatically Extensions)
//! 2. `cjfval` to validate a stream of CityJSONFeature (from stdin)
//! 3. `cjvalext` to validate a [CityJSON Extension file](https://www.cityjson.org/specs/#the-extension-file)
//! `cjval` is a library and has 2 different binaries:
//!
//! 1. `cjval` to validate a CityJSON file or a CityJSONSeq stream (it downloads Extensions automatically if the file contains some)
//! 2. `cjvalext` to validate a [CityJSON Extension file](https://www.cityjson.org/specs/#the-extension-file)
//!
//! ## Example use
//!
Expand Down

0 comments on commit 37bc9ba

Please sign in to comment.