select_region_spatialT_select_region_spatialSelectRegionSpatialSelectRegionSpatial (Operator)

Name

select_region_spatialT_select_region_spatialSelectRegionSpatialSelectRegionSpatial — Ermitteln der Lagebeziehung von Regionen.

Signatur

select_region_spatial(Regions1, Regions2 : : Direction : RegionIndex1, RegionIndex2)

Herror T_select_region_spatial(const Hobject Regions1, const Hobject Regions2, const Htuple Direction, Htuple* RegionIndex1, Htuple* RegionIndex2)

void SelectRegionSpatial(const HObject& Regions1, const HObject& Regions2, const HTuple& Direction, HTuple* RegionIndex1, HTuple* RegionIndex2)

HTuple HRegion::SelectRegionSpatial(const HRegion& Regions2, const HString& Direction, HTuple* RegionIndex2) const

HTuple HRegion::SelectRegionSpatial(const HRegion& Regions2, const char* Direction, HTuple* RegionIndex2) const

HTuple HRegion::SelectRegionSpatial(const HRegion& Regions2, const wchar_t* Direction, HTuple* RegionIndex2) const   (Nur Windows)

static void HOperatorSet.SelectRegionSpatial(HObject regions1, HObject regions2, HTuple direction, out HTuple regionIndex1, out HTuple regionIndex2)

HTuple HRegion.SelectRegionSpatial(HRegion regions2, string direction, out HTuple regionIndex2)

Beschreibung

select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatial wählt die Regionen aus Regions2Regions2Regions2Regions2regions2 aus, die der Nachbarschaftsbeziehung DirectionDirectionDirectionDirectiondirection genügen. Die zu untersuchenden Regionen sind in Regions1Regions1Regions1Regions1regions1 bzw. Regions2Regions2Regions2Regions2regions2 zu übergeben. Regions1Regions1Regions1Regions1regions1 kann dabei auf drei verschiedene Arten besetzt werden:

Mögliche Werte für DirectionDirectionDirectionDirectiondirection sind:

'left':

Regions2Regions2Regions2Regions2regions2 ist links von Regions1Regions1Regions1Regions1regions1

'right':

Regions2Regions2Regions2Regions2regions2 ist rechts von Regions1Regions1Regions1Regions1regions1

'above':

Regions2Regions2Regions2Regions2regions2 ist oberhalb von Regions1Regions1Regions1Regions1regions1

'below':

Regions2Regions2Regions2Regions2regions2 ist unterhalb von Regions1Regions1Regions1Regions1regions1

select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatial berechnet die Schwerpunkte der zu vergleichenden Regionen und entscheidet anhand des Winkels zwischen der Schwerpunktgeraden und der x-Achse, ob die Richtungsbeziehung erfüllt ist. Die Relation ist jeweils in dem Bereich von -45 Grad bis +45 Grad um die Koordinatenachsen erfüllt. Die Richtungsrelation ist also so zu verstehen, dass der Schwerpunkt der zweiten Region links (bzw. rechts, oben, unten) vom Schwerpunkt der ersten Region liegen muss. Die Indizes der Regionen, die die Richtungsbeziehung erfüllen, stehen an n-ter Position in RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1 und RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2, d.h. die Region mit Index RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2[n] steht mit Region mit Index RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1[n] in der angegebenen Relation. Der Zugriff auf 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

DirectionDirectionDirectionDirectiondirection (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Gewünschte Nachbarschaftsbeziehung.

Defaultwert: 'left' "left" "left" "left" "left"

Werteliste: 'above'"above""above""above""above", 'below'"below""below""below""below", 'left'"left""left""left""left", 'right'"right""right""right""right"

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

Indizes in den Eingabetupeln (Regions1Regions1Regions1Regions1regions1 bzw. Regions2Regions2Regions2Regions2regions2).

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

Indizes in den Eingabetupeln (Regions1Regions1Regions1Regions1regions1 bzw. Regions2Regions2Regions2Regions2regions2).

Ergebnis

select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatial liefert den Wert 2 (H_MSG_TRUE), falls Regions2Regions2Regions2Regions2regions2 nicht leer 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

spatial_relationspatial_relationSpatialRelationSpatialRelationSpatialRelation, find_neighborsfind_neighborsFindNeighborsFindNeighborsFindNeighbors, copy_objcopy_objCopyObjCopyObjCopyObj, obj_to_integerobj_to_integerObjToIntegerObjToIntegerObjToInteger

Modul

Foundation