Commit 51c58d36 authored by Matthias Betz's avatar Matthias Betz
Browse files

Release 0.1.0 of citygml4j-quality-ade plugin

parent 84999154
Pipeline #1886 passed with stage
in 5 seconds
/*-
* 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;
}
}
/*-
* 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;
}
}
/*-
* 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;
}
}
/*-
* 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;
}
}
/*-
* 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 + "]";
}
}
/*-
* 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;
}
}
/*-
* 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
}
/*-
* 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 {
}
/*-
* 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;
}
}
/*-
* 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();
}
}
/*-
* 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;
}
}
/*-
* 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;
/*-
* 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;
}
}
<?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
/*-
* 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();
}
}
}
<?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
<?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
<?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
<?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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment