tudelft3d / citygml-schema-validation Goto Github PK
View Code? Open in Web Editor NEWsmall script to validate a CityGML file against the XSD schemas of CityGML (all versions supported)
License: MIT License
small script to validate a CityGML file against the XSD schemas of CityGML (all versions supported)
License: MIT License
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)
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:
Implicite geom on citygml spec
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
Thanks for this nice tool, could you please provide a license?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.