Presentation is loading. Please wait.

Presentation is loading. Please wait.

Common Catalogue Query Language

Similar presentations


Presentation on theme: "Common Catalogue Query Language"— Presentation transcript:

1 Common Catalogue Query Language
천 동 석 충남대학교 컴퓨터공학과

2 Contents Query란? Filter란? Spatial Operators Comparison operators
Logical operators Filter Example Common Catalogue Query Reference

3 OGC catalogue UML static model

4 Query란? 클라이언트는 카탈로그 서비스에 메타데이터를 찾고 result set을 생성하는 쿼리를 수행하기 위하여 카탈로그에 요청 SQL SELECT에서 SQL WHERE를 기본으로 함

5 Filter란? SQL문의 WHERE 역할 Filter에 올수 있는 Operator spatialOps
comparisonOps logicalOps

6 Spatial Operators geometric 인자를 받아 공간관계를 만족하는지를 결정하는 오퍼레이터 타입
비교가 참이면 true 비교가 거짓이면 false 타입 BinarySpatialOpType DistanceBufferType BBOXType

7 Spatial Operators - BinarySpatialOpType
2개의 geometry 사이의 공관적 관계를 비교 종류 Equals Disjoint Touches Within Overlaps Crosses Intersects Intersects(g1, g2 ) ↔ Not (Disjoint(g1, g2 )) Contains Contains(g1, g2 ) ↔ Within(g2 , g1)

8 Spatial Operators - DistanceBufferType
geometric property의 값이 지정된 거리의 안인지 밖인지 test 거리는 <Distance>로 표현 예) <Distance unit=“ 종류 DWithin Beyond

9 Spatial Operators - BBOXType
bounding box의 간단한 표현 제공 종류 BBOX <BBOX> … </BBOX> = <Not><Disjoint> … </Disjoint></Not> Page17에 Example 3참고

10 Comparison operators 2개의 인자에 대해서 수학적 비교하는 오퍼레이터 타입 비교가 참이면 true
비교가 거짓이면 false 타입 BinaryComparisonOpType PropertyIsLikeType PropertyIsNullType PropertyIsBetweenType

11 Comparison operators - BinaryComparisonOpType
=, <, >, >=, <=, <> 을 이용하여 비교 종류 PropertyIsEqualTo PropertyIsNotEqualTo PropertyIsLessThan PropertyIsGreaterThan PropertyIsLessThanOrEqualTo PropertyIsGreaterThanOrEqualTo

12 Comparison operators - PropertyIsLikeType
String 패턴 매치 속성으로 wildCard, singleChar, escapeChar 지정 속성 wildCard : \ 0 or more characters singleChar : ? One character escapeChar : * more characters 종류 PropertyIsLike

13 Comparison operators – PropertyIsNullType
종류 PropertyIsNull

14 Comparison operators - PropertyIsBetweenType
범위 체크 예) lower and upper boundary 종류 PropertyIsBetween

15 Logical operators 1 또는 그 이상의 조건 표현식을 결합할 때 사용하는 오퍼레이터 종류 AND OR NOT
모두 참이어야 참 OR 여러 개 중에 한 개라도 참이면 참 NOT logical value를 반대로 표현

16 Filter Example

17 Example 1 A simple non-spatial filter checking to see if SomeProperty is equal to 100.

18 Example 2 A simple non-spatial filter comparing a property value to a literal. In this case, the DEPTH is checked to find instances where it is less than 30 - possibly to identify areas that need dredging.

19 Example 3 - 1 This example encodes a simple spatial filter. In this case we are finding all features that have a geometry that spatially interacts with the specified bounding box. The expression NOT DISJOINT is used to exclude all features that do not interact with the bounding box; in other words identify all the features that interact with the bounding box in some way.

20 Example 3 - 2 An alternative encoding of this filter could have used to <BBOX> element: <Filter> <BBOX> <PropertyName>Geometry</PropertyName> <gml:Envelope srsName=" <gml:lowerCorner> </gml:lowerCorner> <gml:upperCorner> </gml:upperCorner> </gml:Envelope> </BBOX> </Filter>

21 Example 4 In this example we combine examples 2 and 3 with the logical operator AND. The predicate is thus interpreted as seeking all features that interact with the specified bounding box and have a DEPTH value of less than 30 meters.

22 Example 5 The following filter includes the encoding of a function. This filter identifies all features where the sin() of the property named DISPERSION_ANGLE is 1.

23 Example 6 This example encodes a filter that includes an arithmetic expression. This filter is equivalent to the expression A = B

24 Example 7 This example encodes a filter using the BETWEEN operator. The filter identifies all features where the DEPTH is between 100 and 200 meters.

25 Example 8 This example is similar to example 9 except that in this case the filter is checking to see if the SAMPLE_DATE property is within a specified date range. The dates are represented as described in the Annex B of the Web Map Service Implementation Specification [6].

26 Example 9 This example encodes a filter using the LIKE operation to perform a pattern matching comparison. In this case, the filter identifies all features where the value of the property named LAST_NAME begins with the letters "JOHN".

27 ((FIELD1=10 OR FIELD1=20) AND (STATUS="VALID").
Example 10 In this example, a more complex scalar predicate is encoded using the logical operators AND and OR. The example is equivalent to the expression: ((FIELD1=10 OR FIELD1=20) AND (STATUS="VALID").

28 Example 11 The following example restricts the active set of objects to those instances of the Person type that are older than 50 years old and live in Toronto. This filter expression uses an XPath expression to reference the complex attributes of the Person type.

29 Common Catalogue Query

30 Example - Request

31 Response Type Brief, Summary and Full element sets defined
Brief : dc:identifier, dc:title, dc:type, ows:BoundingBox Summary : Brief + dc:subject, dc:format, dc:relation, dct:modified, dct:abstract, dct:spatial Full : 전체

32 Example – Response(Full)

33 Example – Response(Summary)

34 Example – Response(Brief)

35 Reference OpenGIS® Filter Encoding Implementation Specification
OpenGIS® Simple Features Specification OpenGIS Catalogue Service Implementation Specification


Download ppt "Common Catalogue Query Language"

Similar presentations


Ads by Google