Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

객체 집합의 공간 필터

공간 조건은 SearchJsonQueryV2의 일부입니다. 속성 API 이름인 field 또는 PropertyIdentifier 중 하나를 지정하며 두 필드를 함께 넣지 않습니다.

조건별 입력

type선택하는 객체필수 입력
withinDistanceOf속성에 중심점으로부터 지정 거리 안의 점이 있음value.center, value.distance
withinBoundingBox속성에 경계 상자 안의 점이 있음value.topLeft, value.bottomRight
intersectsBoundingBox속성 도형이 경계 상자와 교차value.topLeft, value.bottomRight
doesNotIntersectBoundingBox속성 도형이 경계 상자와 교차하지 않음value.topLeft, value.bottomRight
withinPolygon속성에 다각형 안의 점이 있음value: Polygon
intersectsPolygon속성 도형이 다각형과 교차value: Polygon
doesNotIntersectPolygon속성 도형이 다각형과 교차하지 않음value: Polygon
geoShapeV2주어진 공간 관계를 만족geometry, spatialFilterMode

withinDistanceOf, 세 경계 상자 조건과 세 다각형 조건의 value 객체는 필수입니다. 점을 포함하는지 확인하는 within 계열의 설명과 도형의 교차를 확인하는 intersects 계열을 구분합니다.

Point와 좌표

점은 type: Point인 객체입니다. coordinates는 선택적인 Coordinate 목록이고 bbox는 선택적인 Coordinate 목록입니다. Coordinate는 숫자입니다.

Position은 좌표 한 위치를 나타내는 숫자 배열입니다. 최소 두 숫자가 필요하며 첫 두 값은 경도, 위도 순서로 십진수로 기록합니다. 세 번째 값으로 고도나 높이를 추가할 수 있습니다. 세 개를 넘는 값은 의미가 명확히 규정되어 있지 않아 확장을 권장하지 않습니다. 네 번째 값을 선형 참조 측정값(M)이나 시각으로 사용하더라도 파서가 이를 해석하지 못하거나 무시할 수 있습니다.

{"type": "Point", "coordinates": [-74.0, 40.5]}

GeoJSON의 선택적인 bbox는 n차원 도형에서 길이 2*n인 숫자 배열입니다. 가장 남서쪽 지점의 모든 축 값 다음에 가장 북동쪽 지점의 모든 축 값을 놓고, 축 순서는 도형 좌표의 축 순서와 같습니다. 경계 상자 쿼리의 topLeft와 bottomRight는 각각 왼쪽 위와 오른쪽 아래 점이므로 GeoJSON bbox 배열의 모서리 순서와 구분합니다.

거리

withinDistanceOf.value에는 필수 Point center와 필수 거리 객체 distance가 있습니다. 거리의 value는 필수 number이고 unit은 필수 enum입니다.

MILLIMETERS, CENTIMETERS, METERS, KILOMETERS,
INCHES, FEET, YARDS, MILES, NAUTICAL_MILES

형식 예시:

{
  "type": "withinDistanceOf",
  "propertyIdentifier": {"type": "property", "apiName": "location"},
  "value": {
    "center": {"type": "Point", "coordinates": [-74.0, 40.5]},
    "distance": {"value": 10.0, "unit": "KILOMETERS"}
  }
}

경계 상자

경계 상자 value는 두 Point 필드 topLeft, bottomRight를 모두 요구합니다.

{
  "type": "withinBoundingBox",
  "propertyIdentifier": {"type": "property", "apiName": "location"},
  "value": {
    "topLeft": {"type": "Point", "coordinates": [-74.0, 41.0]},
    "bottomRight": {"type": "Point", "coordinates": [-73.0, 40.0]}
  }
}

Polygon과 LinearRing

다각형은 type: Polygon인 객체입니다. 선택적인 coordinates는 LinearRing 목록이며 선택적인 bbox는 위의 GeoJSON 경계 배열입니다.

LinearRing은 네 개 이상의 위치를 갖는 닫힌 LineString입니다. 처음과 마지막 위치는 같은 값을 가져야 하며 표현도 같게 만드는 것이 권장됩니다. 각 위치는 위의 경도, 위도 및 선택적 고도 규칙을 따릅니다. 표면 경계와 구멍 경계에는 오른손 규칙을 적용하여 외곽 고리는 반시계 방향, 구멍은 시계 방향으로 배치합니다.

{
  "type": "withinPolygon",
  "propertyIdentifier": {"type": "property", "apiName": "location"},
  "value": {
    "type": "Polygon",
    "coordinates": [
      [[-74.0, 40.0], [-73.0, 40.0], [-73.0, 41.0], [-74.0, 41.0], [-74.0, 40.0]]
    ]
  }
}

geoShapeV2

geoShapeV2는 geopoint와 geoshape 속성을 경계 상자 또는 GeoJSON 도형으로 필터링합니다. geometry와 spatialFilterMode는 필수입니다.

spatialFilterMode일치 조건
INTERSECTS속성 도형이 지정한 도형과 교차
DISJOINT속성 도형이 지정한 도형과 교차하지 않음
WITHIN속성 도형이 지정한 도형 안에 있음
CONTAINS속성 도형이 지정한 도형을 포함

geometry.type: envelope는 필수 Point topLeft와 bottomRight를 갖습니다. geometry.type: geoJson은 필수 문자열 geoJson을 받습니다. 이 문자열 안에는 GeoJSON 도형을 JSON으로 인코딩합니다. 지원 도형 유형은 Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection입니다.

{
  "type": "geoShapeV2",
  "propertyIdentifier": {"type": "property", "apiName": "boundary"},
  "geometry": {
    "type": "geoJson",
    "geoJson": "{\"type\":\"Point\",\"coordinates\":[-74.0,40.5]}"
  },
  "spatialFilterMode": "CONTAINS"
}