GithubHelp home page GithubHelp logo

tudelft3d / citygml-schema-validation Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 3.0 855 KB

small script to validate a CityGML file against the XSD schemas of CityGML (all versions supported)

License: MIT License

Python 100.00%

citygml-schema-validation's People

Contributors

hugoledoux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

citygml-schema-validation's Issues

Wrong error message on CityGML version mismatch

On webpage
Validating the attached file gives the error Element '{http://www.opengis.net/citygml/building/1.0}Building': This element is not expected. Expected is one of ( {http://www.opengis.net/gml}_Feature, {http://www.opengis.net/gml}FeatureCollection, {http://www.opengis.net/gml}MultiPointCoverage, {http://www.opengis.net/gml}MultiCurveCoverage, {http://www.opengis.net/gml}MultiSurfaceCoverage, {http://www.opengis.net/gml}MultiSolidCoverage, {http://www.opengis.net/gml}GridCoverage, {http://www.opengis.net/gml}RectifiedGridCoverage, {http://www.opengis.net/gml}Observation, {http://www.opengis.net/gml}DirectedObservation )., line 6

The problem with the file is that xmlns:bldg="http://www.opengis.net/citygml/building/1.0" should be xmlns:bldg="http://www.opengis.net/citygml/building/2.0". Therefore the error message should comply, probably sth along the lines of Expected is one of (http://www.opengis.net/citygml/building/2.0)

invalid_citygml_3.gml.zip

Implicite Geom invalid

Hello, i would like to know why my citygml isn't valid, the validator said ImplicitGeometry isn't valid, but regarding the official spec on ogc and schema on opengis, it looks like i'm good.

You'r validator are used by many people so i would like to know where i'm wrong :)

Here is my citygml, a zip containing the file is also provided at the end:
image

Implicite geom on citygml spec

Capture

Export.zip

Is the script the same as the webpage?

Validating the attached file gives the traceback below, while doing the same on the webpage gives the expected error Invalid CityGML document: not a CityGML document.. Are the two the same thing, or there is a different software behind the webpage?

Traceback (most recent call last):
  File "valxsdcitygml.py", line 117, in <module>
    main()
  File "valxsdcitygml.py", line 16, in main
    validateonefile(sys.argv[1])
  File "valxsdcitygml.py", line 20, in validateonefile
    doc, xsd = getXML(fIn)
  File "valxsdcitygml.py", line 79, in getXML
    doc = etree.parse(fIn)    
  File "src/lxml/lxml.etree.pyx", line 3427, in lxml.etree.parse (src/lxml/lxml.etree.c:85131)
  File "src/lxml/parser.pxi", line 1782, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:124005)
  File "src/lxml/parser.pxi", line 1808, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:124374)
  File "src/lxml/parser.pxi", line 1712, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:123169)
  File "src/lxml/parser.pxi", line 1115, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:117533)
  File "src/lxml/parser.pxi", line 573, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:110510)
  File "src/lxml/parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:112276)
  File "src/lxml/parser.pxi", line 613, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:111124)
lxml.etree.XMLSyntaxError: Namespace prefix bldg on Building is not defined, line 6, column 17

invalid_citygml_2.gml.zip

Clarify license

Thanks for this nice tool, could you please provide a license?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.