select_region_spatialT_select_region_spatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial (算子)

名称

select_region_spatialT_select_region_spatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial — 区域的姿态关系。

签名

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   ( Windows only)

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]]

描述

算子 select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial chooses the regions from Regions2Regions2Regions2Regions2regions2regions_2 which are sufficient for the neighboring relation DirectionDirectionDirectionDirectiondirectiondirection. The regions to be examined have to be passed in Regions1Regions1Regions1Regions1regions1regions_1 or Regions2Regions2Regions2Regions2regions2regions_2, respectively. Regions1Regions1Regions1Regions1regions1regions_1 can have three different states:

Possible values for DirectionDirectionDirectionDirectiondirectiondirection are:

'left':

Regions2Regions2Regions2Regions2regions2regions_2 is left of Regions1Regions1Regions1Regions1regions1regions_1

'right':

Regions2Regions2Regions2Regions2regions2regions_2 is right of Regions1Regions1Regions1Regions1regions1regions_1

'above':

Regions2Regions2Regions2Regions2regions2regions_2 is above Regions1Regions1Regions1Regions1regions1regions_1

'below':

Regions2Regions2Regions2Regions2regions2regions_2 is below Regions1Regions1Regions1Regions1regions1regions_1

算子 select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial calculates the centers of the regions to be compared and decides according to the angle between the center straight lines and the x axis whether the direction relation is fulfilled. The relation is fulfilled within the area of -45 degree to +45 degree around the coordinate axes. Thus, the direction relation can be understood in such a way that the center of the second region must be located left (or right, above, below) of the center of the first region. The indices of the regions fulfilling the direction relation are located at the n-th position in RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1 and RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2, i.e., the region with the index RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2[n] has the indicated relation with the region with the index RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1[n]. Access to regions via the index can be obtained via the operator copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj

执行信息

参数

Regions1Regions1Regions1Regions1regions1regions_1 (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Starting regions

Regions2Regions2Regions2Regions2regions2regions_2 (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Comparative regions

DirectionDirectionDirectionDirectiondirectiondirection (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Desired neighboring relation.

默认值: 'left' "left" "left" "left" "left" "left"

值列表: '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 (输出控制)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indices in the input tuples (Regions1Regions1Regions1Regions1regions1regions_1 or Regions2Regions2Regions2Regions2regions2regions_2), respectively.

RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2 (输出控制)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indices in the input tuples (Regions1Regions1Regions1Regions1regions1regions_1 or Regions2Regions2Regions2Regions2regions2regions_2), respectively.

结果

算子 select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial 返回值 2 ( H_MSG_TRUE) if Regions2Regions2Regions2Regions2regions2regions_2 is not empty. The behavior in case of empty parameter Regions2Regions2Regions2Regions2regions2regions_2 (no input regions available) is set via the operator 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>)。空区域(区域是空集)的情况下的可设置行为通过 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>)。如有必要,则抛出异常。

可能的前趋

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

替代

area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, intersectionintersectionIntersectionIntersectionIntersectionintersection

另见

spatial_relationspatial_relationSpatialRelationSpatialRelationSpatialRelationspatial_relation, find_neighborsfind_neighborsFindNeighborsFindNeighborsFindNeighborsfind_neighbors, copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj, obj_to_integerobj_to_integerObjToIntegerObjToIntegerObjToIntegerobj_to_integer

模块

基础