VCityTeam / UD-SV

7 stars 3 forks source link

Document a portable tool for validating citygml files against standard schema #74

Open EricBoix opened 2 years ago

EricBoix commented 2 years ago

CityGML-schema-validation seems to fail

mkdir test && cd test
virtualenv -p python2 venv    # yes this is a python2 (TWO) code
source venv/bin/activate
pip install lxml
git clone git@github.com:tudelft3d/CityGML-schema-validation.git
cd CityGML-schema-validation
wget https://download.data.grandlyon.com/files/grandlyon/imagerie/2018/maquette/CALUIRE_ET_CUIRE_2018.zip
unzip -e CALUIRE_ET_CUIRE_2018.zip
./valxsdcitygml.py CALUIRE_ET_CUIRE_2018/CALUIRE_ET_CUIRE_BATI_2018.gml

will complain about

 '69034AR222' is not a valid value of the atomic type 'xs:ID'., line 616530

xmllint doesn't support multiple XSD

brew install xmlstarlet   # on OSX
wget https://download.data.grandlyon.com/files/grandlyon/imagerie/2018/maquette/CALUIRE_ET_CUIRE_2018.zip
unzip -e CALUIRE_ET_CUIRE_2018.zip
xmllint --schema schemas/v2.0/CityGML/cityGMLBase.xsd CALUIRE_ET_CUIRE_2018/CALUIRE_ET_CUIRE_BATI_2018.gml  --noout

will fail because xmllint doesn't work with multiple XSD. There is an ad-hoc kludgy workaround.

jailln commented 2 years ago

The best validator that I could find is the 3DCityDB one but I think it is no portable sadly, or is it ? Let us know if you find one that is, interested too! :slightly_smiling_face: