Hallo zusammen,
ich habe ein Problem mit einem Constraint, dass die Funktion covers aus dem DMAVTYM_Topologie_V1_0.ili verwendet.
hier ist mein Modell ili:
INTERLIS 2.4;
MODEL Testmodell_A AT „http://example.org“ VERSION „2026-06-08“ =
IMPORTS GeometryCHLV95_V2;
IMPORTS DMAVTYM_Topologie_V1_0;
TOPIC Abc =
BASKET OID AS INTERLIS.UUIDOID;
OID AS INTERLIS.UUIDOID;
STRUCTURE Typ =
Verlauf: MANDATORY GeometryCHLV95_V2.Line;
Art: MANDATORY (
a,
b,
c );
END Typ;
CLASS Testklasse =
Geometrie: MANDATORY SURFACE WITH (STRAIGHTS, ARCS) VERTEX GeometryCHLV95_V2.Coord2
WITHOUT OVERLAPS > 0.002;
Typtasche: BAG {0..*} OF Typ;
MANDATORY CONSTRAINT C001: DMAVTYM_Topologie_V1_0.covers(THIS,>>Geometrie,Typtasche,>>Typ->Verlauf);
END Testklasse;
END Abc;
END Testmodell_A.
hier sind die an sich fehlerfreien Daten:
<ili:datasection>
<Testmodell_A:Abc ili:bid="20260608-0000-0000-0000-000000000000">
<Testmodell_A:Testklasse ili:tid="296e5b74-60b2-48ed-aa41-24b3b235b39b">
<Testmodell_A:Geometrie>
<geom:surface>
<geom:exterior>
<geom:polyline>
<geom:coord>
<geom:c1>2754111.644</geom:c1>
<geom:c2>1260415.062</geom:c2>
</geom:coord>
<geom:coord>
<geom:c1>2754112.762</geom:c1>
<geom:c2>1260417.737</geom:c2>
</geom:coord>
<geom:coord>
<geom:c1>2754110.475</geom:c1>
<geom:c2>1260418.694</geom:c2>
</geom:coord>
<geom:coord>
<geom:c1>2754109.356</geom:c1>
<geom:c2>1260416.019</geom:c2>
</geom:coord>
<geom:coord>
<geom:c1>2754111.644</geom:c1>
<geom:c2>1260415.062</geom:c2>
</geom:coord>
</geom:polyline>
</geom:exterior>
</geom:surface>
</Testmodell_A:Geometrie>
<Testmodell_A:Typtasche>
<Testmodell_A:Typ>
<Testmodell_A:Verlauf>
<geom:polyline>
<geom:coord>
<geom:c1>2754109.356</geom:c1>
<geom:c2>1260416.019</geom:c2>
</geom:coord>
<geom:coord>
<geom:c1>2754111.644</geom:c1>
<geom:c2>1260415.062</geom:c2>
</geom:coord>
</geom:polyline>
</Testmodell_A:Verlauf>
<Testmodell_A:Art>a</Testmodell_A:Art>
</Testmodell_A:Typ>
<Testmodell_A:Typ>
<Testmodell_A:Verlauf>
<geom:polyline>
<geom:coord>
<geom:c1>2754112.762</geom:c1>
<geom:c2>1260417.737</geom:c2>
</geom:coord>
<geom:coord>
<geom:c1>2754110.475</geom:c1>
<geom:c2>1260418.694</geom:c2>
</geom:coord>
</geom:polyline>
</Testmodell_A:Verlauf>
<Testmodell_A:Art>b</Testmodell_A:Art>
</Testmodell_A:Typ>
</Testmodell_A:Typtasche>
</Testmodell_A:Testklasse>
</Testmodell_A:Abc>
</ili:datasection>
Trotzdem bekomme ich mit ilivalidator 1.15.0 diesen Fehler:
Error: line 13: Testmodell_A.Abc.Testklasse: tid 296e5b74-60b2-48ed-aa41-24b3b235b39b: Mandatory Constraint Testmodell_A.Abc.Testklasse.C001 is not true.Error: line 13: Testmodell_A.Abc.Testklasse: tid 296e5b74-60b2-48ed-aa41-24b3b235b39b: Mandatory Constraint Testmodell_A.Abc.Testklasse.C001 is not true.
Woran liegt das? Kann die Funktion wirklich nur MultiLines testen, nicht aber mehrere Linien in einem BAG (was ja eigentlich das gleiche wäre)?
die Funktion aus dem DMAVTYM_Topologie_V1_0.ili:
FUNCTION covers(
SurfaceObjects: CLASS;
SurfaceAttr: ATTRIBUTE;
MultiLineObject: ANYSTRUCTURE;
MultiLineAttr: ATTRIBUTE): BOOLEAN;
hier noch die Daten:
Testmodell_A.ili (737 Bytes)
Testmodell_A_Beispiel.xtf (2,7 KB)