spatial_relationT_spatial_relationSpatialRelationSpatialRelation (Operator)

Name

spatial_relationT_spatial_relationSpatialRelationSpatialRelation — Ermitteln der Lagebeziehung von Regionen bzgl. der Koordinatenachsen.

Signatur

spatial_relation(Regions1, Regions2 : : Percent : RegionIndex1, RegionIndex2, Relation1, Relation2)

Herror T_spatial_relation(const Hobject Regions1, const Hobject Regions2, const Htuple Percent, Htuple* RegionIndex1, Htuple* RegionIndex2, Htuple* Relation1, Htuple* Relation2)

void SpatialRelation(const HObject& Regions1, const HObject& Regions2, const HTuple& Percent, HTuple* RegionIndex1, HTuple* RegionIndex2, HTuple* Relation1, HTuple* Relation2)

HTuple HRegion::SpatialRelation(const HRegion& Regions2, Hlong Percent, HTuple* RegionIndex2, HTuple* Relation1, HTuple* Relation2) const

static void HOperatorSet.SpatialRelation(HObject regions1, HObject regions2, HTuple percent, out HTuple regionIndex1, out HTuple regionIndex2, out HTuple relation1, out HTuple relation2)

HTuple HRegion.SpatialRelation(HRegion regions2, int percent, out HTuple regionIndex2, out HTuple relation1, out HTuple relation2)

Beschreibung

spatial_relationspatial_relationSpatialRelationSpatialRelationSpatialRelation wählt Regionen aus, die um PercentPercentPercentPercentpercent Prozent „links“, „rechts“, „oberhalb“ oder „unterhalb“ von anderen Regionen liegen. Regions1Regions1Regions1Regions1regions1 und Regions2Regions2Regions2Regions2regions2 enthalten die zu vergleichenden Regionen. Regions1Regions1Regions1Regions1regions1 kann dabei auf drei verschiedene Arten besetzt werden:

Der Prozentsatz PercentPercentPercentPercentpercent wird so interpretiert, dass die Fläche der zweiten Region um mindestens PercentPercentPercentPercentpercent Prozent echt links/rechts bzw. oberhalb/unterhalb der Regionengrenzen der ersten Region liegen muss. Die Indizes der Regionen, die mindestens eine dieser Bedingungen erfüllen, stehen dann an n-ter Position in den Ausgabeparametern RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1 und RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2. Zusätzlich enthalten die Ausgabeparameter Relation1Relation1Relation1Relation1relation1 und Relation2Relation2Relation2Relation2relation2 an n-ter Position die Art der Relation, in der das Regionenpaar (RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1[n], RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2[n]) steht, d.h. Region mit Index RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2[n] steht mit Region mit Index RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1[n] in der Relation1Relation1Relation1Relation1relation1[n] und Relation2Relation2Relation2Relation2relation2[n].

Mögliche Werte für Relation1Relation1Relation1Relation1relation1 und Relation2Relation2Relation2Relation2relation2 sind:

Relation1:

'left', 'right' oder “

Relation2:

'above', 'below' oder “

In RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1 und RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2 werden die Indizes der Regionen in den Tupeln der Eingaberegionen (Regions1Regions1Regions1Regions1regions1 bzw. Regions2Regions2Regions2Regions2regions2) als Bildidentifikatoren eingetragen. Der Zugriff auf ausgewählte Regionen über den Index kann mit copy_objcopy_objCopyObjCopyObjCopyObj erfolgen.

Ausführungsinformationen

Parameter

Regions1Regions1Regions1Regions1regions1 (input_object)  region(-array) objectHRegionHRegionHobject

Ausgangsregionen.

Regions2Regions2Regions2Regions2regions2 (input_object)  region(-array) objectHRegionHRegionHobject

Vergleichsregionen.

PercentPercentPercentPercentpercent (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Prozentzahl der Fläche der Vergleichsregion, die links/rechts bzw. oberhalb/unterhalb der Regionengrenzen der Ausgangsregion liegen muss.

Defaultwert: 50

Wertevorschläge: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100

Typischer Wertebereich: 0 ≤ Percent Percent Percent Percent percent ≤ 100 (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 10

Restriktion: 0 <= Percent && Percent <= 100

RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1 (output_control)  integer-array HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indizes der Regionen im Tupel der Eingaberegionen, die die Lagerelation erfüllen.

RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2 (output_control)  integer-array HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indizes der Regionen im Tupel der Eingaberegionen, die die Lagerelation erfüllen.

Relation1Relation1Relation1Relation1relation1 (output_control)  string-array HTupleHTupleHtuple (string) (string) (HString) (char*)

Horizontale Lagerelation, in der RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2[n] mit RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1[n] steht.

Relation2Relation2Relation2Relation2relation2 (output_control)  string-array HTupleHTupleHtuple (string) (string) (HString) (char*)

Vertikale Lagerelation, in der RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2[n] mit RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1[n] steht.

Ergebnis

spatial_relationspatial_relationSpatialRelationSpatialRelationSpatialRelation liefert den Wert 2 (H_MSG_TRUE), falls Regions2Regions2Regions2Regions2regions2 nicht leer und PercentPercentPercentPercentpercent korrekt besetzt ist. Das Verhalten bei leerem Parameter Regions2Regions2Regions2Regions2regions2 (keine Eingaberegionen vorhanden) lässt sich mittels set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>) festlegen. Das Verhalten bei einer leeren Region (Region ist die leere Menge) wird mit set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>) bestimmt. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

thresholdthresholdThresholdThresholdThreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowing, connectionconnectionConnectionConnectionConnection

Alternativen

area_centerarea_centerAreaCenterAreaCenterAreaCenter, intersectionintersectionIntersectionIntersectionIntersection

Siehe auch

select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatial, find_neighborsfind_neighborsFindNeighborsFindNeighborsFindNeighbors, copy_objcopy_objCopyObjCopyObjCopyObj, obj_to_integerobj_to_integerObjToIntegerObjToIntegerObjToInteger

Modul

Foundation