spatial_relationT_spatial_relationSpatialRelationSpatialRelationspatial_relation (Operator)

Name

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

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

Beschreibung

spatial_relationspatial_relationSpatialRelationSpatialRelationspatial_relation wählt Regionen aus, die um PercentPercentPercentpercentpercent Prozent „links“, „rechts“, „oberhalb“ oder „unterhalb“ von anderen Regionen liegen. Regions1Regions1Regions1regions1regions_1 und Regions2Regions2Regions2regions2regions_2 enthalten die zu vergleichenden Regionen. Regions1Regions1Regions1regions1regions_1 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 RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1 und RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2. Zusätzlich enthalten die Ausgabeparameter Relation1Relation1Relation1relation1relation_1 und Relation2Relation2Relation2relation2relation_2 an n-ter Position die Art der Relation, in der das Regionenpaar (RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1[n], RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2[n]) steht, d.h. Region mit Index RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2[n] steht mit Region mit Index RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1[n] in der Relation1Relation1Relation1relation1relation_1[n] und Relation2Relation2Relation2relation2relation_2[n].

Mögliche Werte für Relation1Relation1Relation1relation1relation_1 und Relation2Relation2Relation2relation2relation_2 sind:

In RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1 und RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2 werden die Indizes der Regionen in den Tupeln der Eingaberegionen (Regions1Regions1Regions1regions1regions_1 bzw. Regions2Regions2Regions2regions2regions_2) als Bildidentifikatoren eingetragen. Der Zugriff auf ausgewählte Regionen über den Index kann mit copy_objcopy_objCopyObjCopyObjcopy_obj erfolgen.

Ausführungsinformationen

Parameter

Regions1Regions1Regions1regions1regions_1 (input_object)  region(-array) objectHRegionHObjectHObjectHobject

Ausgangsregionen.

Regions2Regions2Regions2regions2regions_2 (input_object)  region(-array) objectHRegionHObjectHObjectHobject

Vergleichsregionen.

PercentPercentPercentpercentpercent (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

Default: 50

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

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

Minimale Schrittweite: 1

Empfohlene Schrittweite: 10

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

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

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

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

Relation1Relation1Relation1relation1relation_1 (output_control)  string-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Horizontale Lagerelation, in der RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2[n] mit RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1[n] steht.

Relation2Relation2Relation2relation2relation_2 (output_control)  string-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Vertikale Lagerelation, in der RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2[n] mit RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1[n] steht.

Ergebnis

spatial_relationspatial_relationSpatialRelationSpatialRelationspatial_relation liefert den Wert 2 ( H_MSG_TRUE) , falls Regions2Regions2Regions2regions2regions_2 nicht leer und PercentPercentPercentpercentpercent korrekt besetzt ist. Das Verhalten bei leerem Parameter Regions2Regions2Regions2regions2regions_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>)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>)set_system("empty_region_result",<Result>) bestimmt. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

thresholdthresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionconnection

Alternativen

area_centerarea_centerAreaCenterAreaCenterarea_center, intersectionintersectionIntersectionIntersectionintersection

Siehe auch

select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial, find_neighborsfind_neighborsFindNeighborsFindNeighborsfind_neighbors, copy_objcopy_objCopyObjCopyObjcopy_obj, obj_to_integerobj_to_integerObjToIntegerObjToIntegerobj_to_integer

Modul

Foundation