Cityjson schema validator, using Rust & Wasm
March 8, 2022 ยท View on GitHub
NOTE : This project is superseded by the Official CityJSON Validator
| Author | Jos Feenstra |
| me@josfeenstra.nl | |
| Supervisor | Hugo Ledoux |
Online
What does it validate
- This web tool validates a given json against the latest cityjson schema.
Design
Why use WebAssembly?
- To gain access some very fast libaries.
- The ability to run the exact same code locally & on the web.
Why use Rust?
- Rust offers fantastic support for wasm with
wasm-bindgen,wasm-pack, and the fact that the rust compiler supports wasm straight out of the box. - Additionally, the design considerations rust is build upon (performance + safety) is a huge potential for geospatial activities.
Why two repo's?
- Decoupling
Both Repo's are created as strip down & pure as possible. This is why typescript, webpack, or web frameworks like react are omitted.
I find it important to show that this is that not only a way of making something on the web fast, but to also showcase how wasm enables interoperability: giving the web the exact same functionality as a local environment, while still remaining separate from it.
I thus opted to create the cityjson-validator-rs completely separate from the web environment, as just a very normal looking, bare-bones rust project.
Installation
git clone https://github.com/josfeenstra/cityjson-validator
cd cityjson-validator
then host the /docs folder using something akin to Live Server or Chrome Live Server. The folder is named /docs due to github pages's hosting conventions...
To build the black box where all the magic happens, /docs/bin, see cityjson-validator-rs
Credits
- Written as a GEO5010 research project for the Msc Geomatics @ Tu Delft