select_region_spatialT_select_region_spatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial (Operator)

Name

select_region_spatialT_select_region_spatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial — 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)

def select_region_spatial(regions_1: HObject, regions_2: HObject, direction: str) -> Tuple[Sequence[int], Sequence[int]]

Beschreibung

select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial wählt die Regionen aus Regions2Regions2Regions2Regions2regions2regions_2 aus, die der Nachbarschaftsbeziehung DirectionDirectionDirectionDirectiondirectiondirection genügen. Die zu untersuchenden Regionen sind in Regions1Regions1Regions1Regions1regions1regions_1 bzw. Regions2Regions2Regions2Regions2regions2regions_2 zu übergeben. Regions1Regions1Regions1Regions1regions1regions_1 kann dabei auf drei verschiedene Arten besetzt werden:

Mögliche Werte für DirectionDirectionDirectionDirectiondirectiondirection sind:

'left':

Regions2Regions2Regions2Regions2regions2regions_2 ist links von Regions1Regions1Regions1Regions1regions1regions_1

'right':

Regions2Regions2Regions2Regions2regions2regions_2 ist rechts von Regions1Regions1Regions1Regions1regions1regions_1

'above':

Regions2Regions2Regions2Regions2regions2regions_2 ist oberhalb von Regions1Regions1Regions1Regions1regions1regions_1

'below':

Regions2Regions2Regions2Regions2regions2regions_2 ist unterhalb von Regions1Regions1Regions1Regions1regions1regions_1

select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial 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 RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1 und RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2, d.h. die Region mit Index RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2[n] steht mit Region mit Index RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1[n] in der angegebenen Relation. Der Zugriff auf Regionen über den Index kann mit copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj erfolgen.

Ausführungsinformationen

Parameter

Regions1Regions1Regions1Regions1regions1regions_1 (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Ausgangsregionen

Regions2Regions2Regions2Regions2regions2regions_2 (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Vergleichsregionen

DirectionDirectionDirectionDirectiondirectiondirection (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Gewünschte Nachbarschaftsbeziehung.

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

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

RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1 (output_control)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indizes in den Eingabetupeln (Regions1Regions1Regions1Regions1regions1regions_1 bzw. Regions2Regions2Regions2Regions2regions2regions_2).

RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2 (output_control)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indizes in den Eingabetupeln (Regions1Regions1Regions1Regions1regions1regions_1 bzw. Regions2Regions2Regions2Regions2regions2regions_2).

Ergebnis

select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial liefert den Wert TRUE, falls Regions2Regions2Regions2Regions2regions2regions_2 nicht leer ist. Das Verhalten bei leerem Parameter Regions2Regions2Regions2Regions2regions2regions_2 (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>)set_system("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>)set_system("empty_region_result",<Result>) bestimmt. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

Alternativen

area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, intersectionintersectionIntersectionIntersectionIntersectionintersection

Siehe auch

spatial_relationspatial_relationSpatialRelationSpatialRelationSpatialRelationspatial_relation, find_neighborsfind_neighborsFindNeighborsFindNeighborsFindNeighborsfind_neighbors, copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj, obj_to_integerobj_to_integerObjToIntegerObjToIntegerObjToIntegerobj_to_integer

Modul

Foundation