Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
e8e84ba2
Commit
e8e84ba2
authored
Feb 09, 2026
by
Luna Riegel
Browse files
Feat: Add basis for topology checks
parent
30bade0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/RequirementType.java
View file @
e8e84ba2
...
@@ -28,6 +28,6 @@ package de.hft.stuttgart.citydoctor2.check;
...
@@ -28,6 +28,6 @@ package de.hft.stuttgart.citydoctor2.check;
*/
*/
public
enum
RequirementType
{
public
enum
RequirementType
{
GEOMETRY
,
SEMANTIC
GEOMETRY
,
SEMANTIC
,
TOPOLOGY
}
}
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java
View file @
e8e84ba2
...
@@ -47,6 +47,7 @@ import java.util.concurrent.ThreadPoolExecutor;
...
@@ -47,6 +47,7 @@ import java.util.concurrent.ThreadPoolExecutor;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
javax.annotation.Nonnull
;
import
javax.annotation.Nullable
;
import
javax.annotation.Nullable
;
import
javax.xml.XMLConstants
;
import
javax.xml.XMLConstants
;
import
javax.xml.transform.Result
;
import
javax.xml.transform.Result
;
...
@@ -59,6 +60,7 @@ import javax.xml.transform.dom.DOMSource;
...
@@ -59,6 +60,7 @@ import javax.xml.transform.dom.DOMSource;
import
javax.xml.transform.sax.SAXResult
;
import
javax.xml.transform.sax.SAXResult
;
import
javax.xml.transform.stream.StreamSource
;
import
javax.xml.transform.stream.StreamSource
;
import
de.hft.stuttgart.citydoctor2.checks.topology.TopologyCheck
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
...
@@ -210,6 +212,7 @@ public class Checker {
...
@@ -210,6 +212,7 @@ public class Checker {
Future
<
SvrlContentHandler
>
handlerFuture
=
executor
.
submit
(
schematronThread
);
Future
<
SvrlContentHandler
>
handlerFuture
=
executor
.
submit
(
schematronThread
);
executor
.
shutdown
();
executor
.
shutdown
();
TopologyCheck
.
registerCache
(
model
.
getCache
());
checkCityModel
(
model
,
l
);
checkCityModel
(
model
,
l
);
getSchematronResults
(
handlerFuture
,
l
);
getSchematronResults
(
handlerFuture
,
l
);
...
@@ -622,7 +625,7 @@ public class Checker {
...
@@ -622,7 +625,7 @@ public class Checker {
Map
<
CheckId
,
Map
<
String
,
String
>>
parameterMap
=
new
HashMap
<>();
Map
<
CheckId
,
Map
<
String
,
String
>>
parameterMap
=
new
HashMap
<>();
for
(
Entry
<
String
,
RequirementConfiguration
>
e
:
config
.
getRequirements
().
entrySet
())
{
for
(
Entry
<
String
,
RequirementConfiguration
>
e
:
config
.
getRequirements
().
entrySet
())
{
de
.
hft
.
stuttgart
.
citydoctor2
.
check
.
Requirement
req
=
Checks
.
getAvailableRequirements
().
get
(
e
.
getKey
());
de
.
hft
.
stuttgart
.
citydoctor2
.
check
.
Requirement
req
=
Checks
.
getAvailableRequirements
().
get
(
e
.
getKey
());
if
(
req
==
null
)
{
if
(
req
==
null
&&
logger
.
isWarnEnabled
()
)
{
logger
.
warn
(
Localization
.
getText
(
"Checker.noCheckSatisfiesRequirement"
),
logger
.
warn
(
Localization
.
getText
(
"Checker.noCheckSatisfiesRequirement"
),
e
.
getKey
());
e
.
getKey
());
}
else
{
}
else
{
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/topology/TopologyCheck.java
0 → 100644
View file @
e8e84ba2
package
de.hft.stuttgart.citydoctor2.checks.topology
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.database.CityObjectCache
;
/** Topology checks are a specific subclass of checks which check conditions, constraints and requirements between
* different Features within the same CityModel. As such they require access to multiple CityObjects to run, necessitating
* access to the CityObject cache for efficient memory usage.
* <p>
* The following terms will be used in the documentation of topological checks:
* <ul>
* <li>Subject: The Feature that is being checked
* <li>Candidate(s): Other Features that are being checked against the subject. Candidates are selected via spatial
* proximity, as Features that are too far away from the subject can't conflict topological requirements and can thus
* be safely skipped by the checks.
* <ul/>
*
* <p/>
*/
public
abstract
class
TopologyCheck
extends
Check
{
protected
static
CityObjectCache
registeredCache
;
public
static
void
registerCache
(
CityObjectCache
cache
){
registeredCache
=
cache
;
}
@Override
public
RequirementType
getType
()
{
return
RequirementType
.
TOPOLOGY
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment