diff --git a/LICENSE b/LICENSE index 65c5ca88a67c30becee01c5a8816d964b03862f9..d645695673349e3947e8e5ae42332d0ac3164cd7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,165 +1,202 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/citygml4j-quality-ade/pom.xml b/citygml4j-quality-ade/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..78cbccd56b0a663cf186954999ee3db0eccc51fb --- /dev/null +++ b/citygml4j-quality-ade/pom.xml @@ -0,0 +1,30 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>de.hft.stuttgart</groupId> + <artifactId>citygml4j-quality-ade</artifactId> + <version>0.1.0</version> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + </properties> + + <dependencies> + <!-- https://mvnrepository.com/artifact/org.citygml4j/citygml4j --> + <dependency> + <groupId>org.citygml4j</groupId> + <artifactId>citygml4j</artifactId> + <version>2.10.2</version> + </dependency> + <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api --> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.7.0</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/QualityADEContext.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/QualityADEContext.java new file mode 100644 index 0000000000000000000000000000000000000000..295a709ff062fa18cbb4476dd56c88421d6a51f2 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/QualityADEContext.java @@ -0,0 +1,53 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality; + +import java.util.Collections; +import java.util.List; + +import org.citygml4j.model.citygml.ade.binding.ADEContext; +import org.citygml4j.model.citygml.ade.binding.ADEMarshaller; +import org.citygml4j.model.citygml.ade.binding.ADEUnmarshaller; +import org.citygml4j.model.module.ade.ADEModule; + +import de.hft.stuttgart.quality.marshaller.QualityAdeMarshaller; +import de.hft.stuttgart.quality.marshaller.QualityAdeUnmarshaller; + +public class QualityADEContext implements ADEContext { + + private final List<ADEModule> modules = Collections.singletonList(QualityADEModule.V0_1); + + @Override + public List<ADEModule> getADEModules() { + return modules; + } + + @Override + public List<String> getModelPackageNames() { + return Collections.singletonList("de.hft.stuttgart.quality.model"); + } + + @Override + public ADEMarshaller createADEMarshaller() { + return new QualityAdeMarshaller(); + } + + @Override + public ADEUnmarshaller createADEUnmarshaller() { + return new QualityAdeUnmarshaller(); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/QualityADEModule.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/QualityADEModule.java new file mode 100644 index 0000000000000000000000000000000000000000..e54dd3762a23f4acc2ff48ca65e963f77fa04811 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/QualityADEModule.java @@ -0,0 +1,97 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality; + +import java.net.URL; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; + +import javax.xml.namespace.QName; + +import org.citygml4j.model.gml.feature.AbstractFeature; +import org.citygml4j.model.module.ade.ADEModule; +import org.citygml4j.model.module.citygml.CityGMLVersion; + +import de.hft.stuttgart.quality.model.Validation; + +public class QualityADEModule extends ADEModule { + + public static final String NAMESPACE_URI = "https://transfer.hft-stuttgart.de/pages/qualityade/0.1"; + + public static final QualityADEModule V0_1 = new QualityADEModule(); + + private HashMap<String, Class<? extends AbstractFeature>> features; + private HashSet<String> featureProperties; + + private static final long serialVersionUID = -8208579547274734280L; + + public QualityADEModule() { + super(NAMESPACE_URI, "qual", CityGMLVersion.v2_0_0); + features = new HashMap<>(); + features.put("validation", Validation.class); + + featureProperties = new HashSet<>(); + } + + @Override + public URL getSchemaResource() { + return QualityADEContext.class.getResource("/qualityAde.xsd"); + } + + @Override + public List<String> getJAXBPackageNames() { + return Collections.singletonList("de.hft.stuttgart.quality.model.jaxb"); + } + + @Override + public boolean hasFeatureProperty(String name) { + return featureProperties.contains(name); + } + + @Override + public boolean hasFeature(String name) { + return features.containsKey(name); + } + + @Override + public Class<? extends AbstractFeature> getFeatureClass(String name) { + return features.get(name); + } + + @Override + public QName getFeatureName(Class<? extends AbstractFeature> featureClass) { + for (Map.Entry<String, Class<? extends AbstractFeature>> entry : features.entrySet()) { + if (entry.getValue() == featureClass) + return new QName(getNamespaceURI(), entry.getKey()); + } + + return null; + } + + @Override + public Map<String, Class<? extends AbstractFeature>> getFeatures() { + return Collections.unmodifiableMap(features); + } + + @Override + public boolean isTopLevelFeature(String name) { + return false; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/QualityAdeMarshaller.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/QualityAdeMarshaller.java new file mode 100644 index 0000000000000000000000000000000000000000..c3a9ee6efa23780fcbc56bacdc06c9f5505cd823 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/QualityAdeMarshaller.java @@ -0,0 +1,408 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.marshaller; + +import java.util.List; +import java.util.concurrent.locks.ReentrantLock; + +import javax.xml.bind.JAXBElement; + +import org.citygml4j.builder.jaxb.marshal.citygml.ade.ADEMarshallerHelper; +import org.citygml4j.model.citygml.ade.binding.ADEMarshaller; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.util.mapper.TypeMapper; + +import de.hft.stuttgart.quality.model.AllPolygonsWrongOrientation; +import de.hft.stuttgart.quality.model.AttributeMissing; +import de.hft.stuttgart.quality.model.AttributeWrongValue; +import de.hft.stuttgart.quality.model.ConsecutivePointsSame; +import de.hft.stuttgart.quality.model.Edge; +import de.hft.stuttgart.quality.model.HoleOutside; +import de.hft.stuttgart.quality.model.InnerRingsNested; +import de.hft.stuttgart.quality.model.InteriorDisconnected; +import de.hft.stuttgart.quality.model.IntersectingRings; +import de.hft.stuttgart.quality.model.MultipleConnectedComponents; +import de.hft.stuttgart.quality.model.NonManifoldEdge; +import de.hft.stuttgart.quality.model.NonManifoldVertex; +import de.hft.stuttgart.quality.model.NonPlanarDistancePlane; +import de.hft.stuttgart.quality.model.NonPlanarNormalsDeviation; +import de.hft.stuttgart.quality.model.OrientationRingsSame; +import de.hft.stuttgart.quality.model.PolygonWrongOrientation; +import de.hft.stuttgart.quality.model.RingNotClosed; +import de.hft.stuttgart.quality.model.RingSelfIntersection; +import de.hft.stuttgart.quality.model.SolidNotClosed; +import de.hft.stuttgart.quality.model.SolidSelfIntersection; +import de.hft.stuttgart.quality.model.TooFewPoints; +import de.hft.stuttgart.quality.model.TooFewPolygons; +import de.hft.stuttgart.quality.model.Validation; +import de.hft.stuttgart.quality.model.ValidationError; +import de.hft.stuttgart.quality.model.ValidationResult; +import de.hft.stuttgart.quality.model.jaxb.AllPolygonsWrongOrientationType; +import de.hft.stuttgart.quality.model.jaxb.AttributeMissingType; +import de.hft.stuttgart.quality.model.jaxb.AttributeWrongValueType; +import de.hft.stuttgart.quality.model.jaxb.ConsecutivePointsSameType; +import de.hft.stuttgart.quality.model.jaxb.EdgeType; +import de.hft.stuttgart.quality.model.jaxb.HoleOutsideType; +import de.hft.stuttgart.quality.model.jaxb.InnerRingsNestedType; +import de.hft.stuttgart.quality.model.jaxb.InteriorDisconnectedType; +import de.hft.stuttgart.quality.model.jaxb.IntersectingRingsType; +import de.hft.stuttgart.quality.model.jaxb.MultipleConnectedComponentsType; +import de.hft.stuttgart.quality.model.jaxb.NonManifoldEdgeType; +import de.hft.stuttgart.quality.model.jaxb.NonManifoldVertexType; +import de.hft.stuttgart.quality.model.jaxb.NonPlanarDistancePlaneType; +import de.hft.stuttgart.quality.model.jaxb.NonPlanarNormalsDeviationType; +import de.hft.stuttgart.quality.model.jaxb.ObjectFactory; +import de.hft.stuttgart.quality.model.jaxb.OrientationRingsSameType; +import de.hft.stuttgart.quality.model.jaxb.PolygonWrongOrientationType; +import de.hft.stuttgart.quality.model.jaxb.RingNotClosedType; +import de.hft.stuttgart.quality.model.jaxb.RingSelfIntersectionType; +import de.hft.stuttgart.quality.model.jaxb.SolidNotClosedType; +import de.hft.stuttgart.quality.model.jaxb.SolidSelfIntersectionType; +import de.hft.stuttgart.quality.model.jaxb.TooFewPointsType; +import de.hft.stuttgart.quality.model.jaxb.TooFewPolygonsType; +import de.hft.stuttgart.quality.model.jaxb.ValidationErrorType; +import de.hft.stuttgart.quality.model.jaxb.ValidationResultType; +import de.hft.stuttgart.quality.model.jaxb.ValidationType; + +public class QualityAdeMarshaller implements ADEMarshaller { + + private final ReentrantLock lock = new ReentrantLock(); + private final ObjectFactory factory = new ObjectFactory(); + private TypeMapper<JAXBElement<?>> elementMapper; + private TypeMapper<Object> typeMapper; + private ADEMarshallerHelper helper; + + private TypeMapper<JAXBElement<?>> getElementMapper() { + if (elementMapper == null) { + lock.lock(); + try { + if (elementMapper == null) { + elementMapper = TypeMapper.<JAXBElement<?>>create().with(Validation.class, this::createValidation) + .with(ValidationResult.class, this::createValidationResult); + } + } finally { + lock.unlock(); + } + } + + return elementMapper; + } + + private TypeMapper<Object> getTypeMapper() { + if (typeMapper == null) { + lock.lock(); + try { + if (typeMapper == null) { + typeMapper = TypeMapper.create().with(Validation.class, this::marshalValidation) + .with(ValidationResult.class, this::marshalValidationResult) + .with(ConsecutivePointsSame.class, this::marshalConsecutivePointsSame) + .with(TooFewPoints.class, this::marshalTooFewPoints) + .with(RingSelfIntersection.class, this::marshalRingSelfIntersection) + .with(RingNotClosed.class, this::marshalRingNotClosed) + .with(InteriorDisconnected.class, this::marshalInteriorDisconnected) + .with(IntersectingRings.class, this::marshalIntersectingRings) + .with(NonPlanarDistancePlane.class, this::marshalNonPlanarDistancePlane) + .with(InnerRingsNested.class, this::marshalInnerRingsNested) + .with(HoleOutside.class, this::marshalHoleOutside) + .with(NonPlanarNormalsDeviation.class, this::marshalNonPlanarNormalsDeviation) + .with(OrientationRingsSame.class, this::marshalOrientationRingsSame) + .with(AllPolygonsWrongOrientation.class, this::marshalAllPolygonsWrongOrientation) + .with(PolygonWrongOrientation.class, this::marshalPolygonWrongOrientation) + .with(SolidSelfIntersection.class, this::marshalSolidSelfIntersection) + .with(NonManifoldVertex.class, this::marshalNonManifoldVertex) + .with(NonManifoldEdge.class, this::marshalNonManifoldEdge) + .with(SolidNotClosed.class, this::marshalSolidNotClosed) + .with(TooFewPolygons.class, this::marshalTooFewPolygons) + .with(MultipleConnectedComponents.class, this::marshalMultipleConnectedComponents) + .with(AttributeWrongValue.class, this::marshalAttributeWrongValue) + .with(AttributeMissing.class, this::marshalAttributeMissing); + } + } finally { + lock.unlock(); + } + } + + return typeMapper; + } + + private ValidationType marshalValidation(Validation src) { + ValidationType dest = factory.createValidationType(); + + if (src.isSetDateTime()) { + dest.setValidationDate(src.getValidationDate()); + } + + if (src.isSetValidationSoftware()) { + dest.setValidationSoftware(src.getValidationSoftware()); + } + + if (src.isSetValidationPlan()) { + dest.setValidationPlan(src.getValidationPlan()); + } + + if (src.isSetStatistics()) { + dest.setStatistics(src.getStatistics()); + } + + return dest; + } + + private ValidationResultType marshalValidationResult(ValidationResult src) { + ValidationResultType dest = factory.createValidationResultType(); + + dest.setResult(src.getResult()); + + if (src.hasErrors()) { + for (ValidationError err : src.getErrors()) { + dest.getErrors().add(marshalValidationError(err)); + } + } + return dest; + } + + private JAXBElement<?> createValidation(Validation src) { + return factory.createValidationType(marshalValidation(src)); + } + + private JAXBElement<?> createValidationResult(ValidationResult src) { + return factory.createValidationResultType(marshalValidationResult(src)); + } + + private ValidationErrorType marshalValidationError(ValidationError err) { + return (ValidationErrorType) marshal(err); + } + + @Override + public void setADEMarshallerHelper(ADEMarshallerHelper helper) { + this.helper = helper; + } + + @Override + public JAXBElement<?> marshalJAXBElement(ADEModelObject src) { + return getElementMapper().apply(src); + } + + @Override + public Object marshal(ADEModelObject src) { + return getTypeMapper().apply(src); + } + + private ConsecutivePointsSameType marshalConsecutivePointsSame(ConsecutivePointsSame src) { + ConsecutivePointsSameType dest = factory.createConsecutivePointsSameType(); + dest.setLinearRingId(src.getLinearRingId()); + if (src.getVertex1() != null) { + dest.setVertex1(helper.getGMLMarshaller().marshalDirectPosition(src.getVertex1())); + } + if (src.getVertex2() != null) { + dest.setVertex2(helper.getGMLMarshaller().marshalDirectPosition(src.getVertex2())); + } + return dest; + } + + private TooFewPointsType marshalTooFewPoints(TooFewPoints src) { + TooFewPointsType dest = factory.createTooFewPointsType(); + dest.setLinearRingId(src.getLinearRingId()); + return dest; + } + + private RingSelfIntersectionType marshalRingSelfIntersection(RingSelfIntersection src) { + RingSelfIntersectionType dest = factory.createRingSelfIntersectionType(); + dest.setLinearRingId(src.getLinearRingId()); + dest.setType(src.getType()); + if (src.getEdge1() != null) { + dest.setEdge1(marshalEdge(src.getEdge1())); + } + + if (src.getEdge2() != null) { + dest.setEdge2(marshalEdge(src.getEdge2())); + } + + if (src.getVertex1() != null) { + dest.setVertex1(helper.getGMLMarshaller().marshalDirectPosition(src.getVertex1())); + } + + if (src.getVertex2() != null) { + dest.setVertex2(helper.getGMLMarshaller().marshalDirectPosition(src.getVertex2())); + } + return dest; + } + + private EdgeType marshalEdge(Edge src) { + EdgeType dest = new EdgeType(); + if (src.getFrom() != null) { + dest.setFrom(helper.getGMLMarshaller().marshalDirectPosition(src.getFrom())); + } + + if (src.getTo() != null) { + dest.setTo(helper.getGMLMarshaller().marshalDirectPosition(src.getTo())); + } + return dest; + } + + private RingNotClosedType marshalRingNotClosed(RingNotClosed src) { + RingNotClosedType dest = new RingNotClosedType(); + dest.setLinearRingId(src.getLinearRingId()); + return dest; + } + + private InteriorDisconnectedType marshalInteriorDisconnected(InteriorDisconnected src) { + InteriorDisconnectedType dest = new InteriorDisconnectedType(); + dest.setPolygonId(src.getPolygonId()); + return dest; + } + + private IntersectingRingsType marshalIntersectingRings(IntersectingRings src) { + IntersectingRingsType dest = new IntersectingRingsType(); + dest.setPolygonId(src.getPolygonId()); + dest.setLinearRingId1(src.getLinearRingId1()); + dest.setLinearRingId2(src.getLinearRingId2()); + return dest; + } + + private NonPlanarDistancePlaneType marshalNonPlanarDistancePlane(NonPlanarDistancePlane src) { + NonPlanarDistancePlaneType dest = new NonPlanarDistancePlaneType(); + dest.setPolygonId(src.getPolygonId()); + if (src.getVertex() != null) { + dest.setVertex(helper.getGMLMarshaller().marshalDirectPosition(src.getVertex())); + } + if (src.getDistance() != null) { + dest.setDistance(helper.getGMLMarshaller().marshalLength(src.getDistance())); + } + return dest; + } + + private InnerRingsNestedType marshalInnerRingsNested(InnerRingsNested src) { + InnerRingsNestedType dest = new InnerRingsNestedType(); + dest.setPolygonId(src.getPolygonId()); + dest.setLinearRingId1(src.getLinearRingId1()); + dest.setLinearRingId2(src.getLinearRingId2()); + return dest; + } + + private HoleOutsideType marshalHoleOutside(HoleOutside src) { + HoleOutsideType dest = new HoleOutsideType(); + dest.setPolygonId(src.getPolygonId()); + dest.setLinearRingId(src.getLinearRingId()); + return dest; + } + + private NonPlanarNormalsDeviationType marshalNonPlanarNormalsDeviation(NonPlanarNormalsDeviation src) { + NonPlanarNormalsDeviationType dest = new NonPlanarNormalsDeviationType(); + dest.setPolygonId(src.getPolygonId()); + if (src.getDeviation() != null) { + dest.setDeviation(helper.getGMLMarshaller().marshalAngle(src.getDeviation())); + } + return dest; + } + + private OrientationRingsSameType marshalOrientationRingsSame(OrientationRingsSame src) { + OrientationRingsSameType dest = new OrientationRingsSameType(); + dest.setPolygonId(src.getPolygonId()); + dest.setLinearRingId(src.getLinearRingId()); + return dest; + } + + private AllPolygonsWrongOrientationType marshalAllPolygonsWrongOrientation(AllPolygonsWrongOrientation src) { + AllPolygonsWrongOrientationType dest = new AllPolygonsWrongOrientationType(); + dest.setGeometryId(src.getGeometryId()); + return dest; + } + + private PolygonWrongOrientationType marshalPolygonWrongOrientation(PolygonWrongOrientation src) { + PolygonWrongOrientationType dest = new PolygonWrongOrientationType(); + dest.setGeometryId(src.getGeometryId()); + if (src.isSetEdges()) { + List<EdgeType> edges = dest.getEdges(); + for (Edge e : src.getEdges()) { + edges.add(marshalEdge(e)); + } + } + return dest; + } + + private SolidSelfIntersectionType marshalSolidSelfIntersection(SolidSelfIntersection src) { + SolidSelfIntersectionType dest = new SolidSelfIntersectionType(); + dest.setGeometryId(src.getGeometryId()); + dest.setPolygonId1(src.getPolygonId1()); + dest.setPolygonId2(src.getPolygonId2()); + return dest; + } + + private NonManifoldVertexType marshalNonManifoldVertex(NonManifoldVertex src) { + NonManifoldVertexType dest = new NonManifoldVertexType(); + dest.setGeometryId(src.getGeometryId()); + if (src.getVertex() != null) { + dest.setVertex(helper.getGMLMarshaller().marshalDirectPosition(src.getVertex())); + } + return dest; + } + + private NonManifoldEdgeType marshalNonManifoldEdge(NonManifoldEdge src) { + NonManifoldEdgeType dest = new NonManifoldEdgeType(); + dest.setGeometryId(src.getGeometryId()); + if (src.isSetEdges()) { + List<EdgeType> edges = dest.getEdges(); + for (Edge e : src.getEdges()) { + edges.add(marshalEdge(e)); + } + } + return dest; + } + + private SolidNotClosedType marshalSolidNotClosed(SolidNotClosed src) { + SolidNotClosedType dest = new SolidNotClosedType(); + dest.setGeometryId(src.getGeometryId()); + if (src.isSetEdges()) { + List<EdgeType> edges = dest.getEdges(); + for (Edge e : src.getEdges()) { + edges.add(marshalEdge(e)); + } + } + return dest; + } + + private TooFewPolygonsType marshalTooFewPolygons(TooFewPolygons src) { + TooFewPolygonsType dest = new TooFewPolygonsType(); + dest.setGeometryId(src.getGeometryId()); + return dest; + } + + private MultipleConnectedComponentsType marshalMultipleConnectedComponents(MultipleConnectedComponents src) { + MultipleConnectedComponentsType dest = new MultipleConnectedComponentsType(); + dest.setGeometryId(src.getGeometryId()); + if (src.isSetComponents() ) { + dest.getComponents().addAll(src.getComponents()); + } + return dest; + } + + private AttributeWrongValueType marshalAttributeWrongValue(AttributeWrongValue src) { + AttributeWrongValueType dest = new AttributeWrongValueType(); + dest.setAttributeName(src.getAttributeName()); + dest.setChildId(src.getChildId()); + dest.setGeneric(src.isGeneric()); + return dest; + } + + private AttributeMissingType marshalAttributeMissing(AttributeMissing src) { + AttributeMissingType dest = new AttributeMissingType(); + dest.setAttributeName(src.getAttributeName()); + dest.setChildId(src.getChildId()); + dest.setGeneric(src.isGeneric()); + return dest; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/QualityAdeUnmarshaller.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/QualityAdeUnmarshaller.java new file mode 100644 index 0000000000000000000000000000000000000000..21f4148313ba71b0d4eb2c3df3ac58176fdcd6eb --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/QualityAdeUnmarshaller.java @@ -0,0 +1,374 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.marshaller; + +import java.util.List; +import java.util.concurrent.locks.ReentrantLock; +import java.util.stream.Collectors; + +import javax.xml.bind.JAXBElement; + +import org.citygml4j.builder.jaxb.unmarshal.citygml.ade.ADEUnmarshallerHelper; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.citygml.ade.binding.ADEUnmarshaller; +import org.citygml4j.util.mapper.CheckedTypeMapper; +import org.citygml4j.xml.io.reader.MissingADESchemaException; + +import de.hft.stuttgart.quality.model.AllPolygonsWrongOrientation; +import de.hft.stuttgart.quality.model.AttributeMissing; +import de.hft.stuttgart.quality.model.AttributeWrongValue; +import de.hft.stuttgart.quality.model.ConsecutivePointsSame; +import de.hft.stuttgart.quality.model.Edge; +import de.hft.stuttgart.quality.model.HoleOutside; +import de.hft.stuttgart.quality.model.InnerRingsNested; +import de.hft.stuttgart.quality.model.InteriorDisconnected; +import de.hft.stuttgart.quality.model.IntersectingRings; +import de.hft.stuttgart.quality.model.MultipleConnectedComponents; +import de.hft.stuttgart.quality.model.NonManifoldEdge; +import de.hft.stuttgart.quality.model.NonManifoldVertex; +import de.hft.stuttgart.quality.model.NonPlanarDistancePlane; +import de.hft.stuttgart.quality.model.NonPlanarNormalsDeviation; +import de.hft.stuttgart.quality.model.OrientationRingsSame; +import de.hft.stuttgart.quality.model.PolygonWrongOrientation; +import de.hft.stuttgart.quality.model.RingNotClosed; +import de.hft.stuttgart.quality.model.RingSelfIntersection; +import de.hft.stuttgart.quality.model.SolidNotClosed; +import de.hft.stuttgart.quality.model.SolidSelfIntersection; +import de.hft.stuttgart.quality.model.TooFewPoints; +import de.hft.stuttgart.quality.model.TooFewPolygons; +import de.hft.stuttgart.quality.model.Validation; +import de.hft.stuttgart.quality.model.ValidationError; +import de.hft.stuttgart.quality.model.ValidationResult; +import de.hft.stuttgart.quality.model.jaxb.AllPolygonsWrongOrientationType; +import de.hft.stuttgart.quality.model.jaxb.AttributeMissingType; +import de.hft.stuttgart.quality.model.jaxb.AttributeWrongValueType; +import de.hft.stuttgart.quality.model.jaxb.ConsecutivePointsSameType; +import de.hft.stuttgart.quality.model.jaxb.EdgeType; +import de.hft.stuttgart.quality.model.jaxb.HoleOutsideType; +import de.hft.stuttgart.quality.model.jaxb.InnerRingsNestedType; +import de.hft.stuttgart.quality.model.jaxb.InteriorDisconnectedType; +import de.hft.stuttgart.quality.model.jaxb.IntersectingRingsType; +import de.hft.stuttgart.quality.model.jaxb.MultipleConnectedComponentsType; +import de.hft.stuttgart.quality.model.jaxb.NonManifoldEdgeType; +import de.hft.stuttgart.quality.model.jaxb.NonManifoldVertexType; +import de.hft.stuttgart.quality.model.jaxb.NonPlanarDistancePlaneType; +import de.hft.stuttgart.quality.model.jaxb.NonPlanarNormalsDeviationType; +import de.hft.stuttgart.quality.model.jaxb.OrientationRingsSameType; +import de.hft.stuttgart.quality.model.jaxb.PolygonWrongOrientationType; +import de.hft.stuttgart.quality.model.jaxb.RingNotClosedType; +import de.hft.stuttgart.quality.model.jaxb.RingSelfIntersectionType; +import de.hft.stuttgart.quality.model.jaxb.SolidNotClosedType; +import de.hft.stuttgart.quality.model.jaxb.SolidSelfIntersectionType; +import de.hft.stuttgart.quality.model.jaxb.TooFewPointsType; +import de.hft.stuttgart.quality.model.jaxb.TooFewPolygonsType; +import de.hft.stuttgart.quality.model.jaxb.ValidationErrorType; +import de.hft.stuttgart.quality.model.jaxb.ValidationResultType; +import de.hft.stuttgart.quality.model.jaxb.ValidationType; +import de.hft.stuttgart.quality.util.UncheckedMissingADESchemaException; + +public class QualityAdeUnmarshaller implements ADEUnmarshaller { + + private final ReentrantLock lock = new ReentrantLock(); + private CheckedTypeMapper<ADEModelObject> typeMapper; + private ADEUnmarshallerHelper helper; + + private CheckedTypeMapper<ADEModelObject> getTypeMapper() { + if (typeMapper == null) { + lock.lock(); + try { + if (typeMapper == null) { + typeMapper = CheckedTypeMapper.<ADEModelObject>create() + .with(ValidationType.class, this::unmarshalValidationType) + .with(ValidationResultType.class, this::umarshalValidationResultType) + .with(ConsecutivePointsSameType.class, this::unmarshalConsecutivePointsSameType) + .with(TooFewPointsType.class, this::unmarshalTooFewPointsType) + .with(RingSelfIntersectionType.class, this::unmarshalRingSelfIntersectionType) + .with(RingNotClosedType.class, this::unmarshalRingNotClosedType) + .with(InteriorDisconnectedType.class, this::unmarshalInteriorDisconnectedType) + .with(IntersectingRingsType.class, this::unmarshalIntersectingRingsType) + .with(NonPlanarDistancePlaneType.class, this::unmarshalNonPlanarDistancePlaneType) + .with(InnerRingsNestedType.class, this::unmarshalInnerRingsType) + .with(HoleOutsideType.class, this::unmarshalHoleOutsideType) + .with(OrientationRingsSameType.class, this::unmarshalOrientationRingsSameType) + .with(NonPlanarNormalsDeviationType.class, this::unmarshalNonPlanarNormalsDeviationType) + .with(AllPolygonsWrongOrientationType.class, this::unmarshalAllPolygonsWrongOrientationType) + .with(PolygonWrongOrientationType.class, this::unmarshalPolygonWrongOrientationType) + .with(SolidSelfIntersectionType.class, this::unmarshalSolidSelfIntersectionType) + .with(NonManifoldVertexType.class, this::unmarshalNonManifoldVertexType) + .with(NonManifoldEdgeType.class, this::unmarshalNonManifoldEdgeType) + .with(SolidNotClosedType.class, this::unmarshalSolidNotClosedType) + .with(TooFewPolygonsType.class, this::unmarshalTooFewPolygonsType) + .with(MultipleConnectedComponentsType.class, this::unmarshalMultipleConnectedComponentsType) + .with(AttributeWrongValueType.class, this::unmarshalAttributeWrongValueType) + .with(AttributeMissingType.class, this::unmarshalAttributeMissingType); + + } + } finally { + lock.unlock(); + } + } + + return typeMapper; + } + + @Override + public void setADEUnmarshallerHelper(ADEUnmarshallerHelper helper) { + this.helper = helper; + } + + @Override + public ADEModelObject unmarshal(JAXBElement<?> src) throws MissingADESchemaException { + return unmarshal(src.getValue()); + } + + @Override + public ADEModelObject unmarshal(Object src) throws MissingADESchemaException { + return getTypeMapper().apply(src); + } + + private Validation unmarshalValidationType(ValidationType src) { + Validation dest = new Validation(); + dest.setValidationDate(src.getValidationDate()); + dest.setValidationSoftware(src.getValidationSoftware()); + dest.setValidationPlan(src.getValidationPlan()); + dest.setStatistics(src.getStatistics()); + return dest; + } + + private ValidationResult umarshalValidationResultType(ValidationResultType src) throws MissingADESchemaException { + ValidationResult dest = new ValidationResult(); + dest.setResult(src.getResult()); + if (src.isSetErrors()) { + try { + dest.getErrors() + .addAll(src.getErrors().stream().map(this::unmarshalError).collect(Collectors.toList())); + } catch (UncheckedMissingADESchemaException e) { + throw e.getCause(); + } + } + return dest; + } + + private ValidationError unmarshalError(ValidationErrorType err) { + try { + return (ValidationError) getTypeMapper().apply(err); + } catch (MissingADESchemaException e) { + throw new UncheckedMissingADESchemaException(e); + } + } + + private ConsecutivePointsSame unmarshalConsecutivePointsSameType(ConsecutivePointsSameType src) { + ConsecutivePointsSame dest = new ConsecutivePointsSame(); + dest.setLinearRingId(src.getLinearRingId()); + dest.setVertex1(helper.getGMLUnmarshaller().unmarshalDirectPosition(src.getVertex1())); + dest.setVertex2(helper.getGMLUnmarshaller().unmarshalDirectPosition(src.getVertex2())); + return dest; + } + + private TooFewPoints unmarshalTooFewPointsType(TooFewPointsType src) { + TooFewPoints dest = new TooFewPoints(); + dest.setLinearRingId(src.getLinearRingId()); + return dest; + } + + private RingSelfIntersection unmarshalRingSelfIntersectionType(RingSelfIntersectionType src) { + RingSelfIntersection dest = new RingSelfIntersection(); + if (src.getEdge1() != null) { + dest.setEdge1(unmarshalEdge(src.getEdge1())); + } + + if (src.getEdge2() != null) { + dest.setEdge2(unmarshalEdge(src.getEdge2())); + } + + dest.setLinearRingId(src.getLinearRingId()); + dest.setType(src.getType()); + + if (src.getVertex1() != null) { + dest.setVertex1(helper.getGMLUnmarshaller().unmarshalDirectPosition(src.getVertex1())); + } + + if (src.getVertex2() != null) { + dest.setVertex2(helper.getGMLUnmarshaller().unmarshalDirectPosition(src.getVertex2())); + } + return dest; + } + + private RingNotClosed unmarshalRingNotClosedType(RingNotClosedType src) { + RingNotClosed dest = new RingNotClosed(); + dest.setLinearRingId(src.getLinearRingId()); + return dest; + } + + private Edge unmarshalEdge(EdgeType src) { + Edge dest = new Edge(); + if (src.getFrom() != null) { + dest.setFrom(helper.getGMLUnmarshaller().unmarshalDirectPosition(src.getFrom())); + } + if (src.getTo() != null) { + dest.setTo(helper.getGMLUnmarshaller().unmarshalDirectPosition(src.getTo())); + } + return dest; + } + + private InteriorDisconnected unmarshalInteriorDisconnectedType(InteriorDisconnectedType src) { + InteriorDisconnected dest = new InteriorDisconnected(); + dest.setPolygonId(src.getPolygonId()); + return dest; + } + + private IntersectingRings unmarshalIntersectingRingsType(IntersectingRingsType src) { + IntersectingRings dest = new IntersectingRings(); + dest.setPolygonId(src.getPolygonId()); + dest.setLinearRingId1(src.getLinearRingId1()); + dest.setLinearRingId2(src.getLinearRingId2()); + return dest; + } + + private InnerRingsNested unmarshalInnerRingsType(InnerRingsNestedType src) { + InnerRingsNested dest = new InnerRingsNested(); + dest.setPolygonId(src.getPolygonId()); + dest.setLinearRingId1(src.getLinearRingId1()); + dest.setLinearRingId2(src.getLinearRingId2()); + return dest; + } + + private NonPlanarDistancePlane unmarshalNonPlanarDistancePlaneType(NonPlanarDistancePlaneType src) { + NonPlanarDistancePlane dest = new NonPlanarDistancePlane(); + dest.setPolygonId(src.getPolygonId()); + if (src.getVertex() != null) { + dest.setVertex(helper.getGMLUnmarshaller().unmarshalDirectPosition(src.getVertex())); + } + if (src.getDistance() != null) { + dest.setDistance(helper.getGMLUnmarshaller().unmarshalLength(src.getDistance())); + } + return dest; + } + + private HoleOutside unmarshalHoleOutsideType(HoleOutsideType src) { + HoleOutside dest = new HoleOutside(); + dest.setPolygonId(src.getPolygonId()); + dest.setLinearRingId(src.getLinearRingId()); + return dest; + } + + private NonPlanarNormalsDeviation unmarshalNonPlanarNormalsDeviationType(NonPlanarNormalsDeviationType src) { + NonPlanarNormalsDeviation dest = new NonPlanarNormalsDeviation(); + dest.setPolygonId(src.getPolygonId()); + if (src.getDeviation() != null) { + dest.setDeviation(helper.getGMLUnmarshaller().unmarshalAngle(src.getDeviation())); + } + return dest; + } + + private OrientationRingsSame unmarshalOrientationRingsSameType(OrientationRingsSameType src) { + OrientationRingsSame dest = new OrientationRingsSame(); + dest.setPolygonId(src.getPolygonId()); + dest.setLinearRingId(src.getLinearRingId()); + return dest; + } + + private AllPolygonsWrongOrientation unmarshalAllPolygonsWrongOrientationType(AllPolygonsWrongOrientationType src) { + AllPolygonsWrongOrientation dest = new AllPolygonsWrongOrientation(); + dest.setGeometryId(src.getGeometryId()); + return dest; + } + + private PolygonWrongOrientation unmarshalPolygonWrongOrientationType(PolygonWrongOrientationType src) { + PolygonWrongOrientation dest = new PolygonWrongOrientation(); + dest.setGeometryId(src.getGeometryId()); + if (src.isSetEdges()) { + List<Edge> edges = dest.getEdges(); + for (EdgeType e : src.getEdges()) { + edges.add(unmarshalEdge(e)); + } + } + return dest; + } + + private SolidSelfIntersection unmarshalSolidSelfIntersectionType(SolidSelfIntersectionType src) { + SolidSelfIntersection dest = new SolidSelfIntersection(); + dest.setGeometryId(src.getGeometryId()); + dest.setPolygonId1(src.getPolygonId1()); + dest.setPolygonId2(src.getPolygonId2()); + return dest; + } + + private NonManifoldVertex unmarshalNonManifoldVertexType(NonManifoldVertexType src) { + NonManifoldVertex dest = new NonManifoldVertex(); + dest.setGeometryId(src.getGeometryId()); + if (src.getVertex() != null) { + dest.setVertex(helper.getGMLUnmarshaller().unmarshalDirectPosition(src.getVertex())); + } + return dest; + } + + private NonManifoldEdge unmarshalNonManifoldEdgeType(NonManifoldEdgeType src) { + NonManifoldEdge dest = new NonManifoldEdge(); + dest.setGeometryId(src.getGeometryId()); + if (src.isSetEdges()) { + List<Edge> edges = dest.getEdges(); + for (EdgeType e : src.getEdges()) { + edges.add(unmarshalEdge(e)); + } + } + return dest; + } + + private SolidNotClosed unmarshalSolidNotClosedType(SolidNotClosedType src) { + SolidNotClosed dest = new SolidNotClosed(); + dest.setGeometryId(src.getGeometryId()); + if (src.isSetEdges()) { + List<Edge> edges = dest.getEdges(); + for (EdgeType e : src.getEdges()) { + edges.add(unmarshalEdge(e)); + } + } + return dest; + } + + private TooFewPolygons unmarshalTooFewPolygonsType(TooFewPolygonsType src) { + TooFewPolygons dest = new TooFewPolygons(); + dest.setGeometryId(src.getGeometryId()); + return dest; + } + + private MultipleConnectedComponents unmarshalMultipleConnectedComponentsType(MultipleConnectedComponentsType src) { + MultipleConnectedComponents dest = new MultipleConnectedComponents(); + dest.setGeometryId(src.getGeometryId()); + if (src.isSetComponents()) { + dest.getComponents().addAll(src.getComponents()); + } + return dest; + } + + private AttributeWrongValue unmarshalAttributeWrongValueType(AttributeWrongValueType src) { + AttributeWrongValue dest = new AttributeWrongValue(); + dest.setAttributeName(src.getAttributeName()); + dest.setChildId(src.getChildId()); + dest.setGeneric(src.isGeneric()); + return dest; + } + + private AttributeMissing unmarshalAttributeMissingType(AttributeMissingType src) { + AttributeMissing dest = new AttributeMissing(); + dest.setAttributeName(src.getAttributeName()); + dest.setChildId(src.getChildId()); + dest.setGeneric(src.isGeneric()); + return dest; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/ZonedDateTimeAdapter.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/ZonedDateTimeAdapter.java new file mode 100644 index 0000000000000000000000000000000000000000..bf9101cd0aa816982b9f18c1858474de3b8d8fb1 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/ZonedDateTimeAdapter.java @@ -0,0 +1,43 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.marshaller; + +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; + +import javax.xml.bind.annotation.adapters.XmlAdapter; + +public class ZonedDateTimeAdapter extends XmlAdapter<String, ZonedDateTime> { + + @Override + public ZonedDateTime unmarshal(String v) throws Exception { + try { + return ZonedDateTime.from(DateTimeFormatter.ISO_OFFSET_DATE_TIME.parse(v)); + } catch (Exception e) { + return LocalDateTime.parse(v).atZone(ZoneId.systemDefault()); + } + } + + @Override + public String marshal(ZonedDateTime v) throws Exception { + return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(v); + } + + + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AllPolygonsWrongOrientation.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AllPolygonsWrongOrientation.java new file mode 100644 index 0000000000000000000000000000000000000000..ebc2cc15afcd5318a6f3b3a0cfdb7bbac403e9b3 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AllPolygonsWrongOrientation.java @@ -0,0 +1,70 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class AllPolygonsWrongOrientation extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = 3817224755569965908L; + + private String geometryId; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getGeometryId() { + return geometryId; + } + + @Override + public String toString() { + return "AllPolygonsWrongOrientation [geometryId=" + geometryId + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new AllPolygonsWrongOrientation(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AttributeMissing.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AttributeMissing.java new file mode 100644 index 0000000000000000000000000000000000000000..6d339fa0f27743419c7db343e41b293e9ba326bd --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AttributeMissing.java @@ -0,0 +1,82 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class AttributeMissing extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -5416574100733885169L; + + private String childId; + private String attributeName; + private boolean generic; + + public String getChildId() { + return childId; + } + + public void setChildId(String childId) { + this.childId = childId; + } + + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + public boolean isGeneric() { + return generic; + } + + public void setGeneric(boolean generic) { + this.generic = generic; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new AttributeWrongValue(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AttributeWrongValue.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AttributeWrongValue.java new file mode 100644 index 0000000000000000000000000000000000000000..88167346fde8fc53f24888cad18d99a1fa3ddfdc --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AttributeWrongValue.java @@ -0,0 +1,88 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class AttributeWrongValue extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -5650985861847806620L; + + private String childId; + private String attributeName; + private boolean generic; + + public String getChildId() { + return childId; + } + + public void setChildId(String childId) { + this.childId = childId; + } + + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + public boolean isGeneric() { + return generic; + } + + public void setGeneric(boolean generic) { + this.generic = generic; + } + + @Override + public String toString() { + return "AttributeWrongValue [childId=" + childId + ", attributeName=" + attributeName + ", generic=" + generic + + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new AttributeWrongValue(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ConsecutivePointsSame.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ConsecutivePointsSame.java new file mode 100644 index 0000000000000000000000000000000000000000..d4ce99e31d47cb552f0dc4fd29f7b74683d96918 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ConsecutivePointsSame.java @@ -0,0 +1,90 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; +import org.citygml4j.model.gml.geometry.primitives.DirectPosition; + +public class ConsecutivePointsSame extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -838421312521561747L; + + private String linearRingId; + private DirectPosition vertex1; + private DirectPosition vertex2; + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public void setVertex1(DirectPosition vertex1) { + this.vertex1 = vertex1; + } + + public void setVertex2(DirectPosition vertex2) { + this.vertex2 = vertex2; + } + + public String getLinearRingId() { + return linearRingId; + } + + public DirectPosition getVertex1() { + return vertex1; + } + + public DirectPosition getVertex2() { + return vertex2; + } + + @Override + public String toString() { + return "ConsecutivePointsSame [linearRingId=" + linearRingId + ", vertex1=" + vertex1 + ", vertex2=" + vertex2 + + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new ConsecutivePointsSame(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/Edge.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/Edge.java new file mode 100644 index 0000000000000000000000000000000000000000..d78e694882fe346eac94da0f8ae48fd765e3e7ec --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/Edge.java @@ -0,0 +1,45 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import java.io.Serializable; + +import org.citygml4j.model.gml.geometry.primitives.DirectPosition; + +public class Edge implements Serializable { + + private static final long serialVersionUID = -5076265818764666094L; + + private DirectPosition from; + private DirectPosition to; + + public void setFrom(DirectPosition from) { + this.from = from; + } + + public void setTo(DirectPosition to) { + this.to = to; + } + + public DirectPosition getFrom() { + return from; + } + + public DirectPosition getTo() { + return to; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/HoleOutside.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/HoleOutside.java new file mode 100644 index 0000000000000000000000000000000000000000..2547b7bbfa5ed7f0d94903ad8ddfa6d80c65cb79 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/HoleOutside.java @@ -0,0 +1,78 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class HoleOutside extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -3029497342950689843L; + + private String polygonId; + private String linearRingId; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public String getPolygonId() { + return polygonId; + } + + public String getLinearRingId() { + return linearRingId; + } + + @Override + public String toString() { + return "HoleOutside [polygonId=" + polygonId + ", linearRingId=" + linearRingId + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new HoleOutside(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/InnerRingsNested.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/InnerRingsNested.java new file mode 100644 index 0000000000000000000000000000000000000000..dc9013ef10dc29dfe13b0247838afb8926af909b --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/InnerRingsNested.java @@ -0,0 +1,82 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class InnerRingsNested extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = 2291087505629924993L; + + private String polygonId; + private String linearRingId1; + private String linearRingId2; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setLinearRingId1(String linearRingId1) { + this.linearRingId1 = linearRingId1; + } + + public void setLinearRingId2(String linearRingId2) { + this.linearRingId2 = linearRingId2; + } + + public String getPolygonId() { + return polygonId; + } + + public String getLinearRingId1() { + return linearRingId1; + } + + public String getLinearRingId2() { + return linearRingId2; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new InnerRingsNested(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/InteriorDisconnected.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/InteriorDisconnected.java new file mode 100644 index 0000000000000000000000000000000000000000..dbaab2ec42f71ba401250b442027eba4bcc52065 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/InteriorDisconnected.java @@ -0,0 +1,69 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class InteriorDisconnected extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = 8443642232356795359L; + + private String polygonId; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public String getPolygonId() { + return polygonId; + } + + @Override + public String toString() { + return "InteriorDisconnected [polygonId=" + polygonId + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new InteriorDisconnected(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/IntersectingRings.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/IntersectingRings.java new file mode 100644 index 0000000000000000000000000000000000000000..518d65f6b211084de1ff662c33909a0336aeda7e --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/IntersectingRings.java @@ -0,0 +1,88 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class IntersectingRings extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = 7668529369582991408L; + + private String polygonId; + private String linearRingId1; + private String linearRingId2; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setLinearRingId1(String linearRingId1) { + this.linearRingId1 = linearRingId1; + } + + public void setLinearRingId2(String linearRingId2) { + this.linearRingId2 = linearRingId2; + } + + public String getPolygonId() { + return polygonId; + } + + public String getLinearRingId1() { + return linearRingId1; + } + + public String getLinearRingId2() { + return linearRingId2; + } + + @Override + public String toString() { + return "IntersectingRings [polygonId=" + polygonId + ", linearRingId1=" + linearRingId1 + ", linearRingId2=" + + linearRingId2 + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new IntersectingRings(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/MultipleConnectedComponents.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/MultipleConnectedComponents.java new file mode 100644 index 0000000000000000000000000000000000000000..087995c1b06f4cd363c968a75f44e142917518a6 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/MultipleConnectedComponents.java @@ -0,0 +1,82 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import java.util.ArrayList; +import java.util.List; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +import de.hft.stuttgart.quality.model.jaxb.Component; + +public class MultipleConnectedComponents extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -4199420154182053060L; + + private String geometryId; + + private List<Component> components; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getGeometryId() { + return geometryId; + } + + public boolean isSetComponents() { + return components != null && !components.isEmpty(); + } + + public List<Component> getComponents() { + if (components == null) { + components = new ArrayList<>(); + } + return components; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new MultipleConnectedComponents(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonManifoldEdge.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonManifoldEdge.java new file mode 100644 index 0000000000000000000000000000000000000000..39f9ade1a948f79d23c27f28fd5144d05fa4057c --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonManifoldEdge.java @@ -0,0 +1,79 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import java.util.ArrayList; +import java.util.List; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class NonManifoldEdge extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -4312748985706248178L; + + private String geometryId; + private List<Edge> edges; + + public String getGeometryId() { + return geometryId; + } + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public boolean isSetEdges() { + return edges != null && !edges.isEmpty(); + } + + public List<Edge> getEdges() { + if (edges == null) { + edges = new ArrayList<>(); + } + return edges; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new NonPlanarNormalsDeviation(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonManifoldVertex.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonManifoldVertex.java new file mode 100644 index 0000000000000000000000000000000000000000..3b646c4793ab60b7da9dbd84847bd721daae9b01 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonManifoldVertex.java @@ -0,0 +1,80 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; +import org.citygml4j.model.gml.geometry.primitives.DirectPosition; + +public class NonManifoldVertex extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -3434116956866828127L; + + private String geometryId; + private DirectPosition vertex; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public void setVertex(DirectPosition vertex) { + this.vertex = vertex; + } + + public String getGeometryId() { + return geometryId; + } + + public DirectPosition getVertex() { + return vertex; + } + + @Override + public String toString() { + return "NonManifoldVertex [geometryId=" + geometryId + ", vertex=" + vertex + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new NonManifoldVertex(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonPlanarDistancePlane.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonPlanarDistancePlane.java new file mode 100644 index 0000000000000000000000000000000000000000..6612f5e8acb24422de9ab32bdf3cfd44df39e63d --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonPlanarDistancePlane.java @@ -0,0 +1,89 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; +import org.citygml4j.model.gml.geometry.primitives.DirectPosition; +import org.citygml4j.model.gml.measures.Length; + +public class NonPlanarDistancePlane extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -3428574131554438219L; + + private String polygonId; + private DirectPosition vertex; + private Length distance; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setVertex(DirectPosition vertex) { + this.vertex = vertex; + } + + public void setDistance(Length distance) { + this.distance = distance; + } + + public String getPolygonId() { + return polygonId; + } + + public DirectPosition getVertex() { + return vertex; + } + + public Length getDistance() { + return distance; + } + + @Override + public String toString() { + return "NonPlanarDistancePlane [polygonId=" + polygonId + ", vertex=" + vertex + ", distance=" + distance + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new NonPlanarDistancePlane(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonPlanarNormalsDeviation.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonPlanarNormalsDeviation.java new file mode 100644 index 0000000000000000000000000000000000000000..4fbf8d13065e2f089a02d5e92f49f9ecb92b2a3f --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonPlanarNormalsDeviation.java @@ -0,0 +1,79 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; +import org.citygml4j.model.gml.measures.Angle; + +public class NonPlanarNormalsDeviation extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -8574024132334399550L; + + private String polygonId; + private Angle deviation; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setDeviation(Angle deviation) { + this.deviation = deviation; + } + + public String getPolygonId() { + return polygonId; + } + + public Angle getDeviation() { + return deviation; + } + + @Override + public String toString() { + return "NonPlanarNormalsDeviation [polygonId=" + polygonId + ", deviation=" + deviation + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new NonPlanarNormalsDeviation(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/OrientationRingsSame.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/OrientationRingsSame.java new file mode 100644 index 0000000000000000000000000000000000000000..653153f4dba1d0d2c7d3acefa924d65508cff082 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/OrientationRingsSame.java @@ -0,0 +1,78 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class OrientationRingsSame extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -6983324580253488854L; + + private String polygonId; + private String linearRingId; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public String getPolygonId() { + return polygonId; + } + + public String getLinearRingId() { + return linearRingId; + } + + @Override + public String toString() { + return "OrientationRingsSame [polygonId=" + polygonId + ", linearRingId=" + linearRingId + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new OrientationRingsSame(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/PolygonWrongOrientation.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/PolygonWrongOrientation.java new file mode 100644 index 0000000000000000000000000000000000000000..e5ff02048ce209ad11239b8a347a2a590614ef45 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/PolygonWrongOrientation.java @@ -0,0 +1,84 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import java.util.ArrayList; +import java.util.List; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class PolygonWrongOrientation extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = 1128689472694838648L; + + private String geometryId; + private List<Edge> edges; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getGeometryId() { + return geometryId; + } + + public boolean isSetEdges() { + return edges != null && !edges.isEmpty(); + } + + public List<Edge> getEdges() { + if (edges == null) { + edges = new ArrayList<>(); + } + return edges; + } + + @Override + public String toString() { + return "PolygonWrongOrientation [geometryId=" + geometryId + ", edges=" + edges + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new PolygonWrongOrientation(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/RingNotClosed.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/RingNotClosed.java new file mode 100644 index 0000000000000000000000000000000000000000..78603b2f9a61a8f21847e9cc83fc2c69e8e7f74c --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/RingNotClosed.java @@ -0,0 +1,71 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class RingNotClosed extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = 5502668444088395535L; + + private String linearRingId; + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public String getLinearRingId() { + return linearRingId; + } + + + @Override + public String toString() { + return "RingNotClosed [linearRingId=" + linearRingId + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new RingNotClosed(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/RingSelfIntersection.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/RingSelfIntersection.java new file mode 100644 index 0000000000000000000000000000000000000000..cbb6fcea5aacb18da94df8df0bdcd7e5d8904394 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/RingSelfIntersection.java @@ -0,0 +1,119 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; +import org.citygml4j.model.gml.geometry.primitives.DirectPosition; + +import de.hft.stuttgart.quality.model.jaxb.RingSelfIntType; + +public class RingSelfIntersection extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -4426615638983209222L; + + private String linearRingId; + private RingSelfIntType type; + private Edge edge1; + private Edge edge2; + private DirectPosition vertex1; + private DirectPosition vertex2; + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public void setType(RingSelfIntType type) { + this.type = type; + } + + public void setEdge1(Edge edge1) { + this.edge1 = edge1; + } + + public void setEdge2(Edge edge2) { + this.edge2 = edge2; + } + + public void setVertex1(DirectPosition vertex1) { + this.vertex1 = vertex1; + } + + public void setVertex2(DirectPosition vertex2) { + this.vertex2 = vertex2; + } + + public String getLinearRingId() { + return linearRingId; + } + + public RingSelfIntType getType() { + return type; + } + + public Edge getEdge1() { + return edge1; + } + + public Edge getEdge2() { + return edge2; + } + + public DirectPosition getVertex1() { + return vertex1; + } + + public DirectPosition getVertex2() { + return vertex2; + } + + @Override + public String toString() { + return "RingSelfIntersection [linearRingId=" + linearRingId + ", type=" + type + ", edge1=" + edge1 + ", edge2=" + + edge2 + ", vertex1=" + vertex1 + ", vertex2=" + vertex2 + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new RingSelfIntersection(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/SolidNotClosed.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/SolidNotClosed.java new file mode 100644 index 0000000000000000000000000000000000000000..b8e26c60e49de354b7ecab6b1189056c18e4edeb --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/SolidNotClosed.java @@ -0,0 +1,79 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import java.util.ArrayList; +import java.util.List; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class SolidNotClosed extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = 4609395125395073697L; + + private String geometryId; + private List<Edge> edges; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + public String getGeometryId() { + return geometryId; + } + + public boolean isSetEdges() { + return edges != null && !edges.isEmpty(); + } + + public List<Edge> getEdges() { + if (edges == null) { + edges = new ArrayList<>(); + } + return edges; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new SolidNotClosed(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/SolidSelfIntersection.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/SolidSelfIntersection.java new file mode 100644 index 0000000000000000000000000000000000000000..664eeadf2f45650fafc0e8700d8a829d2442fe3c --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/SolidSelfIntersection.java @@ -0,0 +1,88 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class SolidSelfIntersection extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = 4086097021438848040L; + + private String geometryId; + private String polygonId1; + private String polygonId2; + + public String getGeometryId() { + return geometryId; + } + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getPolygonId1() { + return polygonId1; + } + + public void setPolygonId1(String polygonId1) { + this.polygonId1 = polygonId1; + } + + public String getPolygonId2() { + return polygonId2; + } + + public void setPolygonId2(String polygonId2) { + this.polygonId2 = polygonId2; + } + + @Override + public String toString() { + return "SolidSelfIntersection [geometryId=" + geometryId + ", polygonId1=" + polygonId1 + ", polygonId2=" + + polygonId2 + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new SolidSelfIntersection(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/TooFewPoints.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/TooFewPoints.java new file mode 100644 index 0000000000000000000000000000000000000000..829a627d7a6188f9954d8de89eb08e30457fbf57 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/TooFewPoints.java @@ -0,0 +1,70 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class TooFewPoints extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -904319347280328865L; + + private String linearRingId; + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public String getLinearRingId() { + return linearRingId; + } + + @Override + public String toString() { + return "TooFewPoints [linearRingId=" + linearRingId + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new TooFewPoints(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/TooFewPolygons.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/TooFewPolygons.java new file mode 100644 index 0000000000000000000000000000000000000000..21fd99024d433fd8f3e71bb9c14bfe979c3df78f --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/TooFewPolygons.java @@ -0,0 +1,70 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +public class TooFewPolygons extends AbstractFeature implements ValidationError, ADEModelObject { + + private static final long serialVersionUID = -51591095439740599L; + + private String geometryId; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getGeometryId() { + return geometryId; + } + + @Override + public String toString() { + return "TooFewPolygons [geometryId=" + geometryId + "]"; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new TooFewPolygons(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/Validation.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/Validation.java new file mode 100644 index 0000000000000000000000000000000000000000..bba251e18237a0e7a9a6e7d20250e7de0cd48890 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/Validation.java @@ -0,0 +1,113 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import java.time.ZonedDateTime; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +import de.hft.stuttgart.quality.model.jaxb.Statistics; +import de.hft.stuttgart.quality.model.jaxb.ValidationPlan; + +public class Validation extends AbstractFeature implements ADEModelObject { + + private static final long serialVersionUID = 1738293574859506005L; + + private ZonedDateTime validationDate; + private String validationSoftware; + private ValidationPlan validationPlan; + private Statistics statistics; + + @Override + public Object copy(CopyBuilder copyBuilder) { + return this; + } + + public boolean isSetStatistics() { + return statistics != null; + } + + public void setStatistics(Statistics statistics) { + this.statistics = statistics; + } + + public Statistics getStatistics() { + return statistics; + } + + public boolean isSetValidationPlan() { + return validationPlan != null; + } + + public void setValidationPlan(ValidationPlan validationPlan) { + this.validationPlan = validationPlan; + } + + public ValidationPlan getValidationPlan() { + return validationPlan; + } + + public boolean isSetDateTime() { + return validationDate != null; + } + + public boolean isSetValidationSoftware() { + return validationSoftware != null; + } + + public void setValidationDate(ZonedDateTime validationDate) { + this.validationDate = validationDate; + } + + public ZonedDateTime getValidationDate() { + return validationDate; + } + + + public void setValidationSoftware(String validationSoftware) { + this.validationSoftware = validationSoftware; + } + + public String getValidationSoftware() { + return validationSoftware; + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ValidationError.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ValidationError.java new file mode 100644 index 0000000000000000000000000000000000000000..8be6f353bdb453d40ad39c5495c0666756030222 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ValidationError.java @@ -0,0 +1,22 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; + +public interface ValidationError extends ADEModelObject { + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ValidationResult.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ValidationResult.java new file mode 100644 index 0000000000000000000000000000000000000000..f9c6780b9de9a28bc43c980f59de2a48bf2a11a3 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ValidationResult.java @@ -0,0 +1,84 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model; + +import java.util.ArrayList; +import java.util.List; + +import org.citygml4j.builder.copy.CopyBuilder; +import org.citygml4j.model.citygml.ade.binding.ADEModelObject; +import org.citygml4j.model.common.visitor.FeatureFunctor; +import org.citygml4j.model.common.visitor.FeatureVisitor; +import org.citygml4j.model.common.visitor.GMLFunctor; +import org.citygml4j.model.common.visitor.GMLVisitor; +import org.citygml4j.model.gml.feature.AbstractFeature; + +import de.hft.stuttgart.quality.model.jaxb.ResultType; + +public class ValidationResult extends AbstractFeature implements ADEModelObject { + + private static final long serialVersionUID = 1180762313908627342L; + + private ResultType result; + + private List<ValidationError> errors; + + public boolean hasErrors() { + return errors != null && !errors.isEmpty(); + } + + public List<ValidationError> getErrors() { + if (errors == null) { + errors = new ArrayList<>(2); + } + return errors; + } + + public void setResult(ResultType result) { + this.result = result; + } + + public ResultType getResult() { + return result; + } + + @Override + public Object copy(CopyBuilder copyBuilder) { + return copyTo(new ValidationResult(), copyBuilder); + } + + @Override + public void accept(FeatureVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(FeatureFunctor<T> visitor) { + return visitor.apply(this); + } + + @Override + public void accept(GMLVisitor visitor) { + visitor.visit(this); + } + + @Override + public <T> T accept(GMLFunctor<T> visitor) { + return visitor.apply(this); + } + + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/AllPolygonsWrongOrientationType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/AllPolygonsWrongOrientationType.java new file mode 100644 index 0000000000000000000000000000000000000000..afbdb5750babfeb467f6026e004f2eae0696474f --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/AllPolygonsWrongOrientationType.java @@ -0,0 +1,33 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_S_ALL_POLYGONS_WRONG_ORIENTATION") +public class AllPolygonsWrongOrientationType extends ValidationErrorType { + + private String geometryId; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getGeometryId() { + return geometryId; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/AttributeMissingType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/AttributeMissingType.java new file mode 100644 index 0000000000000000000000000000000000000000..65a515ad38316e5232d0bc1408d1b805feda26f5 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/AttributeMissingType.java @@ -0,0 +1,51 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "SEM_ATTRIBUTE_MISSING") +public class AttributeMissingType extends ValidationErrorType { + + private String childId; + private String attributeName; + private boolean generic; + + public String getChildId() { + return childId; + } + + public void setChildId(String childId) { + this.childId = childId; + } + + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + public boolean isGeneric() { + return generic; + } + + public void setGeneric(boolean generic) { + this.generic = generic; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/AttributeWrongValueType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/AttributeWrongValueType.java new file mode 100644 index 0000000000000000000000000000000000000000..ca4b04585be3d8d8fa8f51743bfbbc3330d1a7d4 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/AttributeWrongValueType.java @@ -0,0 +1,51 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "SEM_ATTRIBUTE_WRONG_VALUE") +public class AttributeWrongValueType extends ValidationErrorType { + + private String childId; + private String attributeName; + private boolean generic; + + public String getChildId() { + return childId; + } + + public void setChildId(String childId) { + this.childId = childId; + } + + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + public boolean isGeneric() { + return generic; + } + + public void setGeneric(boolean generic) { + this.generic = generic; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Checking.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Checking.java new file mode 100644 index 0000000000000000000000000000000000000000..75a9e077864f50da6cb400a57fabe7e8f421136a --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Checking.java @@ -0,0 +1,52 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlValue; + +@XmlAccessorType(XmlAccessType.FIELD) +public class Checking implements Serializable { + + private static final long serialVersionUID = 8429726429709450505L; + + @XmlValue + private TopLevelFeatureType value; + + public Checking() { + } + + public Checking(TopLevelFeatureType value) { + this.value = value; + } + + public void setValue(TopLevelFeatureType value) { + this.value = value; + } + + public TopLevelFeatureType getValue() { + return value; + } + + @Override + public String toString() { + return "Checking [value=" + value + "]"; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Component.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Component.java new file mode 100644 index 0000000000000000000000000000000000000000..f1b220902dc02af373078c9158823815288077e8 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Component.java @@ -0,0 +1,37 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; + +public class Component implements Serializable { + + private static final long serialVersionUID = 75005650370135888L; + + @XmlElement(name = "polygonId") + private List<String> polygonIds; + + public List<String> getPolygonIds() { + if (polygonIds == null) { + polygonIds = new ArrayList<>(); + } + return polygonIds; + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ConsecutivePointsSameType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ConsecutivePointsSameType.java new file mode 100644 index 0000000000000000000000000000000000000000..1de6be6b955b4c530a93c5ecf485d8af579d60b6 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ConsecutivePointsSameType.java @@ -0,0 +1,59 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +import net.opengis.gml.DirectPositionType; + +@XmlRootElement(name = "GE_R_CONSECUTIVE_POINTS_SAME") +public class ConsecutivePointsSameType extends ValidationErrorType { + + private String linearRingId; + private DirectPositionType vertex1; + private DirectPositionType vertex2; + + public String getLinearRingId() { + return linearRingId; + } + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public void setVertex1(DirectPositionType vertex1) { + this.vertex1 = vertex1; + } + + public void setVertex2(DirectPositionType vertex2) { + this.vertex2 = vertex2; + } + + public DirectPositionType getVertex1() { + return vertex1; + } + + public DirectPositionType getVertex2() { + return vertex2; + } + + @Override + public String toString() { + return "ConsecutivePointsSameType [linearRingId=" + linearRingId + ", vertex1=" + vertex1 + ", vertex2=" + vertex2 + + "]"; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/EdgeType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/EdgeType.java new file mode 100644 index 0000000000000000000000000000000000000000..62af6aa37b1710be6d038cbf89e1c02a06f83b03 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/EdgeType.java @@ -0,0 +1,44 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; + +import net.opengis.gml.DirectPositionType; + +@XmlAccessorType(XmlAccessType.FIELD) +public class EdgeType { + + private DirectPositionType from; + private DirectPositionType to; + + public void setFrom(DirectPositionType from) { + this.from = from; + } + + public void setTo(DirectPositionType to) { + this.to = to; + } + + public DirectPositionType getFrom() { + return from; + } + + public DirectPositionType getTo() { + return to; + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ErrorId.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ErrorId.java new file mode 100644 index 0000000000000000000000000000000000000000..98da8d110c56f677d62e44c10548716eaf918691 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ErrorId.java @@ -0,0 +1,30 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlEnum; + +@XmlEnum +public enum ErrorId { + + GE_R_TOO_FEW_POINTS, GE_R_NOT_CLOSED, GE_R_CONSECUTIVE_POINTS_SAME, GE_R_SELF_INTERSECTION, + GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION, GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE, GE_P_INTERIOR_DISCONNECTED, + GE_P_INTERSECTING_RINGS, GE_P_HOLE_OUTSIDE, GE_P_ORIENTATION_RINGS_SAME, GE_P_INNER_RINGS_NESTED, + GE_S_TOO_FEW_POLYGONS, GE_S_NOT_CLOSED, GE_S_NON_MANIFOLD_EDGE, GE_S_POLYGON_WRONG_ORIENTATION, + GE_S_ALL_POLYGONS_WRONG_ORIENTATION, GE_S_NON_MANIFOLD_VERTEX, GE_S_SELF_INTERSECTION, + GE_S_MULTIPLE_CONNECTED_COMPONENTS, SEM_ATTRIBUTE_WRONG_VALUE, SEM_ATTRIBUTE_MISSING + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ErrorStatistics.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ErrorStatistics.java new file mode 100644 index 0000000000000000000000000000000000000000..8b00693904fa0eaa97c7dbf0188770c0edf921d2 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ErrorStatistics.java @@ -0,0 +1,57 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlValue; + +@XmlAccessorType(XmlAccessType.FIELD) +public class ErrorStatistics implements Serializable { + + private static final long serialVersionUID = -1007447539987946146L; + + @XmlAttribute + private ErrorId name; + + @XmlValue + private int amount; + + public void setName(ErrorId name) { + this.name = name; + } + + public ErrorId getName() { + return name; + } + + public void setAmount(int amount) { + this.amount = amount; + } + + public int getAmount() { + return amount; + } + + @Override + public String toString() { + return "ErrorStatistics [name=" + name + ", amount=" + amount + "]"; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/FeatureStatistics.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/FeatureStatistics.java new file mode 100644 index 0000000000000000000000000000000000000000..3cc3227a54aceae42e7c133b3d1c2f6770705433 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/FeatureStatistics.java @@ -0,0 +1,64 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlValue; + +@XmlAccessorType(XmlAccessType.FIELD) +public class FeatureStatistics implements Serializable { + + private static final long serialVersionUID = 5794335930507488398L; + + @XmlAttribute + private int numChecked; + + @XmlValue + private int numErrors; + + public FeatureStatistics() { + } + + public FeatureStatistics(int numChecked, int numErrors) { + this.numChecked = numChecked; + this.numErrors = numErrors; + } + + public void setNumChecked(int numChecked) { + this.numChecked = numChecked; + } + + public void setNumErrors(int numErrors) { + this.numErrors = numErrors; + } + + public int getNumChecked() { + return numChecked; + } + + public int getNumErrors() { + return numErrors; + } + + @Override + public String toString() { + return "FeatureStatistics [numChecked=" + numChecked + ", numErrors=" + numErrors + "]"; + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/HoleOutsideType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/HoleOutsideType.java new file mode 100644 index 0000000000000000000000000000000000000000..ae7f8b4ed371224d0b0bf3b151e0baddc72515e7 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/HoleOutsideType.java @@ -0,0 +1,42 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_P_HOLE_OUTSIDE") +public class HoleOutsideType extends ValidationErrorType { + + private String polygonId; + private String linearRingId; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public String getPolygonId() { + return polygonId; + } + + public String getLinearRingId() { + return linearRingId; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/InnerRingsNestedType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/InnerRingsNestedType.java new file mode 100644 index 0000000000000000000000000000000000000000..0c2438a464e994c215d98abdc463250e22ec7cc3 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/InnerRingsNestedType.java @@ -0,0 +1,51 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_P_INNER_RINGS_NESTED") +public class InnerRingsNestedType extends ValidationErrorType { + + private String polygonId; + private String linearRingId1; + private String linearRingId2; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setLinearRingId1(String linearRingId1) { + this.linearRingId1 = linearRingId1; + } + + public void setLinearRingId2(String linearRingId2) { + this.linearRingId2 = linearRingId2; + } + + public String getPolygonId() { + return polygonId; + } + + public String getLinearRingId1() { + return linearRingId1; + } + + public String getLinearRingId2() { + return linearRingId2; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/InteriorDisconnectedType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/InteriorDisconnectedType.java new file mode 100644 index 0000000000000000000000000000000000000000..45642ab45fec5757049e5c20325f1515bdd1021e --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/InteriorDisconnectedType.java @@ -0,0 +1,33 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_P_INTERIOR_DISCONNECTED") +public class InteriorDisconnectedType extends ValidationErrorType { + + private String polygonId; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public String getPolygonId() { + return polygonId; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/IntersectingRingsType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/IntersectingRingsType.java new file mode 100644 index 0000000000000000000000000000000000000000..8f547dfb5d393c44a52d71867bdceac05ef951ac --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/IntersectingRingsType.java @@ -0,0 +1,51 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_P_INTERSECTING_RINGS") +public class IntersectingRingsType extends ValidationErrorType { + + private String polygonId; + private String linearRingId1; + private String linearRingId2; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public String getPolygonId() { + return polygonId; + } + + public void setLinearRingId1(String linearRingId1) { + this.linearRingId1 = linearRingId1; + } + + public String getLinearRingId1() { + return linearRingId1; + } + + public void setLinearRingId2(String linearRingId2) { + this.linearRingId2 = linearRingId2; + } + + public String getLinearRingId2() { + return linearRingId2; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/MultipleConnectedComponentsType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/MultipleConnectedComponentsType.java new file mode 100644 index 0000000000000000000000000000000000000000..6d2e396a08d9ce6ac1334b7b2e5002a20f15acbe --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/MultipleConnectedComponentsType.java @@ -0,0 +1,53 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_S_MULTIPLE_CONNECTED_COMPONENTS") +public class MultipleConnectedComponentsType extends ValidationErrorType { + + private String geometryId; + + @XmlElementWrapper + @XmlElement(name = "component") + private List<Component> components; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getGeometryId() { + return geometryId; + } + + public boolean isSetComponents() { + return components != null && !components.isEmpty(); + } + + public List<Component> getComponents() { + if (components == null) { + components = new ArrayList<>(); + } + return components; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonManifoldEdgeType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonManifoldEdgeType.java new file mode 100644 index 0000000000000000000000000000000000000000..cadaeff15b3362c5e1355ec86bacff4e3b2013bb --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonManifoldEdgeType.java @@ -0,0 +1,53 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_S_NON_MANIFOLD_EDGE") +public class NonManifoldEdgeType extends ValidationErrorType { + + private String geometryId; + + @XmlElementWrapper + @XmlElement(name = "edge") + private List<EdgeType> edges; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getGeometryId() { + return geometryId; + } + + public boolean isSetEdges() { + return edges != null && !edges.isEmpty(); + } + + public List<EdgeType> getEdges() { + if (edges == null) { + edges = new ArrayList<>(); + } + return edges; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonManifoldVertexType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonManifoldVertexType.java new file mode 100644 index 0000000000000000000000000000000000000000..f286ed3d46292bac2c2020d5ad53d35473d3b6ce --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonManifoldVertexType.java @@ -0,0 +1,44 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +import net.opengis.gml.DirectPositionType; + +@XmlRootElement(name = "GE_S_NON_MANIFOLD_VERTEX") +public class NonManifoldVertexType extends ValidationErrorType { + + private String geometryId; + private DirectPositionType vertex; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public void setVertex(DirectPositionType vertex) { + this.vertex = vertex; + } + + public String getGeometryId() { + return geometryId; + } + + public DirectPositionType getVertex() { + return vertex; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonPlanarDistancePlaneType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonPlanarDistancePlaneType.java new file mode 100644 index 0000000000000000000000000000000000000000..b7d17e7d0154bada4a5a214b02a501bdc6aa7ca5 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonPlanarDistancePlaneType.java @@ -0,0 +1,54 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +import net.opengis.gml.DirectPositionType; +import net.opengis.gml.LengthType; + +@XmlRootElement(name = "GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE") +public class NonPlanarDistancePlaneType extends ValidationErrorType { + + private String polygonId; + private DirectPositionType vertex; + private LengthType distance; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setVertex(DirectPositionType vertex) { + this.vertex = vertex; + } + + public void setDistance(LengthType distance) { + this.distance = distance; + } + + public String getPolygonId() { + return polygonId; + } + + public DirectPositionType getVertex() { + return vertex; + } + + public LengthType getDistance() { + return distance; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonPlanarNormalsDeviationType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonPlanarNormalsDeviationType.java new file mode 100644 index 0000000000000000000000000000000000000000..4dceda93c9b5a2aae20c6d88ddaa05c8e98ea70f --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/NonPlanarNormalsDeviationType.java @@ -0,0 +1,44 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +import net.opengis.gml.AngleType; + +@XmlRootElement(name = "GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION") +public class NonPlanarNormalsDeviationType extends ValidationErrorType { + + private String polygonId; + private AngleType deviation; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setDeviation(AngleType deviation) { + this.deviation = deviation; + } + + public String getPolygonId() { + return polygonId; + } + + public AngleType getDeviation() { + return deviation; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ObjectFactory.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ObjectFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..987b4e48fa5d6226e191ffb8db02fc1765847796 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ObjectFactory.java @@ -0,0 +1,61 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + +import de.hft.stuttgart.quality.QualityADEModule; + +@XmlRegistry +public class ObjectFactory { + + private static final QName VALIDATION_QNAME = new QName(QualityADEModule.NAMESPACE_URI, "validation"); + private static final QName VALIDATION_RESULT_QNAME = new QName(QualityADEModule.NAMESPACE_URI, "validationResult"); + + public ValidationType createValidationType() { + return new ValidationType(); + } + + public ValidationResultType createValidationResultType() { + return new ValidationResultType(); + } + + public ConsecutivePointsSameType createConsecutivePointsSameType() { + return new ConsecutivePointsSameType(); + } + + public TooFewPointsType createTooFewPointsType() { + return new TooFewPointsType(); + } + + @XmlElementDecl(namespace = QualityADEModule.NAMESPACE_URI, name = "validation", substitutionHeadNamespace = "http://www.opengis.net/citygml/2.0", substitutionHeadName = "_GenericApplicationPropertyOfCityModel") + public JAXBElement<ValidationType> createValidationType(ValidationType type) { + return new JAXBElement<>(VALIDATION_QNAME, ValidationType.class, type); + } + + @XmlElementDecl(namespace = QualityADEModule.NAMESPACE_URI, name = "validationResult", substitutionHeadNamespace = "http://www.opengis.net/citygml/2.0", substitutionHeadName = "_GenericApplicationPropertyOfCityObject") + public JAXBElement<ValidationResultType> createValidationResultType(ValidationResultType type) { + return new JAXBElement<>(VALIDATION_RESULT_QNAME, ValidationResultType.class, type); + } + + public RingSelfIntersectionType createRingSelfIntersectionType() { + return new RingSelfIntersectionType(); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/OrientationRingsSameType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/OrientationRingsSameType.java new file mode 100644 index 0000000000000000000000000000000000000000..6ac0a5844a68cdde8806c4ab07bedcacce8a478c --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/OrientationRingsSameType.java @@ -0,0 +1,42 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_P_ORIENTATION_RINGS_SAME") +public class OrientationRingsSameType extends ValidationErrorType { + + private String polygonId; + private String linearRingId; + + public void setPolygonId(String polygonId) { + this.polygonId = polygonId; + } + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public String getPolygonId() { + return polygonId; + } + + public String getLinearRingId() { + return linearRingId; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Parameter.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Parameter.java new file mode 100644 index 0000000000000000000000000000000000000000..cb12193ec05223f6d248a2f085abde27d6a3c57e --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Parameter.java @@ -0,0 +1,70 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + +@XmlType(name = "parameter") +@XmlAccessorType(XmlAccessType.FIELD) +public class Parameter implements Serializable { + + private static final long serialVersionUID = 3704749975901280058L; + + @XmlAttribute(name = "name") + private String name; + + @XmlAttribute(required = false) + private String uom; + + @XmlValue + private String value; + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setUom(String uom) { + this.uom = uom; + } + + public void setValue(String value) { + this.value = value; + } + + public String getUom() { + return uom; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return "ParameterType [name=" + name + ", uom=" + uom + ", value=" + value + "]"; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/PolygonWrongOrientationType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/PolygonWrongOrientationType.java new file mode 100644 index 0000000000000000000000000000000000000000..d045ef21f608b9a666c4b1126b18cf756fb40d18 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/PolygonWrongOrientationType.java @@ -0,0 +1,53 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_S_POLYGON_WRONG_ORIENTATION") +public class PolygonWrongOrientationType extends ValidationErrorType { + + private String geometryId; + + @XmlElementWrapper + @XmlElement(name = "edge") + private List<EdgeType> edges; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getGeometryId() { + return geometryId; + } + + public boolean isSetEdges() { + return edges != null && !edges.isEmpty(); + } + + public List<EdgeType> getEdges() { + if (edges == null) { + edges = new ArrayList<>(); + } + return edges; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Requirement.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Requirement.java new file mode 100644 index 0000000000000000000000000000000000000000..c3a2146e6526fb046896b866de3f1c161468cd89 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Requirement.java @@ -0,0 +1,71 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +@XmlType(name = "requirement") +@XmlAccessorType(XmlAccessType.FIELD) +public class Requirement implements Serializable { + + private static final long serialVersionUID = 8493047783215253763L; + + @XmlAttribute + private RequirementId name; + + @XmlAttribute + private boolean enabled; + + @XmlElement(name = "parameter") + private List<Parameter> parameters; + + public RequirementId getName() { + return name; + } + + public List<Parameter> getParameters() { + if (parameters == null) { + parameters = new ArrayList<>(2); + } + return parameters; + } + + public boolean isEnabled() { + return enabled; + } + + public void setName(RequirementId name) { + this.name = name; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + @Override + public String toString() { + return "Requirement [name=" + name + ", enabled=" + enabled + ", parameters=" + parameters + "]"; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RequirementId.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RequirementId.java new file mode 100644 index 0000000000000000000000000000000000000000..7d74ff185df6ac4cfa5c0f1573b01196e9f76005 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RequirementId.java @@ -0,0 +1,30 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlEnum; + +@XmlEnum +public enum RequirementId { + + R_GE_R_TOO_FEW_POINTS, R_GE_R_NOT_CLOSED, R_GE_R_CONSECUTIVE_POINTS_SAME, R_GE_R_SELF_INTERSECTION, + R_GE_P_NON_PLANAR, R_GE_P_INTERIOR_DISCONNECTED, R_GE_P_INTERSECTING_RINGS, R_GE_P_HOLE_OUTSIDE, + R_GE_P_ORIENTATION_RINGS_SAME, R_GE_P_INNER_RINGS_NESTED, R_GE_S_TOO_FEW_POLYGONS, R_GE_S_NOT_CLOSED, + R_GE_S_NON_MANIFOLD_EDGE, R_GE_S_POLYGON_WRONG_ORIENTATION, R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION, + R_GE_S_NON_MANIFOLD_VERTEX, R_GE_S_SELF_INTERSECTION, R_GE_S_MULTIPLE_CONNECTED_COMPONENTS, + R_SEM_ATTRIBUTES_EXISTING, R_SEM_ATTRIBUTES_CORRECT + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ResultType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ResultType.java new file mode 100644 index 0000000000000000000000000000000000000000..70db92cc86dbf718883e15b2158e42cf63562a7c --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ResultType.java @@ -0,0 +1,25 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlEnum; + +@XmlEnum +public enum ResultType { + + OK, ERROR, NOT_CHECKED + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RingNotClosedType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RingNotClosedType.java new file mode 100644 index 0000000000000000000000000000000000000000..5194a40c9c4b3c573e4e1ee6abf2c7747d6c1010 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RingNotClosedType.java @@ -0,0 +1,33 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_R_NOT_CLOSED") +public class RingNotClosedType extends ValidationErrorType { + + private String linearRingId; + + public void setLinearRingId(String linarRingId) { + this.linearRingId = linarRingId; + } + + public String getLinearRingId() { + return linearRingId; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RingSelfIntType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RingSelfIntType.java new file mode 100644 index 0000000000000000000000000000000000000000..582bcc0c067e7d96bd235e4b8958a5ee930ca0bb --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RingSelfIntType.java @@ -0,0 +1,23 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlEnum; + +@XmlEnum +public enum RingSelfIntType { + DUPLICATE_POINT, POINT_TOUCHES_EDGE, EDGE_INTERSECTS_EDGE +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RingSelfIntersectionType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RingSelfIntersectionType.java new file mode 100644 index 0000000000000000000000000000000000000000..2c6d8bf08cd97fcd7762eed4446559d3181bb271 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/RingSelfIntersectionType.java @@ -0,0 +1,80 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +import net.opengis.gml.DirectPositionType; + +@XmlRootElement(name = "GE_R_SELF_INTERSECTION") +public class RingSelfIntersectionType extends ValidationErrorType { + + private String linearRingId; + private RingSelfIntType type; + private EdgeType edge1; + private EdgeType edge2; + private DirectPositionType vertex1; + private DirectPositionType vertex2; + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public void setType(RingSelfIntType type) { + this.type = type; + } + + public void setEdge1(EdgeType edge1) { + this.edge1 = edge1; + } + + public void setEdge2(EdgeType edge2) { + this.edge2 = edge2; + } + + public void setVertex1(DirectPositionType vertex1) { + this.vertex1 = vertex1; + } + + public void setVertex2(DirectPositionType vertex2) { + this.vertex2 = vertex2; + } + + public String getLinearRingId() { + return linearRingId; + } + + public RingSelfIntType getType() { + return type; + } + + public EdgeType getEdge1() { + return edge1; + } + + public EdgeType getEdge2() { + return edge2; + } + + public DirectPositionType getVertex1() { + return vertex1; + } + + public DirectPositionType getVertex2() { + return vertex2; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/SolidNotClosedType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/SolidNotClosedType.java new file mode 100644 index 0000000000000000000000000000000000000000..06f676e7ca32880057539354627858d18a173c95 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/SolidNotClosedType.java @@ -0,0 +1,53 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_S_NOT_CLOSED") +public class SolidNotClosedType extends ValidationErrorType { + + private String geometryId; + + @XmlElementWrapper + @XmlElement(name = "edge") + private List<EdgeType> edges; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getGeometryId() { + return geometryId; + } + + public boolean isSetEdges() { + return edges != null && !edges.isEmpty(); + } + + public List<EdgeType> getEdges() { + if (edges == null) { + edges = new ArrayList<>(); + } + return edges; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/SolidSelfIntersectionType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/SolidSelfIntersectionType.java new file mode 100644 index 0000000000000000000000000000000000000000..de734a2e9749eade80a3839c13fa2d11855fda83 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/SolidSelfIntersectionType.java @@ -0,0 +1,51 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_S_SELF_INTERSECTION") +public class SolidSelfIntersectionType extends ValidationErrorType { + + private String geometryId; + private String polygonId1; + private String polygonId2; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public void setPolygonId1(String polygonId1) { + this.polygonId1 = polygonId1; + } + + public void setPolygonId2(String polygonId2) { + this.polygonId2 = polygonId2; + } + + public String getGeometryId() { + return geometryId; + } + + public String getPolygonId1() { + return polygonId1; + } + + public String getPolygonId2() { + return polygonId2; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Statistics.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Statistics.java new file mode 100644 index 0000000000000000000000000000000000000000..a141b601c9a95c56c117d33afa21977d9ca0a793 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/Statistics.java @@ -0,0 +1,98 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; + +@XmlAccessorType(XmlAccessType.FIELD) +public class Statistics implements Serializable { + + private static final long serialVersionUID = 2250094686994310986L; + + private FeatureStatistics numErrorBuildings; + private FeatureStatistics numErrorVegetation; + private FeatureStatistics numErrorLandObjects; + private FeatureStatistics numErrorBridgeObjects; + private FeatureStatistics numErrorWaterObjects; + private FeatureStatistics numErrorTransportation; + + @XmlElementWrapper(name = "errorStatistics") + @XmlElement(name = "error") + private List<ErrorStatistics> errorStatistics; + + public List<ErrorStatistics> getErrorStatistics() { + if (errorStatistics == null) { + errorStatistics = new ArrayList<>(); + } + return errorStatistics; + } + + public FeatureStatistics getNumErrorBridgeObjects() { + return numErrorBridgeObjects; + } + + public FeatureStatistics getNumErrorBuildings() { + return numErrorBuildings; + } + + public FeatureStatistics getNumErrorLandObjects() { + return numErrorLandObjects; + } + + public FeatureStatistics getNumErrorTransportation() { + return numErrorTransportation; + } + + public FeatureStatistics getNumErrorVegetation() { + return numErrorVegetation; + } + + public FeatureStatistics getNumErrorWaterObjects() { + return numErrorWaterObjects; + } + + public void setNumErrorBridgeObjects(FeatureStatistics numErrorBridgeObjects) { + this.numErrorBridgeObjects = numErrorBridgeObjects; + } + + public void setNumErrorBuildings(FeatureStatistics numErrorBuildings) { + this.numErrorBuildings = numErrorBuildings; + } + + public void setNumErrorLandObjects(FeatureStatistics numErrorLandObjects) { + this.numErrorLandObjects = numErrorLandObjects; + } + + public void setNumErrorTransportation(FeatureStatistics numErrorTransportation) { + this.numErrorTransportation = numErrorTransportation; + } + + public void setNumErrorVegetation(FeatureStatistics numErrorVegetation) { + this.numErrorVegetation = numErrorVegetation; + } + + public void setNumErrorWaterObjects(FeatureStatistics numErrorWaterObjects) { + this.numErrorWaterObjects = numErrorWaterObjects; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/TooFewPointsType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/TooFewPointsType.java new file mode 100644 index 0000000000000000000000000000000000000000..474a79e24f1e13481d387fd174c1311ed8dccec6 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/TooFewPointsType.java @@ -0,0 +1,63 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_R_TOO_FEW_POINTS") +public class TooFewPointsType extends ValidationErrorType { + + private String linearRingId; + + public void setLinearRingId(String linearRingId) { + this.linearRingId = linearRingId; + } + + public String getLinearRingId() { + return linearRingId; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((linearRingId == null) ? 0 : linearRingId.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + TooFewPointsType other = (TooFewPointsType) obj; + if (linearRingId == null) { + if (other.linearRingId != null) + return false; + } else if (!linearRingId.equals(other.linearRingId)) + return false; + return true; + } + + @Override + public String toString() { + return "TooFewPoints [linearRingId=" + linearRingId + "]"; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/TooFewPolygonsType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/TooFewPolygonsType.java new file mode 100644 index 0000000000000000000000000000000000000000..5a49a971e6581a537fcc03502bd156f6ec9f11db --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/TooFewPolygonsType.java @@ -0,0 +1,33 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "GE_S_TOO_FEW_POLYGONS") +public class TooFewPolygonsType extends ValidationErrorType { + + private String geometryId; + + public void setGeometryId(String geometryId) { + this.geometryId = geometryId; + } + + public String getGeometryId() { + return geometryId; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/TopLevelFeatureType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/TopLevelFeatureType.java new file mode 100644 index 0000000000000000000000000000000000000000..b0fa42feadfdd2ab14aae4173045474b6a63783e --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/TopLevelFeatureType.java @@ -0,0 +1,25 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlEnum; + +@XmlEnum +public enum TopLevelFeatureType { + + BUILDING, TRANSPORTATION, VEGETATION, BRIDGE, WATER, LAND + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationErrorType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationErrorType.java new file mode 100644 index 0000000000000000000000000000000000000000..e816b3a0ca586ae5c38381183f7b5f92235e6ebe --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationErrorType.java @@ -0,0 +1,34 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlSeeAlso; + +import net.opengis.gml.AbstractFeatureType; + +@XmlSeeAlso({ ConsecutivePointsSameType.class, RingSelfIntersectionType.class, TooFewPointsType.class, + RingNotClosedType.class, InteriorDisconnectedType.class, IntersectingRingsType.class, + NonPlanarDistancePlaneType.class, InnerRingsNestedType.class, HoleOutsideType.class, + NonPlanarNormalsDeviationType.class, OrientationRingsSameType.class, AllPolygonsWrongOrientationType.class, + PolygonWrongOrientationType.class, NonManifoldVertexType.class, NonManifoldEdgeType.class, + SolidNotClosedType.class, TooFewPolygonsType.class, MultipleConnectedComponentsType.class, + AttributeWrongValueType.class, AttributeMissingType.class }) +@XmlAccessorType(XmlAccessType.FIELD) +public abstract class ValidationErrorType extends AbstractFeatureType { + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationPlan.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationPlan.java new file mode 100644 index 0000000000000000000000000000000000000000..a947f14f127bcf6a1bac8b4ce231514dd0e7cb62 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationPlan.java @@ -0,0 +1,65 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlType; + +@XmlType(name = "validationPlan") +@XmlAccessorType(XmlAccessType.FIELD) +public class ValidationPlan implements Serializable { + + private static final long serialVersionUID = 199908444294536261L; + + @XmlElementWrapper(name = "globalParameters") + @XmlElement(name = "parameter") + private List<Parameter> globalParameters; + + @XmlElement(name = "requirement") + private List<Requirement> requirements; + + @XmlElementWrapper(name = "filter") + @XmlElement(name = "checking") + private List<Checking> filter; + + public List<Checking> getFilter() { + if (filter == null) { + filter = new ArrayList<>(); + } + return filter; + } + + public List<Requirement> getRequirements() { + if (requirements == null) { + requirements = new ArrayList<>(); + } + return requirements; + } + + public List<Parameter> getGlobalParameters() { + if (globalParameters == null) { + globalParameters = new ArrayList<>(); + } + return globalParameters; + } +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationResultType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationResultType.java new file mode 100644 index 0000000000000000000000000000000000000000..e1fc8aa63cb4ab7ef9b866e06594358cde133cbc --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationResultType.java @@ -0,0 +1,53 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; + +import net.opengis.gml.AbstractFeatureType; + +public class ValidationResultType extends AbstractFeatureType { + + @XmlAttribute(name = "result") + private ResultType result; + + @XmlElementRef + private List<ValidationErrorType> errors; + + public List<ValidationErrorType> getErrors() { + if (errors == null) { + errors = new ArrayList<>(2); + } + return errors; + } + + public void setResult(ResultType result) { + this.result = result; + } + + public ResultType getResult() { + return result; + } + + public boolean isSetErrors() { + return errors != null && !errors.isEmpty(); + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationType.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationType.java new file mode 100644 index 0000000000000000000000000000000000000000..8aaaf3cb266dd33aed551d342669fd024c88c433 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/ValidationType.java @@ -0,0 +1,70 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.model.jaxb; + +import java.time.ZonedDateTime; + +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + +import de.hft.stuttgart.quality.marshaller.ZonedDateTimeAdapter; +import net.opengis.gml.AbstractFeatureType; + +@XmlType(name = "validation") +public class ValidationType extends AbstractFeatureType { + + @XmlJavaTypeAdapter(ZonedDateTimeAdapter.class) + private ZonedDateTime validationDate; + + private String validationSoftware; + + private ValidationPlan validationPlan; + + private Statistics statistics; + + public void setStatistics(Statistics statistics) { + this.statistics = statistics; + } + + public Statistics getStatistics() { + return statistics; + } + + public void setValidationPlan(ValidationPlan validationPlan) { + this.validationPlan = validationPlan; + } + + public ValidationPlan getValidationPlan() { + return validationPlan; + } + + public ZonedDateTime getValidationDate() { + return validationDate; + } + + public void setValidationDate(ZonedDateTime validationDate) { + this.validationDate = validationDate; + } + + public String getValidationSoftware() { + return validationSoftware; + } + + public void setValidationSoftware(String validationSoftware) { + this.validationSoftware = validationSoftware; + } + +} diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/package-info.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..74978949cb5094f37bd2c220fc82d40a293ab3cc --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/jaxb/package-info.java @@ -0,0 +1,18 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@javax.xml.bind.annotation.XmlSchema(namespace = "https://transfer.hft-stuttgart.de/pages/qualityade/0.1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED, xmlns = { + @javax.xml.bind.annotation.XmlNs(namespaceURI = "https://transfer.hft-stuttgart.de/pages/qualityade/0.1", prefix = "qual") }) +package de.hft.stuttgart.quality.model.jaxb; diff --git a/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/util/UncheckedMissingADESchemaException.java b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/util/UncheckedMissingADESchemaException.java new file mode 100644 index 0000000000000000000000000000000000000000..f710f93e453b449ff57590cadcca0f417687ff87 --- /dev/null +++ b/citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/util/UncheckedMissingADESchemaException.java @@ -0,0 +1,36 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality.util; + +import org.citygml4j.xml.io.reader.MissingADESchemaException; + +public class UncheckedMissingADESchemaException extends RuntimeException { + + private static final long serialVersionUID = -5684499826072882203L; + + private MissingADESchemaException cause; + + public UncheckedMissingADESchemaException(MissingADESchemaException e) { + super(e); + this.cause = e; + } + + @Override + public synchronized MissingADESchemaException getCause() { + return cause; + } + +} diff --git a/citygml4j-quality-ade/src/main/resources/META-INF/services/org.citygml4j.model.citygml.ade.binding.ADEContext b/citygml4j-quality-ade/src/main/resources/META-INF/services/org.citygml4j.model.citygml.ade.binding.ADEContext new file mode 100644 index 0000000000000000000000000000000000000000..7d74a7239692a199814fe7e69dde6cd771ba8761 --- /dev/null +++ b/citygml4j-quality-ade/src/main/resources/META-INF/services/org.citygml4j.model.citygml.ade.binding.ADEContext @@ -0,0 +1 @@ +de.hft.stuttgart.quality.QualityADEContext \ No newline at end of file diff --git a/citygml4j-quality-ade/src/main/resources/qualityAde.xsd b/citygml4j-quality-ade/src/main/resources/qualityAde.xsd new file mode 100644 index 0000000000000000000000000000000000000000..77ac51313db84f6500116df971f7fa52f338609d --- /dev/null +++ b/citygml4j-quality-ade/src/main/resources/qualityAde.xsd @@ -0,0 +1,505 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<schema xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" + targetNamespace="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" + xmlns:core="http://www.opengis.net/citygml/2.0" + xmlns:bldg="http://www.opengis.net/citygml/building/2.0" + xmlns:gml="http://www.opengis.net/gml" elementFormDefault="qualified" + version="1.0"> + <import namespace="http://www.opengis.net/citygml/2.0" + schemaLocation="http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd" /> + <import namespace="http://www.opengis.net/citygml/building/2.0" + schemaLocation="http://schemas.opengis.net/citygml/building/2.0/building.xsd" /> + <import + namespace="http://www.opengis.net/citygml/appearance/2.0" + schemaLocation="http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd" /> + <import namespace="http://www.opengis.net/citygml/generics/2.0" + schemaLocation="http://schemas.opengis.net/citygml/generics/2.0/generics.xsd" /> + <import namespace="http://www.opengis.net/gml" + schemaLocation="http://schemas.opengis.net/gml/2.1.2/gml.xsd" /> + + <element name="validationResult" + type="qual:validationResultType" + substitutionGroup="core:_GenericApplicationPropertyOfCityObject" /> + + <simpleType name="result" final="restriction"> + <annotation> + <documentation>Enumeration for status of check result</documentation> + </annotation> + <restriction base="string"> + <enumeration value="ERROR"> + <annotation> + <documentation>One or more errors were found</documentation> + </annotation> + </enumeration> + <enumeration value="NOT_CHECKED"> + <annotation> + <documentation>Feature was not checked</documentation> + </annotation> + </enumeration> + <enumeration value="OK"> + <annotation> + <documentation>No errors were found</documentation> + </annotation> + </enumeration> + </restriction> + </simpleType> + + <complexType name="GE_R_CONSECUTIVE_POINTS_SAME"> + <annotation> + <documentation>Consecutive point are the same</documentation> + </annotation> + <sequence> + <element name="linearRingId" type="string" /> + <element name="vertex1" type="gml:DirectPositionType" /> + <element name="vertex2" type="gml:DirectPositionType" /> + </sequence> + </complexType> + + <complexType name="GE_R_TOO_FEW_POINTS"> + <sequence> + <element name="linearRingId" type="string" /> + </sequence> + </complexType> + + <complexType name="GE_R_SELF_INTERSECTION"> + <sequence> + <element name="linearRingId" type="string" /> + <element name="type" type="qual:ringSelfIntType" /> + <element name="edge1" type="qual:edgeType" minOccurs="0" /> + <element name="edge2" type="qual:edgeType" minOccurs="0" /> + <element name="vertex1" type="gml:DirectPositionType" + minOccurs="0" /> + <element name="vertex2" type="gml:DirectPositionType" + minOccurs="0" /> + </sequence> + </complexType> + + <simpleType name="ringSelfIntType"> + <restriction base="string"> + <enumeration value="DUPLICATE_POINT" /> + <enumeration value="POINT_TOUCHES_EDGE" /> + <enumeration value="EDGE_INTERSECTS_EDGE" /> + </restriction> + </simpleType> + + <complexType name="edgeType"> + <sequence> + <element name="from" type="gml:DirectPositionType" /> + <element name="to" type="gml:DirectPositionType" /> + </sequence> + </complexType> + + <complexType name="GE_R_NOT_CLOSED"> + <sequence> + <element name="linearRingId" type="string" /> + </sequence> + </complexType> + + <complexType name="GE_P_INTERIOR_DISCONNECTED"> + <sequence> + <element name="polygonId" type="string" /> + </sequence> + </complexType> + + <complexType name="GE_P_INTERSECTING_RINGS"> + <sequence> + <element name="polygonId" type="string" /> + <element name="linearRingId1" type="string" /> + <element name="linearRingId2" type="string" /> + </sequence> + </complexType> + + <complexType name="GE_P_INNER_RINGS_NESTED"> + <sequence> + <element name="polygonId" type="string" /> + <element name="linearRingId1" type="string" /> + <element name="linearRingId2" type="string" /> + </sequence> + </complexType> + + <complexType name="GE_P_HOLE_OUTSIDE"> + <sequence> + <element name="polygonId" type="string" /> + <element name="linearRingId" type="string" /> + </sequence> + </complexType> + + <complexType + name="GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION"> + <sequence> + <element name="polygonId" type="string" /> + <element name="deviation" type="gml:AngleType"></element> + </sequence> + </complexType> + + <complexType name="GE_P_ORIENTATION_RINGS_SAME"> + <sequence> + <element name="polygonId" type="string" /> + <element name="linearRingId" type="string" /> + </sequence> + </complexType> + + <complexType name="GE_S_ALL_POLYGONS_WRONG_ORIENTATION"> + <sequence> + <element name="geometryId" type="string" /> + </sequence> + </complexType> + + <complexType name="GE_S_POLYGON_WRONG_ORIENTATION"> + <sequence> + <element name="geometryId" type="string" /> + <element name="edges" type="qual:EdgeList" /> + </sequence> + </complexType> + + <complexType name="EdgeList"> + <sequence> + <element name="edge" type="qual:edgeType" + maxOccurs="unbounded" /> + </sequence> + </complexType> + + <complexType name="GE_S_SELF_INTERSECTION"> + <sequence> + <element name="geometryId" type="string" /> + <element name="polygonId1" type="string" /> + <element name="polygonId2" type="string" /> + </sequence> + </complexType> + + <complexType name="GE_S_NON_MANIFOLD_VERTEX"> + <sequence> + <element name="geometryId" type="string" /> + <element name="vertex" type="gml:DirectPositionType" /> + </sequence> + </complexType> + + <complexType name="GE_S_NON_MANIFOLD_EDGE"> + <sequence> + <element name="geometryId" type="string" /> + <element name="edges" type="qual:EdgeList" /> + </sequence> + </complexType> + + <complexType name="GE_S_NOT_CLOSED"> + <sequence> + <element name="geometryId" type="string" /> + <element name="edges" type="qual:EdgeList" /> + </sequence> + </complexType> + + <complexType name="GE_S_TOO_FEW_POLYGONS"> + <sequence> + <element name="geometryId" type="string" /> + </sequence> + </complexType> + + <complexType name="GE_S_MULTIPLE_CONNECTED_COMPONENTS"> + <sequence> + <element name="geometryId" type="string" /> + <element name="components" type="qual:ComponentList" /> + </sequence> + </complexType> + + <complexType name="ComponentList"> + <sequence> + <element name="component" type="qual:componentType" + maxOccurs="unbounded" /> + </sequence> + </complexType> + + <complexType name="componentType"> + <sequence> + <element name="polygonId" type="string" maxOccurs="unbounded" /> + </sequence> + </complexType> + + <complexType name="GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE"> + <annotation> + <documentation>A planarity error with a point too far from the + regression plane + </documentation> + </annotation> + <sequence> + <element name="polygonId" type="string" /> + <element name="vertex" type="gml:DirectPositionType" /> + <element name="distance" type="gml:LengthType" /> + </sequence> + </complexType> + + <complexType name="SEM_ATTRIBUTE_WRONG_VALUE"> + <sequence> + <element name="childId" type="string" minOccurs="0"/> + <element name="attributeName" type="string" /> + <element name="generic" type="boolean" /> + </sequence> + </complexType> + + <complexType name="SEM_ATTRIBUTE_MISSING"> + <sequence> + <element name="childId" type="string" minOccurs="0" /> + <element name="attributeName" type="string" /> + <element name="generic" type="boolean" /> + </sequence> + </complexType> + + <complexType name="validationResultType"> + <annotation> + <documentation>Data structure containing validation results for + features + </documentation> + </annotation> + <sequence> + <element name="GE_R_TOO_FEW_POINTS" + type="qual:GE_R_TOO_FEW_POINTS" minOccurs="0" maxOccurs="unbounded" /> + <element name="GE_R_SELF_INTERSECTION" + type="qual:GE_R_SELF_INTERSECTION" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_R_NOT_CLOSED" type="qual:GE_R_NOT_CLOSED" + minOccurs="0" maxOccurs="unbounded" /> + <element name="GE_R_CONSECUTIVE_POINTS_SAME" + type="qual:GE_R_CONSECUTIVE_POINTS_SAME" minOccurs="0" + maxOccurs="unbounded" /> + + <element name="GE_P_INTERIOR_DISCONNECTED" + type="qual:GE_P_INTERIOR_DISCONNECTED" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_P_INTERSECTING_RINGS" + type="qual:GE_P_INTERSECTING_RINGS" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE" + type="qual:GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_P_INNER_RINGS_NESTED" + type="qual:GE_P_INNER_RINGS_NESTED" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_P_HOLE_OUTSIDE" + type="qual:GE_P_HOLE_OUTSIDE" minOccurs="0" maxOccurs="unbounded" /> + <element name="GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION" + type="qual:GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_P_ORIENTATION_RINGS_SAME" + type="qual:GE_P_ORIENTATION_RINGS_SAME" minOccurs="0" + maxOccurs="unbounded" /> + + <element name="GE_S_ALL_POLYGONS_WRONG_ORIENTATION" + type="qual:GE_S_ALL_POLYGONS_WRONG_ORIENTATION" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_S_POLYGON_WRONG_ORIENTATION" + type="qual:GE_S_POLYGON_WRONG_ORIENTATION" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_S_SELF_INTERSECTION" + type="qual:GE_S_SELF_INTERSECTION" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_S_NON_MANIFOLD_VERTEX" + type="qual:GE_S_NON_MANIFOLD_VERTEX" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_S_NON_MANIFOLD_EDGE" + type="qual:GE_S_NON_MANIFOLD_EDGE" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_S_NOT_CLOSED" type="qual:GE_S_NOT_CLOSED" + minOccurs="0" maxOccurs="unbounded" /> + <element name="GE_S_TOO_FEW_POLYGONS" + type="qual:GE_S_TOO_FEW_POLYGONS" minOccurs="0" + maxOccurs="unbounded" /> + <element name="GE_S_MULTIPLE_CONNECTED_COMPONENTS" + type="qual:GE_S_MULTIPLE_CONNECTED_COMPONENTS" minOccurs="0" + maxOccurs="unbounded" /> + + <element name="SEM_ATTRIBUTE_WRONG_VALUE" + type="qual:SEM_ATTRIBUTE_WRONG_VALUE" minOccurs="0" + maxOccurs="unbounded" /> + <element name="SEM_ATTRIBUTE_MISSING" + type="qual:SEM_ATTRIBUTE_MISSING" minOccurs="0" + maxOccurs="unbounded" /> + </sequence> + <attribute name="result" type="qual:result" /> + </complexType> + + <simpleType name="requirementID" final="restriction"> + <annotation> + <documentation>Enumeration for available requirements</documentation> + </annotation> + <restriction base="string"> + <enumeration value="R_GE_R_TOO_FEW_POINTS" /> + <enumeration value="R_GE_R_NOT_CLOSED" /> + <enumeration value="R_GE_R_CONSECUTIVE_POINTS_SAME" /> + <enumeration value="R_GE_R_SELF_INTERSECTION" /> + <enumeration value="R_GE_P_NON_PLANAR" /> + <enumeration value="R_GE_P_INTERIOR_DISCONNECTED" /> + <enumeration value="R_GE_P_INTERSECTING_RINGS" /> + <enumeration value="R_GE_P_HOLE_OUTSIDE" /> + <enumeration value="R_GE_P_ORIENTATION_RINGS_SAME" /> + <enumeration value="R_GE_P_INNER_RINGS_NESTED" /> + <enumeration value="R_GE_S_TOO_FEW_POLYGONS" /> + <enumeration value="R_GE_S_NOT_CLOSED" /> + <enumeration value="R_GE_S_NON_MANIFOLD_EDGE" /> + <enumeration value="R_GE_S_POLYGON_WRONG_ORIENTATION" /> + <enumeration + value="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" /> + <enumeration value="R_GE_S_NON_MANIFOLD_VERTEX" /> + <enumeration value="R_GE_S_SELF_INTERSECTION" /> + <enumeration value="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" /> + <enumeration value="R_SEM_ATTRIBUTES_EXISTING" /> + <enumeration value="R_SEM_ATTRIBUTES_CORRECT" /> + </restriction> + </simpleType> + + <complexType name="parameter"> + <simpleContent> + <extension base="string"> + <attribute name="name" type="string" use="required" /> + <attribute name="uom" type="string" use="optional" /> + </extension> + </simpleContent> + </complexType> + + <complexType name="requirementType"> + <annotation> + <documentation>Requirement structure for configuration purposes + </documentation> + </annotation> + <sequence> + <element name="parameter" type="qual:parameter" minOccurs="0" + maxOccurs="unbounded" /> + </sequence> + <attribute name="name" type="qual:requirementID" /> + <attribute name="enabled" type="boolean" /> + </complexType> + + <complexType name="validationPlanType"> + <annotation> + <documentation>Validation plan structure containing information about + the parameters used to perform the checks + </documentation> + </annotation> + <sequence> + <element name="globalParameters" + type="qual:globalParameterType" /> + <element name="requirement" type="qual:requirementType" + maxOccurs="unbounded" /> + <element name="filter" type="qual:filterType" minOccurs="1" + maxOccurs="1" /> + </sequence> + </complexType> + + <complexType name="filterType"> + <sequence> + <element name="checking" type="qual:featureType" + minOccurs="0" maxOccurs="unbounded" /> + </sequence> + </complexType> + + <simpleType name="featureType"> + <restriction base="string"> + <enumeration value="BUILDING"></enumeration> + <enumeration value="TRANSPORTATION"></enumeration> + <enumeration value="VEGETATION"></enumeration> + <enumeration value="BRIDGE"></enumeration> + <enumeration value="WATER"></enumeration> + <enumeration value="LAND"></enumeration> + </restriction> + </simpleType> + + <complexType name="globalParameterType"> + <sequence> + <element name="parameter" type="qual:parameter" + maxOccurs="unbounded" /> + </sequence> + </complexType> + + <complexType name="statisticsType"> + <annotation> + <documentation>Statistics structure containing information about end + result of checking process + </documentation> + </annotation> + <sequence> + <element name="numErrorBuildings" + type="qual:featureStatistics" /> + <element name="numErrorVegetation" + type="qual:featureStatistics" /> + <element name="numErrorLandObjects" + type="qual:featureStatistics" /> + <element name="numErrorBridgeObjects" + type="qual:featureStatistics" /> + <element name="numErrorWaterObjects" + type="qual:featureStatistics" /> + <element name="numErrorTransportation" + type="qual:featureStatistics" /> + <element name="errorStatistics" + type="qual:errorStatisticsType" /> + </sequence> + </complexType> + + <complexType name="errorStatisticsType"> + <sequence> + <element name="error" type="qual:errorType" minOccurs="0" + maxOccurs="unbounded" /> + </sequence> + </complexType> + + <complexType name="errorType"> + <simpleContent> + <extension base="int"> + <attribute name="name" type="qual:errorId"></attribute> + </extension> + </simpleContent> + </complexType> + + <simpleType name="errorId"> + <restriction base="string"> + <enumeration value="GE_R_TOO_FEW_POINTS" /> + <enumeration value="GE_R_NOT_CLOSED" /> + <enumeration value="GE_R_CONSECUTIVE_POINTS_SAME" /> + <enumeration value="GE_R_SELF_INTERSECTION" /> + <enumeration value="GE_R_NOT_CLOSED" /> + <enumeration value="GE_P_NON_PLANAR" /> + <enumeration value="GE_P_INTERIOR_DISCONNECTED" /> + <enumeration value="GE_P_INTERSECTING_RINGS" /> + <enumeration value="GE_P_HOLE_OUTSIDE" /> + <enumeration value="GE_P_ORIENTATION_RINGS_SAME" /> + <enumeration value="GE_P_INNER_RINGS_NESTED" /> + <enumeration value="GE_S_TOO_FEW_POLYGONS" /> + <enumeration value="GE_S_NOT_CLOSED" /> + <enumeration value="GE_S_NON_MANIFOLD_EDGE" /> + <enumeration value="GE_S_POLYGON_WRONG_ORIENTATION" /> + <enumeration value="GE_S_ALL_POLYGONS_WRONG_ORIENTATION" /> + <enumeration value="GE_S_NON_MANIFOLD_VERTEX" /> + <enumeration value="GE_S_SELF_INTERSECTION" /> + <enumeration value="GE_S_MULTIPLE_CONNECTED_COMPONENTS" /> + <enumeration value="SEM_ATTRIBUTE_WRONG_VALUE" /> + <enumeration value="SEM_ATTRIBUTE_MISSING" /> + </restriction> + </simpleType> + + <complexType name="featureStatistics"> + <simpleContent> + <extension base="int"> + <attribute name="numChecked" type="int" /> + </extension> + </simpleContent> + </complexType> + + <element name="validation" type="qual:validationType" + substitutionGroup="core:_GenericApplicationPropertyOfCityModel" /> + + <complexType name="validationType"> + <annotation> + <documentation>Data structure containing the validation plan and + statistics of a validation process + </documentation> + </annotation> + <!-- <complexContent> <extension base="gml:AbstractFeatureType"> --> + <sequence> + <element name="validationDate" type="dateTime" /> + <element name="validationSoftware" type="string" /> + <element name="validationPlan" type="qual:validationPlanType" + maxOccurs="1" /> + <element name="statistics" type="qual:statisticsType" + maxOccurs="1" /> + </sequence> + <!-- </extension> </complexContent> --> + </complexType> +</schema> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/java/de/hft/stuttgart/quality/QualityAdeTests.java b/citygml4j-quality-ade/src/test/java/de/hft/stuttgart/quality/QualityAdeTests.java new file mode 100644 index 0000000000000000000000000000000000000000..dcb5d86a74ab5f7453da03bacb3f051bf85c3aaf --- /dev/null +++ b/citygml4j-quality-ade/src/test/java/de/hft/stuttgart/quality/QualityAdeTests.java @@ -0,0 +1,1409 @@ +/*- + * Copyright 2020 Hochschule für Technik Stuttgart + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.hft.stuttgart.quality; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.List; +import java.util.ServiceLoader; + +import org.citygml4j.CityGMLContext; +import org.citygml4j.builder.jaxb.CityGMLBuilder; +import org.citygml4j.builder.jaxb.CityGMLBuilderException; +import org.citygml4j.model.citygml.ade.ADEComponent; +import org.citygml4j.model.citygml.ade.ADEException; +import org.citygml4j.model.citygml.ade.binding.ADEContext; +import org.citygml4j.model.citygml.building.Building; +import org.citygml4j.model.citygml.core.AbstractCityObject; +import org.citygml4j.model.citygml.core.CityModel; +import org.citygml4j.model.citygml.core.CityObjectMember; +import org.citygml4j.model.gml.geometry.primitives.DirectPosition; +import org.citygml4j.model.gml.measures.Angle; +import org.citygml4j.model.gml.measures.Length; +import org.citygml4j.model.module.citygml.CityGMLVersion; +import org.citygml4j.xml.io.CityGMLInputFactory; +import org.citygml4j.xml.io.CityGMLOutputFactory; +import org.citygml4j.xml.io.reader.CityGMLReadException; +import org.citygml4j.xml.io.reader.CityGMLReader; +import org.citygml4j.xml.io.reader.FeatureReadMode; +import org.citygml4j.xml.io.writer.CityGMLWriteException; +import org.citygml4j.xml.io.writer.CityGMLWriter; +import org.junit.jupiter.api.Test; + +import de.hft.stuttgart.quality.model.AllPolygonsWrongOrientation; +import de.hft.stuttgart.quality.model.AttributeMissing; +import de.hft.stuttgart.quality.model.AttributeWrongValue; +import de.hft.stuttgart.quality.model.ConsecutivePointsSame; +import de.hft.stuttgart.quality.model.Edge; +import de.hft.stuttgart.quality.model.HoleOutside; +import de.hft.stuttgart.quality.model.InnerRingsNested; +import de.hft.stuttgart.quality.model.InteriorDisconnected; +import de.hft.stuttgart.quality.model.IntersectingRings; +import de.hft.stuttgart.quality.model.MultipleConnectedComponents; +import de.hft.stuttgart.quality.model.NonManifoldEdge; +import de.hft.stuttgart.quality.model.NonManifoldVertex; +import de.hft.stuttgart.quality.model.NonPlanarDistancePlane; +import de.hft.stuttgart.quality.model.NonPlanarNormalsDeviation; +import de.hft.stuttgart.quality.model.OrientationRingsSame; +import de.hft.stuttgart.quality.model.PolygonWrongOrientation; +import de.hft.stuttgart.quality.model.RingNotClosed; +import de.hft.stuttgart.quality.model.RingSelfIntersection; +import de.hft.stuttgart.quality.model.SolidNotClosed; +import de.hft.stuttgart.quality.model.TooFewPoints; +import de.hft.stuttgart.quality.model.TooFewPolygons; +import de.hft.stuttgart.quality.model.Validation; +import de.hft.stuttgart.quality.model.ValidationError; +import de.hft.stuttgart.quality.model.ValidationResult; +import de.hft.stuttgart.quality.model.jaxb.Checking; +import de.hft.stuttgart.quality.model.jaxb.Component; +import de.hft.stuttgart.quality.model.jaxb.ErrorId; +import de.hft.stuttgart.quality.model.jaxb.ErrorStatistics; +import de.hft.stuttgart.quality.model.jaxb.FeatureStatistics; +import de.hft.stuttgart.quality.model.jaxb.Parameter; +import de.hft.stuttgart.quality.model.jaxb.Requirement; +import de.hft.stuttgart.quality.model.jaxb.RequirementId; +import de.hft.stuttgart.quality.model.jaxb.ResultType; +import de.hft.stuttgart.quality.model.jaxb.RingSelfIntType; +import de.hft.stuttgart.quality.model.jaxb.Statistics; +import de.hft.stuttgart.quality.model.jaxb.TopLevelFeatureType; +import de.hft.stuttgart.quality.model.jaxb.ValidationPlan; + +class QualityAdeTests { + + @Test + void testReadingConsecutiveSameError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_Error_QualityADE.gml"); + testValidationPlan(cityModel); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + assertEquals(1, cityObjectMember.size()); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + assertNotNull(aco); + assertTrue(aco instanceof Building); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + assertTrue(resultComp instanceof ValidationResult); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + assertEquals(1, errors.size()); + ValidationError validationError = errors.get(0); + assertTrue(validationError instanceof ConsecutivePointsSame); + ConsecutivePointsSame err = (ConsecutivePointsSame) validationError; + assertEquals("_Simple_BD.1_PG.6_LR.1", err.getLinearRingId()); + Double x1 = err.getVertex1().getValue().get(0); + assertEquals(11.5, x1, 0.0000001); + Double x2 = err.getVertex2().getValue().get(0); + assertEquals(11.5, x2, 0.0000001); + } + + @Test + void testReadingTooFewPointsError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_TooFewPoints.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + assertTrue(validationError instanceof TooFewPoints); + TooFewPoints err = (TooFewPoints) validationError; + assertEquals("_Simple_BD.1_PG.6_LR.1", err.getLinearRingId()); + } + + @Test + void testReadingRingSelfIntersectionError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_RingSelfIntersection.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + assertTrue(validationError instanceof RingSelfIntersection); + RingSelfIntersection err = (RingSelfIntersection) validationError; + assertEquals("_Simple_BD.1_PG.6_LR.1", err.getLinearRingId()); + assertEquals(RingSelfIntType.POINT_TOUCHES_EDGE, err.getType()); + assertNull(err.getEdge2()); + Edge edge1 = err.getEdge1(); + assertEquals(10.0, edge1.getFrom().getValue().get(0), 0.000001); + assertEquals(11.0, edge1.getTo().getValue().get(0), 0.000001); + assertEquals(5.0, err.getVertex1().getValue().get(0)); + assertNull(err.getVertex2()); + } + + @Test + void testReadingRingNotClosedError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_RingNotClosed.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + assertTrue(validationError instanceof RingNotClosed); + RingNotClosed err = (RingNotClosed) validationError; + assertEquals("_Simple_BD.1_PG.6_LR.1", err.getLinearRingId()); + } + + @Test + void testReadingInteriorDisconnectedError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_InteriorDisconnected.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof InteriorDisconnected); + InteriorDisconnected err = (InteriorDisconnected) validationError; + assertEquals("_Simple_BD.1_PG.1", err.getPolygonId()); + } + + @Test + void testReadingIntersectingRingsError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_IntersectingRings.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof IntersectingRings); + IntersectingRings err = (IntersectingRings) validationError; + assertEquals("_Simple_BD.1_PG.1", err.getPolygonId()); + assertEquals("_Simple_BD.1_PG.1_Ring1", err.getLinearRingId1()); + assertEquals("_Simple_BD.1_PG.1_Ring2", err.getLinearRingId2()); + } + + @Test + void testReadingNonPlanarPolygonDistancePlaneError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_NonPlanarPolygonDistancePlane.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof NonPlanarDistancePlane); + NonPlanarDistancePlane err = (NonPlanarDistancePlane) validationError; + assertEquals("_Simple_BD.1_PG.1", err.getPolygonId()); + assertEquals(1.0, err.getVertex().getValue().get(0), 0.000001); + assertEquals(0.001, err.getDistance().getValue(), 0.000001); + assertEquals("m", err.getDistance().getUom()); + } + + @Test + void testReadingInnerRingsNestedError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_InnerRingNested.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof InnerRingsNested); + InnerRingsNested err = (InnerRingsNested) validationError; + assertEquals("_Simple_BD.1_PG.1", err.getPolygonId()); + assertEquals("_Simple_BD.1_PG.1_Ring1", err.getLinearRingId1()); + assertEquals("_Simple_BD.1_PG.1_Ring2", err.getLinearRingId2()); + } + + @Test + void testReadingHoleOutsideError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_HoleOutside.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof HoleOutside); + HoleOutside err = (HoleOutside) validationError; + assertEquals("_Simple_BD.1_PG.1", err.getPolygonId()); + assertEquals("_Simple_BD.1_PG.1_Ring1", err.getLinearRingId()); + } + + @Test + void testReadingNonPlanarNormalsDeviationError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_NonPlanarPolygonNormalsDeviation.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof NonPlanarNormalsDeviation); + NonPlanarNormalsDeviation err = (NonPlanarNormalsDeviation) validationError; + assertEquals("_Simple_BD.1_PG.1", err.getPolygonId()); + assertEquals(1.0, err.getDeviation().getValue()); + assertEquals("deg", err.getDeviation().getUom()); + } + + @Test + void testReadingOrientationRingsSameError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_OrientationRingsSame.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof OrientationRingsSame); + OrientationRingsSame err = (OrientationRingsSame) validationError; + assertEquals("_Simple_BD.1_PG.1", err.getPolygonId()); + assertEquals("_Simple_BD.1_PG.1_Ring1", err.getLinearRingId()); + } + + @Test + void testReadingAllPolygonsWrongOrientationError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_AllPolygonsWrongOrientation.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof AllPolygonsWrongOrientation); + AllPolygonsWrongOrientation err = (AllPolygonsWrongOrientation) validationError; + assertEquals("_Simple_BD.1_Geom1", err.getGeometryId()); + } + + @Test + void testReadingPolygonWrongOrientationError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_PolygonWrongOrientation.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof PolygonWrongOrientation); + PolygonWrongOrientation err = (PolygonWrongOrientation) validationError; + assertEquals("_Simple_BD.1_Geom1", err.getGeometryId()); + assertFalse(err.getEdges().isEmpty()); + List<Edge> edges = err.getEdges(); + Edge edge = edges.get(0); + DirectPosition from = edge.getFrom(); + assertEquals(10.0, from.getValue().get(0), 0.000001); + assertEquals(11.0, edge.getTo().getValue().get(0), 0.000001); + } + + @Test + void testReadingNonManifoldVertexError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_NonManifoldVertex.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof NonManifoldVertex); + NonManifoldVertex err = (NonManifoldVertex) validationError; + assertEquals("_Simple_BD.1_Geom1", err.getGeometryId()); + DirectPosition vertex = err.getVertex(); + assertEquals(1.0, vertex.getValue().get(0), 0.000001); + } + + @Test + void testReadingNonManifoldEdgeError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_NonManifoldEdge.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof NonManifoldEdge); + NonManifoldEdge err = (NonManifoldEdge) validationError; + assertEquals("_Simple_BD.1_Geom1", err.getGeometryId()); + assertFalse(err.getEdges().isEmpty()); + List<Edge> edges = err.getEdges(); + Edge edge = edges.get(0); + DirectPosition from = edge.getFrom(); + assertEquals(10.0, from.getValue().get(0), 0.000001); + assertEquals(11.0, edge.getTo().getValue().get(0), 0.000001); + } + + @Test + void testReadingSolidNotClosedError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_SolidNotClosed.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof SolidNotClosed); + SolidNotClosed err = (SolidNotClosed) validationError; + assertEquals("_Simple_BD.1_Geom1", err.getGeometryId()); + assertFalse(err.getEdges().isEmpty()); + List<Edge> edges = err.getEdges(); + Edge edge = edges.get(0); + DirectPosition from = edge.getFrom(); + assertEquals(10.0, from.getValue().get(0), 0.000001); + assertEquals(11.0, edge.getTo().getValue().get(0), 0.000001); + } + + @Test + void testReadingTooFewPolygonsError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_TooFewPolygons.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof TooFewPolygons); + TooFewPolygons err = (TooFewPolygons) validationError; + assertEquals("_Simple_BD.1_Geom1", err.getGeometryId()); + } + + @Test + void testReadingMultipleConnectedComponentsError() + throws ADEException, CityGMLBuilderException, CityGMLReadException, FileNotFoundException { + CityModel cityModel = readCityGml("src/test/resources/SimpleSolid_MultipleConnectedComponents.gml"); + + List<CityObjectMember> cityObjectMember = cityModel.getCityObjectMember(); + CityObjectMember com = cityObjectMember.get(0); + AbstractCityObject aco = com.getCityObject(); + Building b = (Building) aco; + + List<ADEComponent> gen = b.getGenericApplicationPropertyOfCityObject(); + ADEComponent resultComp = gen.get(0); + ValidationResult result = (ValidationResult) resultComp; + assertEquals(ResultType.ERROR, result.getResult()); + assertFalse(result.getErrors().isEmpty()); + List<ValidationError> errors = result.getErrors(); + ValidationError validationError = errors.get(0); + + assertTrue(validationError instanceof MultipleConnectedComponents); + MultipleConnectedComponents err = (MultipleConnectedComponents) validationError; + assertEquals("_Simple_BD.1_Geom1", err.getGeometryId()); + assertEquals("_Simple_BD.1_PG.1", err.getComponents().get(0).getPolygonIds().get(0)); + assertEquals("_Simple_BD.1_PG.2", err.getComponents().get(0).getPolygonIds().get(1)); + assertEquals("_Simple_BD.1_PG.3", err.getComponents().get(1).getPolygonIds().get(0)); + assertEquals("_Simple_BD.1_PG.4", err.getComponents().get(1).getPolygonIds().get(1)); + } + + @Test + void testWritingAttributeMissingError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + AttributeMissing error = new AttributeMissing(); + error.setAttributeName("TestName"); + error.setChildId("TestId"); + error.setGeneric(true); + result.getErrors().add(error); + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + AttributeMissing error2 = (AttributeMissing) valError; + assertEquals(error.getAttributeName(), error2.getAttributeName()); + assertEquals(error.getChildId(), error2.getChildId()); + assertEquals(error.isGeneric(), error2.isGeneric()); + } + + @Test + void testWritingAttributeWrongValueError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + AttributeWrongValue error = new AttributeWrongValue(); + error.setAttributeName("TestName"); + error.setChildId("TestId"); + error.setGeneric(true); + result.getErrors().add(error); + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + AttributeWrongValue error2 = (AttributeWrongValue) valError; + assertEquals(error.getAttributeName(), error2.getAttributeName()); + assertEquals(error.getChildId(), error2.getChildId()); + assertEquals(error.isGeneric(), error2.isGeneric()); + } + + @Test + void testWritingMultipleConnectedComponentsError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + MultipleConnectedComponents error = new MultipleConnectedComponents(); + error.setGeometryId("TestGeometry"); + Component c1 = new Component(); + c1.getPolygonIds().add("TestPoly"); + error.getComponents().add(c1); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + MultipleConnectedComponents error2 = (MultipleConnectedComponents) valError; + assertEquals(error.getGeometryId(), error2.getGeometryId()); + assertEquals(error.getComponents().get(0).getPolygonIds().get(0), + error2.getComponents().get(0).getPolygonIds().get(0)); + } + + @Test + void testWritingTooFewPolygonsError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + TooFewPolygons error = new TooFewPolygons(); + error.setGeometryId("TestGeometry"); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + TooFewPolygons error2 = (TooFewPolygons) valError; + assertEquals(error.getGeometryId(), error2.getGeometryId()); + } + + @Test + void testWritingSolidNotClosedError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + SolidNotClosed error = new SolidNotClosed(); + error.setGeometryId("TestGeometry"); + DirectPosition from = new DirectPosition(); + from.getValue().add(10.0); + DirectPosition to = new DirectPosition(); + to.getValue().add(11.0); + Edge e = new Edge(); + e.setFrom(from); + e.setTo(to); + error.getEdges().add(e); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + SolidNotClosed error2 = (SolidNotClosed) valError; + assertEquals(error.getGeometryId(), error2.getGeometryId()); + Edge edge = error.getEdges().get(0); + assertEquals(edge.getFrom().getValue().get(0), e.getFrom().getValue().get(0), 0.00001); + assertEquals(edge.getTo().getValue().get(0), e.getTo().getValue().get(0), 0.00001); + } + + @Test + void testWritingNonManifoldEdgeError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + NonManifoldEdge error = new NonManifoldEdge(); + error.setGeometryId("TestGeometry"); + DirectPosition from = new DirectPosition(); + from.getValue().add(10.0); + DirectPosition to = new DirectPosition(); + to.getValue().add(11.0); + Edge e = new Edge(); + e.setFrom(from); + e.setTo(to); + error.getEdges().add(e); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + NonManifoldEdge error2 = (NonManifoldEdge) valError; + assertEquals(error.getGeometryId(), error2.getGeometryId()); + Edge edge = error.getEdges().get(0); + assertEquals(edge.getFrom().getValue().get(0), e.getFrom().getValue().get(0), 0.00001); + assertEquals(edge.getTo().getValue().get(0), e.getTo().getValue().get(0), 0.00001); + } + + @Test + void testWritingNonManifoldVertexError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + NonManifoldVertex error = new NonManifoldVertex(); + error.setGeometryId("TestGeometry"); + DirectPosition vertex = new DirectPosition(); + vertex.getValue().add(10.0); + error.setVertex(vertex); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + NonManifoldVertex error2 = (NonManifoldVertex) valError; + assertEquals(error.getGeometryId(), error2.getGeometryId()); + assertEquals(error.getVertex().getValue().get(0), error2.getVertex().getValue().get(0)); + } + + @Test + void testWritingPolygonWrongOrientationError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + PolygonWrongOrientation error = new PolygonWrongOrientation(); + error.setGeometryId("TestGeometry"); + DirectPosition from = new DirectPosition(); + from.getValue().add(10.0); + DirectPosition to = new DirectPosition(); + to.getValue().add(11.0); + Edge e = new Edge(); + e.setFrom(from); + e.setTo(to); + error.getEdges().add(e); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + PolygonWrongOrientation error2 = (PolygonWrongOrientation) valError; + assertEquals(error.getGeometryId(), error2.getGeometryId()); + Edge edge = error.getEdges().get(0); + assertEquals(edge.getFrom().getValue().get(0), e.getFrom().getValue().get(0), 0.00001); + assertEquals(edge.getTo().getValue().get(0), e.getTo().getValue().get(0), 0.00001); + } + + @Test + void testWritingAllPolygonsWrongOrientationError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + AllPolygonsWrongOrientation error = new AllPolygonsWrongOrientation(); + error.setGeometryId("TestGeometry"); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + AllPolygonsWrongOrientation error2 = (AllPolygonsWrongOrientation) valError; + assertEquals(error.getGeometryId(), error2.getGeometryId()); + } + + @Test + void testWritingOrientationRingsSameError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + OrientationRingsSame error = new OrientationRingsSame(); + error.setPolygonId("TestPolygon"); + error.setLinearRingId("TestRing"); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + OrientationRingsSame error2 = (OrientationRingsSame) valError; + assertEquals(error.getPolygonId(), error2.getPolygonId()); + assertEquals(error.getLinearRingId(), error2.getLinearRingId()); + } + + @Test + void testWritingNonPlanarNormalsDeviationError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + NonPlanarNormalsDeviation error = new NonPlanarNormalsDeviation(); + error.setPolygonId("TestPolygon"); + Angle deviation = new Angle(); + deviation.setValue(1.0); + deviation.setUom("deg"); + error.setDeviation(deviation); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + NonPlanarNormalsDeviation error2 = (NonPlanarNormalsDeviation) valError; + assertEquals(error.getPolygonId(), error2.getPolygonId()); + assertEquals(error.getDeviation().getValue(), error2.getDeviation().getValue()); + assertEquals(error.getDeviation().getUom(), error2.getDeviation().getUom()); + } + + @Test + void testWritingHoleOutsideError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + HoleOutside error = new HoleOutside(); + error.setPolygonId("TestPolygon"); + error.setLinearRingId("TestRing1"); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + HoleOutside error2 = (HoleOutside) valError; + assertEquals(error.getPolygonId(), error2.getPolygonId()); + assertEquals(error.getLinearRingId(), error2.getLinearRingId()); + } + + @Test + void testWritingInnerRingsNestedError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + InnerRingsNested error = new InnerRingsNested(); + error.setPolygonId("TestPolygon"); + error.setLinearRingId1("TestRing1"); + error.setLinearRingId2("TestRing2"); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + InnerRingsNested error2 = (InnerRingsNested) valError; + assertEquals(error.getPolygonId(), error2.getPolygonId()); + assertEquals(error.getLinearRingId1(), error2.getLinearRingId1()); + assertEquals(error.getLinearRingId2(), error2.getLinearRingId2()); + } + + @Test + void testWritingNonPlanarDistancePlaneError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + NonPlanarDistancePlane error = new NonPlanarDistancePlane(); + error.setPolygonId("TestPolygon"); + DirectPosition vertex = new DirectPosition(); + vertex.getValue().add(1.0); + error.setVertex(vertex); + Length distance = new Length(0.1); + distance.setUom("m"); + error.setDistance(distance); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + NonPlanarDistancePlane error2 = (NonPlanarDistancePlane) valError; + assertEquals(error.getPolygonId(), error2.getPolygonId()); + assertEquals(error.getVertex().getValue().get(0), error2.getVertex().getValue().get(0), 0.00001); + assertEquals(error.getDistance().getValue(), error2.getDistance().getValue(), 0.00001); + } + + @Test + void testWritingIntersectingRingsError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + IntersectingRings error = new IntersectingRings(); + error.setPolygonId("TestPolygon"); + error.setLinearRingId1("TestRing1"); + error.setLinearRingId2("TestRing2"); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + IntersectingRings error2 = (IntersectingRings) valError; + assertEquals(error.getPolygonId(), error2.getPolygonId()); + assertEquals(error.getLinearRingId1(), error2.getLinearRingId1()); + assertEquals(error.getLinearRingId2(), error2.getLinearRingId2()); + } + + @Test + void testWritingInteriorDisconnectedError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + InteriorDisconnected error = new InteriorDisconnected(); + error.setPolygonId("TestPolygon"); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + InteriorDisconnected error2 = (InteriorDisconnected) valError; + assertEquals(error.getPolygonId(), error2.getPolygonId()); + } + + @Test + void testWritingRingNotClosedError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + RingNotClosed error = new RingNotClosed(); + error.setLinearRingId("TestRing"); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + RingNotClosed error2 = (RingNotClosed) valError; + assertEquals(error.getLinearRingId(), error2.getLinearRingId()); + } + + @Test + void testWritingTooFewPointsError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + TooFewPoints error = new TooFewPoints(); + error.setLinearRingId("TestRing"); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + TooFewPoints error2 = (TooFewPoints) valError; + assertEquals(error.getLinearRingId(), error2.getLinearRingId()); + } + + @Test + void testWritingConsecutiveSameError() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + + ConsecutivePointsSame error = new ConsecutivePointsSame(); + error.setLinearRingId("TestRing"); + DirectPosition vertex1 = new DirectPosition(); + vertex1.getValue().add(10.0); + vertex1.getValue().add(5.0); + vertex1.getValue().add(7.0); + error.setVertex1(vertex1); + DirectPosition vertex2 = new DirectPosition(); + vertex2.getValue().add(15.0); + vertex2.getValue().add(55.0); + vertex2.getValue().add(71.0); + error.setVertex2(vertex2); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + ConsecutivePointsSame error2 = (ConsecutivePointsSame) valError; + assertEquals(error.getLinearRingId(), error2.getLinearRingId()); + assertEquals(error.getVertex1().getValue().get(0), error2.getVertex1().getValue().get(0)); + assertEquals(error.getVertex2().getValue().get(0), error2.getVertex2().getValue().get(0)); + } + + @Test + void testWritingRingSelfIntersection() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Building b = new Building(); + model.getCityObjectMember().add(new CityObjectMember(b)); + + ValidationResult result = new ValidationResult(); + result.setResult(ResultType.ERROR); + b.addGenericApplicationPropertyOfCityObject(result); + + RingSelfIntersection error = new RingSelfIntersection(); + error.setType(RingSelfIntType.DUPLICATE_POINT); + error.setLinearRingId("TestRing"); + DirectPosition vertex1 = new DirectPosition(); + vertex1.getValue().add(10.0); + vertex1.getValue().add(5.0); + vertex1.getValue().add(7.0); + error.setVertex1(vertex1); + DirectPosition vertex2 = new DirectPosition(); + vertex2.getValue().add(15.0); + vertex2.getValue().add(55.0); + vertex2.getValue().add(71.0); + error.setVertex2(vertex2); + result.getErrors().add(error); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + AbstractCityObject co = model.getCityObjectMember().get(0).getCityObject(); + List<ADEComponent> ades = co.getGenericApplicationPropertyOfCityObject(); + ADEComponent adeComponent = ades.get(0); + ValidationResult valRes = (ValidationResult) adeComponent; + assertEquals(ResultType.ERROR, valRes.getResult()); + + ValidationError valError = valRes.getErrors().get(0); + RingSelfIntersection error2 = (RingSelfIntersection) valError; + assertEquals(error.getLinearRingId(), error2.getLinearRingId()); + assertEquals(error.getVertex1().getValue().get(0), error2.getVertex1().getValue().get(0)); + assertEquals(error.getVertex2().getValue().get(0), error2.getVertex2().getValue().get(0)); + } + + @Test + void testWritingValidationPlan() + throws ADEException, CityGMLBuilderException, CityGMLWriteException, CityGMLReadException { + CityModel model = new CityModel(); + Validation val = new Validation(); + model.addGenericApplicationPropertyOfCityModel(val); + + ZonedDateTime expectedDate = LocalDateTime.of(2002, 5, 30, 9, 0).atZone(ZoneId.systemDefault()); + + val.setValidationDate(expectedDate); + val.setValidationSoftware("CityDoctor2"); + ValidationPlan plan = new ValidationPlan(); + val.setValidationPlan(plan); + + Parameter roundingParameter = new Parameter(); + roundingParameter.setName("numberOfRoundingPlaces"); + roundingParameter.setValue("8"); + plan.getGlobalParameters().add(roundingParameter); + + Parameter minVertexDistance = new Parameter(); + minVertexDistance.setName("minVertexDistance"); + minVertexDistance.setValue("0.0001"); + minVertexDistance.setUom("m"); + plan.getGlobalParameters().add(minVertexDistance); + + Requirement rTooFewPoints = new Requirement(); + rTooFewPoints.setEnabled(true); + rTooFewPoints.setName(RequirementId.R_GE_R_TOO_FEW_POINTS); + plan.getRequirements().add(rTooFewPoints); + + Checking buildingChecking = new Checking(); + buildingChecking.setValue(TopLevelFeatureType.BUILDING); + plan.getFilter().add(buildingChecking); + + Statistics statistics = new Statistics(); + val.setStatistics(statistics); + + FeatureStatistics numErrorBridgeObjects = new FeatureStatistics(); + numErrorBridgeObjects.setNumChecked(0); + numErrorBridgeObjects.setNumErrors(0); + statistics.setNumErrorBridgeObjects(numErrorBridgeObjects); + + FeatureStatistics numErrorBuildings = new FeatureStatistics(); + numErrorBuildings.setNumChecked(1); + numErrorBuildings.setNumErrors(1); + statistics.setNumErrorBuildings(numErrorBuildings); + + FeatureStatistics numErrors = new FeatureStatistics(); + statistics.setNumErrorLandObjects(numErrors); + statistics.setNumErrorTransportation(numErrors); + statistics.setNumErrorVegetation(numErrors); + statistics.setNumErrorWaterObjects(numErrors); + + ErrorStatistics stats1 = new ErrorStatistics(); + stats1.setAmount(1); + stats1.setName(ErrorId.GE_R_CONSECUTIVE_POINTS_SAME); + statistics.getErrorStatistics().add(stats1); + + byte[] gml = writeCityGml(model); + model = readCityGml(gml); + + testValidationPlan(model); + } + + private CityModel readCityGml(InputStream input) + throws ADEException, CityGMLBuilderException, CityGMLReadException { + CityGMLContext context = CityGMLContext.getInstance(); + List<ADEContext> adeContexts = context.getADEContexts(); + if (adeContexts == null || adeContexts.isEmpty()) { + for (ADEContext adeContext : ServiceLoader.load(ADEContext.class)) { + context.registerADEContext(adeContext); + } + } + + CityGMLBuilder builder = context.createCityGMLBuilder(); + CityGMLInputFactory in = builder.createCityGMLInputFactory(); + in.setProperty(CityGMLInputFactory.USE_VALIDATION, true); + in.setProperty(CityGMLInputFactory.FEATURE_READ_MODE, FeatureReadMode.NO_SPLIT); + in.setValidationEventHandler(event -> { + System.out.print( + "[" + event.getLocator().getLineNumber() + "," + event.getLocator().getColumnNumber() + "] "); + System.out.println(event.getMessage()); + return true; + }); + CityModel cityModel; + try (CityGMLReader reader = in.createCityGMLReader("?", input)) { + cityModel = (CityModel) reader.nextFeature(); + } + return cityModel; + } + + private CityModel readCityGml(File f) + throws FileNotFoundException, ADEException, CityGMLBuilderException, CityGMLReadException { + return readCityGml(new FileInputStream(f)); + } + + private CityModel readCityGml(String fileName) + throws FileNotFoundException, ADEException, CityGMLBuilderException, CityGMLReadException { + return readCityGml(new File(fileName)); + } + + private CityModel readCityGml(byte[] bytes) throws ADEException, CityGMLBuilderException, CityGMLReadException { + return readCityGml(new ByteArrayInputStream(bytes)); + } + + private void testValidationPlan(CityModel cityModel) { + assertFalse(cityModel.getGenericApplicationPropertyOfCityModel().isEmpty()); + List<ADEComponent> ades = cityModel.getGenericApplicationPropertyOfCityModel(); + ADEComponent adeComponent = ades.get(0); + assertTrue(adeComponent instanceof Validation); + Validation val = (Validation) adeComponent; + ZonedDateTime expectedDate = LocalDateTime.of(2002, 5, 30, 9, 0).atZone(ZoneId.systemDefault()); + assertTrue(expectedDate.isEqual(val.getValidationDate())); + assertEquals("CityDoctor2", val.getValidationSoftware()); + assertNotNull(val.getValidationPlan()); + ValidationPlan plan = val.getValidationPlan(); + assertNotNull(plan.getGlobalParameters()); + assertFalse(plan.getGlobalParameters().isEmpty()); + List<Parameter> globalParameters = plan.getGlobalParameters(); + Parameter roundingParameter = globalParameters.get(0); + assertEquals("numberOfRoundingPlaces", roundingParameter.getName()); + assertEquals("8", roundingParameter.getValue()); + assertNull(roundingParameter.getUom()); + Parameter minVertexDistance = globalParameters.get(1); + assertEquals("minVertexDistance", minVertexDistance.getName()); + assertEquals("0.0001", minVertexDistance.getValue()); + assertEquals("m", minVertexDistance.getUom()); + + assertNotNull(plan.getRequirements()); + assertFalse(plan.getRequirements().isEmpty()); + + List<Requirement> requirements = plan.getRequirements(); + Requirement rTooFewPoints = requirements.get(0); + assertEquals(RequirementId.R_GE_R_TOO_FEW_POINTS, rTooFewPoints.getName()); + assertTrue(rTooFewPoints.isEnabled()); + + assertNotNull(plan.getFilter()); + assertFalse(plan.getFilter().isEmpty()); + + List<Checking> filter = plan.getFilter(); + Checking buildingChecking = filter.get(0); + assertEquals(TopLevelFeatureType.BUILDING, buildingChecking.getValue()); + + Statistics statistics = val.getStatistics(); + assertNotNull(statistics); + FeatureStatistics numErrorBridgeObjects = statistics.getNumErrorBridgeObjects(); + assertNotNull(numErrorBridgeObjects); + assertEquals(0, numErrorBridgeObjects.getNumChecked()); + assertEquals(0, numErrorBridgeObjects.getNumErrors()); + + FeatureStatistics numErrorBuildings = statistics.getNumErrorBuildings(); + assertEquals(1, numErrorBuildings.getNumChecked()); + assertEquals(1, numErrorBuildings.getNumErrors()); + + List<ErrorStatistics> errorStatistics = statistics.getErrorStatistics(); + assertNotNull(errorStatistics); + assertFalse(errorStatistics.isEmpty()); + ErrorStatistics stats1 = errorStatistics.get(0); + assertEquals(ErrorId.GE_R_CONSECUTIVE_POINTS_SAME, stats1.getName()); + assertEquals(1, stats1.getAmount()); + } + + private byte[] writeCityGml(CityModel model) throws ADEException, CityGMLBuilderException, CityGMLWriteException { + CityGMLContext context = CityGMLContext.getInstance(); + List<ADEContext> adeContexts = context.getADEContexts(); + if (adeContexts == null || adeContexts.isEmpty()) { + for (ADEContext adeContext : ServiceLoader.load(ADEContext.class)) { + context.registerADEContext(adeContext); + } + } + + CityGMLBuilder builder = context.createCityGMLBuilder(); + + CityGMLOutputFactory outputFactory = builder.createCityGMLOutputFactory(CityGMLVersion.DEFAULT); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + try (CityGMLWriter writer = outputFactory.createCityGMLWriter(out)) { + writer.setIndentString(" "); + writer.setPrefixes(CityGMLVersion.DEFAULT); + writer.setPrefix("qual", QualityADEModule.NAMESPACE_URI); + writer.setSchemaLocation(QualityADEModule.NAMESPACE_URI, + "https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"); + writer.setSchemaLocations(CityGMLVersion.DEFAULT); + writer.write(model); + return out.toByteArray(); + } + } + +} diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_AllPolygonsWrongOrientation.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_AllPolygonsWrongOrientation.gml new file mode 100644 index 0000000000000000000000000000000000000000..9a80a2b0f23109e1a50292d0eece46448d6452b1 --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_AllPolygonsWrongOrientation.gml @@ -0,0 +1,255 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_S_ALL_POLYGONS_WRONG_ORIENTATION> + <qual:geometryId>_Simple_BD.1_Geom1</qual:geometryId> + </qual:GE_S_ALL_POLYGONS_WRONG_ORIENTATION> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid gml:id="_Simple_BD.1_Geom1"> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_Error_QualityADE.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_Error_QualityADE.gml new file mode 100644 index 0000000000000000000000000000000000000000..ef2a6a7dd3f2aa0a6ba7f8fcf1e09eb7722d0805 --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_Error_QualityADE.gml @@ -0,0 +1,257 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_R_CONSECUTIVE_POINTS_SAME> + <qual:linearRingId>_Simple_BD.1_PG.6_LR.1</qual:linearRingId> + <qual:vertex1>11.5 10.0 4.5</qual:vertex1> + <qual:vertex2>11.5 10.0 4.5</qual:vertex2> + </qual:GE_R_CONSECUTIVE_POINTS_SAME> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_HoleOutside.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_HoleOutside.gml new file mode 100644 index 0000000000000000000000000000000000000000..17eeee96fde34f30e1b89856db5880e32fbf8a0a --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_HoleOutside.gml @@ -0,0 +1,256 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_P_HOLE_OUTSIDE> + <qual:polygonId>_Simple_BD.1_PG.1</qual:polygonId> + <qual:linearRingId>_Simple_BD.1_PG.1_Ring1</qual:linearRingId> + </qual:GE_P_HOLE_OUTSIDE> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_InnerRingNested.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_InnerRingNested.gml new file mode 100644 index 0000000000000000000000000000000000000000..605ec2ccc7d07f3da194271cf58cee78d68e9459 --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_InnerRingNested.gml @@ -0,0 +1,257 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_P_INNER_RINGS_NESTED> + <qual:polygonId>_Simple_BD.1_PG.1</qual:polygonId> + <qual:linearRingId1>_Simple_BD.1_PG.1_Ring1</qual:linearRingId1> + <qual:linearRingId2>_Simple_BD.1_PG.1_Ring2</qual:linearRingId2> + </qual:GE_P_INNER_RINGS_NESTED> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_InteriorDisconnected.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_InteriorDisconnected.gml new file mode 100644 index 0000000000000000000000000000000000000000..a7540226482857982c6e137e3d485ecce5c713cf --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_InteriorDisconnected.gml @@ -0,0 +1,255 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_P_INTERIOR_DISCONNECTED> + <qual:polygonId>_Simple_BD.1_PG.1</qual:polygonId> + </qual:GE_P_INTERIOR_DISCONNECTED> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_IntersectingRings.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_IntersectingRings.gml new file mode 100644 index 0000000000000000000000000000000000000000..22d938a5aeee6e089ef9da9237560aacb62ca4df --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_IntersectingRings.gml @@ -0,0 +1,257 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_P_INTERSECTING_RINGS> + <qual:polygonId>_Simple_BD.1_PG.1</qual:polygonId> + <qual:linearRingId1>_Simple_BD.1_PG.1_Ring1</qual:linearRingId1> + <qual:linearRingId2>_Simple_BD.1_PG.1_Ring2</qual:linearRingId2> + </qual:GE_P_INTERSECTING_RINGS> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_MultipleConnectedComponents.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_MultipleConnectedComponents.gml new file mode 100644 index 0000000000000000000000000000000000000000..2d46e84ce8bdda08be0724d50d055e1af88f93aa --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_MultipleConnectedComponents.gml @@ -0,0 +1,266 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + + <qual:validationResult result="ERROR"> + <qual:GE_S_MULTIPLE_CONNECTED_COMPONENTS> + <qual:geometryId>_Simple_BD.1_Geom1</qual:geometryId> + <qual:components> + <qual:component> + <qual:polygonId>_Simple_BD.1_PG.1</qual:polygonId> + <qual:polygonId>_Simple_BD.1_PG.2</qual:polygonId> + </qual:component> + <qual:component> + <qual:polygonId>_Simple_BD.1_PG.3</qual:polygonId> + <qual:polygonId>_Simple_BD.1_PG.4</qual:polygonId> + </qual:component> + </qual:components> + </qual:GE_S_MULTIPLE_CONNECTED_COMPONENTS> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid gml:id="_Simple_BD.1_Geom1"> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonManifoldEdge.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonManifoldEdge.gml new file mode 100644 index 0000000000000000000000000000000000000000..315ca6eaa7b7dd520c2a059843a4e039821843d0 --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonManifoldEdge.gml @@ -0,0 +1,262 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + + <qual:validationResult result="ERROR"> + <qual:GE_S_NON_MANIFOLD_EDGE> + <qual:geometryId>_Simple_BD.1_Geom1</qual:geometryId> + <qual:edges> + <qual:edge> + <qual:from>10.0 1.0 2.0</qual:from> + <qual:to>11.0 2.0 3.0</qual:to> + </qual:edge> + </qual:edges> + </qual:GE_S_NON_MANIFOLD_EDGE> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid gml:id="_Simple_BD.1_Geom1"> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonManifoldVertex.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonManifoldVertex.gml new file mode 100644 index 0000000000000000000000000000000000000000..e6ef60f647d01cbda28c69c487de8c092afd5f3a --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonManifoldVertex.gml @@ -0,0 +1,256 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_S_NON_MANIFOLD_VERTEX> + <qual:geometryId>_Simple_BD.1_Geom1</qual:geometryId> + <qual:vertex>1.0 2.0 3.0</qual:vertex> + </qual:GE_S_NON_MANIFOLD_VERTEX> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid gml:id="_Simple_BD.1_Geom1"> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonPlanarPolygonDistancePlane.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonPlanarPolygonDistancePlane.gml new file mode 100644 index 0000000000000000000000000000000000000000..45e48ee2b95a9c708f55bcfb634f808864a244de --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonPlanarPolygonDistancePlane.gml @@ -0,0 +1,257 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE> + <qual:polygonId>_Simple_BD.1_PG.1</qual:polygonId> + <qual:vertex>1.0 2.0 3.0</qual:vertex> + <qual:distance uom="m">0.001</qual:distance> + </qual:GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonPlanarPolygonNormalsDeviation.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonPlanarPolygonNormalsDeviation.gml new file mode 100644 index 0000000000000000000000000000000000000000..db514b7d739a772d46d8051cc2b7c43e8d99a32c --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_NonPlanarPolygonNormalsDeviation.gml @@ -0,0 +1,256 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION> + <qual:polygonId>_Simple_BD.1_PG.1</qual:polygonId> + <qual:deviation uom="deg">1.0</qual:deviation> + </qual:GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_OrientationRingsSame.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_OrientationRingsSame.gml new file mode 100644 index 0000000000000000000000000000000000000000..eb172a685ff24395186d77edb3c1ab0888b52f0d --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_OrientationRingsSame.gml @@ -0,0 +1,256 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_P_ORIENTATION_RINGS_SAME> + <qual:polygonId>_Simple_BD.1_PG.1</qual:polygonId> + <qual:linearRingId>_Simple_BD.1_PG.1_Ring1</qual:linearRingId> + </qual:GE_P_ORIENTATION_RINGS_SAME> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_PolygonWrongOrientation.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_PolygonWrongOrientation.gml new file mode 100644 index 0000000000000000000000000000000000000000..3f1c4d808a55ae4459d6ab09693a78c21480e46c --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_PolygonWrongOrientation.gml @@ -0,0 +1,262 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + + <qual:validationResult result="ERROR"> + <qual:GE_S_POLYGON_WRONG_ORIENTATION> + <qual:geometryId>_Simple_BD.1_Geom1</qual:geometryId> + <qual:edges> + <qual:edge> + <qual:from>10.0 1.0 2.0</qual:from> + <qual:to>11.0 2.0 3.0</qual:to> + </qual:edge> + </qual:edges> + </qual:GE_S_POLYGON_WRONG_ORIENTATION> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid gml:id="_Simple_BD.1_Geom1"> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_RingNotClosed.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_RingNotClosed.gml new file mode 100644 index 0000000000000000000000000000000000000000..98555c12864ff5858320a563886147d6579db998 --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_RingNotClosed.gml @@ -0,0 +1,255 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_R_NOT_CLOSED> + <qual:linearRingId>_Simple_BD.1_PG.6_LR.1</qual:linearRingId> + </qual:GE_R_NOT_CLOSED> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_RingSelfIntersection.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_RingSelfIntersection.gml new file mode 100644 index 0000000000000000000000000000000000000000..d71bd02c0d0140bd9a4dc96971b105deecec92b5 --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_RingSelfIntersection.gml @@ -0,0 +1,261 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_R_SELF_INTERSECTION> + <qual:linearRingId>_Simple_BD.1_PG.6_LR.1</qual:linearRingId> + <qual:type>POINT_TOUCHES_EDGE</qual:type> + <qual:edge1> + <qual:from>10.0 11.0 12.0</qual:from> + <qual:to>11.0 4.0 0.0</qual:to> + </qual:edge1> + <qual:vertex1>5.0 6.0 7.0</qual:vertex1> + </qual:GE_R_SELF_INTERSECTION> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_SolidNotClosed.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_SolidNotClosed.gml new file mode 100644 index 0000000000000000000000000000000000000000..dcf6af8b18ebff0a5550a5d296b7181a72287ad7 --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_SolidNotClosed.gml @@ -0,0 +1,262 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + + <qual:validationResult result="ERROR"> + <qual:GE_S_NOT_CLOSED> + <qual:geometryId>_Simple_BD.1_Geom1</qual:geometryId> + <qual:edges> + <qual:edge> + <qual:from>10.0 1.0 2.0</qual:from> + <qual:to>11.0 2.0 3.0</qual:to> + </qual:edge> + </qual:edges> + </qual:GE_S_NOT_CLOSED> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid gml:id="_Simple_BD.1_Geom1"> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_SolidSelfIntersection.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_SolidSelfIntersection.gml new file mode 100644 index 0000000000000000000000000000000000000000..85e7baecfde9adb877ac7e36831ff13ee6ab5098 --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_SolidSelfIntersection.gml @@ -0,0 +1,257 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_S_SELF_INTERSECTION> + <qual:geometryId>_Simple_BD.1_Geom1</qual:geometryId> + <qual:polygonId1>_Simple_BD.1_PG.1</qual:polygonId1> + <qual:polygonId2>_Simple_BD.1_PG.2</qual:polygonId2> + </qual:GE_S_SELF_INTERSECTION> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid gml:id="_Simple_BD.1_Geom1"> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_TooFewPoints.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_TooFewPoints.gml new file mode 100644 index 0000000000000000000000000000000000000000..162faba2a835786505dc61f1a2493050cca5e3be --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_TooFewPoints.gml @@ -0,0 +1,255 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_R_TOO_FEW_POINTS> + <qual:linearRingId>_Simple_BD.1_PG.6_LR.1</qual:linearRingId> + </qual:GE_R_TOO_FEW_POINTS> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file diff --git a/citygml4j-quality-ade/src/test/resources/SimpleSolid_TooFewPolygons.gml b/citygml4j-quality-ade/src/test/resources/SimpleSolid_TooFewPolygons.gml new file mode 100644 index 0000000000000000000000000000000000000000..e27d1b43e81d57efc06cc747f488f331c6036e89 --- /dev/null +++ b/citygml4j-quality-ade/src/test/resources/SimpleSolid_TooFewPolygons.gml @@ -0,0 +1,255 @@ +<?xml version="1.0" encoding="utf-8"?> +<core:CityModel xmlns:core="http://www.opengis.net/citygml/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qual="https://transfer.hft-stuttgart.de/pages/qualityade/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd https://transfer.hft-stuttgart.de/pages/qualityade/0.1 https://transfer.hft-stuttgart.de/pages/qualityade/0.1/qualityAde.xsd"> + +<!-- +Einfaches Gebäude mit Grundriss 3m x 5m und Satteldach, Traufhöhe 3m, Firsthöhe 4,5m +Modelliert mit Begrenzungsflächen (eine Dachfläche, 4 Wandflächen, 1 Grundfläche), +die Gebäudegeometrie als Solid, der auf die Polygone der Begrenzungsflächen referenziert + +CityGML 2.0 + + +linear ring _Simple_BD.1_PG.6_LR.1 beinhaltet zwei aufeinander folgende Punkte, die identisch sind. + +10.5.2017 +Author: V. Coors, HFT Stuttgart +Lizenz: +--> + + <core:cityObjectMember> + <bldg:Building gml:id="_Simple_BD.1"> + <qual:validationResult result="ERROR"> + <qual:GE_S_TOO_FEW_POLYGONS> + <qual:geometryId>_Simple_BD.1_Geom1</qual:geometryId> + </qual:GE_S_TOO_FEW_POLYGONS> + </qual:validationResult> + <bldg:lod2Solid> + <gml:Solid gml:id="_Simple_BD.1_Geom1"> + <gml:exterior> + <gml:CompositeSurface> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.1"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.2"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.3"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.4"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.5"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.6"/> + <gml:surfaceMember xlink:href="#_Simple_BD.1_PG.7"/> + </gml:CompositeSurface> + </gml:exterior> + </gml:Solid> + </bldg:lod2Solid> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.2"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.2_LR.1"> + <gml:posList srsDimension="3"> + 13.0 15.0 0.0 + 13.0 15.0 3.0 + 13.0 10.0 3.0 + 13.0 10.0 0.0 + 13.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_2"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.3"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.3_LR.1"> + <gml:posList srsDimension="3"> + 10.0 15.0 0.0 + 10.0 15.0 3.0 + 11.5 15.0 4.5 + 13.0 15.0 3.0 + 13.0 15.0 0.0 + 10.0 15.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_3"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.4"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.4_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 10.0 15.0 3.0 + 10.0 15.0 0.0 + 10.0 10.0 0.0 + 10.0 10.0 3.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:WallSurface gml:id="_Simple_BD.1_WallSurface_4"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.5"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.5_LR.1"> + <gml:posList srsDimension="3"> + 13.0 10.0 0.0 + 13.0 10.0 3.0 + 11.5 10.0 4.5 + 10.0 10.0 3.0 + 10.0 10.0 0.0 + 13.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:WallSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:RoofSurface gml:id="_Simple_BD.1_RoofSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.6"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.6_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 3.0 + 11.5 10.0 4.5 + 11.5 10.0 4.5 + 11.5 15.0 4.5 + 10.0 15.0 3.0 + 10.0 10.0 3.0 + + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.7"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.7_LR.1"> + <gml:posList srsDimension="3"> + 11.5 10.0 4.5 + 13.0 10.0 3.0 + 13.0 15.0 3.0 + 11.5 15.0 4.5 + 11.5 10.0 4.5 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:RoofSurface> + </bldg:boundedBy> + <bldg:boundedBy> + <bldg:GroundSurface gml:id="_Simple_BD.1_GroundSurface_1"> + <bldg:lod2MultiSurface> + <gml:MultiSurface> + <gml:surfaceMember> + <gml:Polygon gml:id="_Simple_BD.1_PG.1"> + <gml:exterior> + <gml:LinearRing gml:id="_Simple_BD.1_PG.1_LR.1"> + <gml:posList srsDimension="3"> + 10.0 10.0 0.0 + 10.0 15.0 0.0 + 13.0 15.0 0.0 + 13.0 10.0 0.0 + 10.0 10.0 0.0 + </gml:posList> + </gml:LinearRing> + </gml:exterior> + </gml:Polygon> + </gml:surfaceMember> + </gml:MultiSurface> + </bldg:lod2MultiSurface> + </bldg:GroundSurface> + </bldg:boundedBy> + </bldg:Building> + </core:cityObjectMember> + <qual:validation> + <qual:validationDate>2002-05-30T09:00:00</qual:validationDate> + <qual:validationSoftware>CityDoctor2</qual:validationSoftware> + <qual:validationPlan> + <qual:globalParameters> + <qual:parameter name="numberOfRoundingPlaces">8</qual:parameter> + <qual:parameter name="minVertexDistance" uom="m">0.0001</qual:parameter> + <qual:parameter name="schematronFile"></qual:parameter> + </qual:globalParameters> + <qual:requirement name="R_GE_R_TOO_FEW_POINTS" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_R_CONSECUTIVE_POINTS_SAME" enabled="true"/> + <qual:requirement name="R_GE_R_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_R_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_P_NON_PLANAR" enabled="true"> + <qual:parameter name="type">distance</qual:parameter> + <qual:parameter name="distanceTolerance" uom="m">0.01</qual:parameter> + <qual:parameter name="angleTolerance" uom="deg">1</qual:parameter> + <qual:parameter name="degeneratedPolygonTolerance" uom="m">0.0000</qual:parameter> + </qual:requirement> + <qual:requirement name="R_GE_P_INTERIOR_DISCONNECTED" enabled="true"/> + <qual:requirement name="R_GE_P_INTERSECTING_RINGS" enabled="true"/> + <qual:requirement name="R_GE_P_HOLE_OUTSIDE" enabled="true"/> + <qual:requirement name="R_GE_P_ORIENTATION_RINGS_SAME" enabled="true"/> + <qual:requirement name="R_GE_P_INNER_RINGS_NESTED" enabled="true"/> + <qual:requirement name="R_GE_S_TOO_FEW_POLYGONS" enabled="true"/> + <qual:requirement name="R_GE_S_NOT_CLOSED" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_EDGE" enabled="true"/> + <qual:requirement name="R_GE_S_POLYGON_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_ALL_POLYGONS_WRONG_ORIENTATION" enabled="true"/> + <qual:requirement name="R_GE_S_NON_MANIFOLD_VERTEX" enabled="true"/> + <qual:requirement name="R_GE_S_SELF_INTERSECTION" enabled="true"/> + <qual:requirement name="R_GE_S_MULTIPLE_CONNECTED_COMPONENTS" enabled="true"/> + + <qual:filter> + <qual:checking>BUILDING</qual:checking> + <qual:checking>TRANSPORTATION</qual:checking> + <qual:checking>VEGETATION</qual:checking> + <qual:checking>BRIDGE</qual:checking> + <qual:checking>WATER</qual:checking> + <qual:checking>LAND</qual:checking> + </qual:filter> + </qual:validationPlan> + <qual:statistics> + <qual:numErrorBuildings numChecked="1">1</qual:numErrorBuildings> + <qual:numErrorVegetation numChecked="0">0</qual:numErrorVegetation> + <qual:numErrorLandObjects numChecked="0">0</qual:numErrorLandObjects> + <qual:numErrorBridgeObjects numChecked="0">0</qual:numErrorBridgeObjects> + <qual:numErrorWaterObjects numChecked="0">0</qual:numErrorWaterObjects> + <qual:numErrorTransportation numChecked="0">0</qual:numErrorTransportation> + <qual:errorStatistics> + <qual:error name="GE_R_CONSECUTIVE_POINTS_SAME">1</qual:error> + </qual:errorStatistics> + </qual:statistics> + </qual:validation> +</core:CityModel> \ No newline at end of file