tailieunhanh - InformatIon ScIence Reference Part 2
Miền topo đóng cửa hình học a, b áp dụng đối với A / A, L / L, L / A, P, / A và P / nhóm L của mối quan hệ. a và b áp dụng đối với P / L, P / A, L / L và L / A. | Querying GML Table 1. Definition of predicates Domain Operator Topologically closed geometries Disjoint a b a n b 0 a and b applies to the A A L L L A P A and P L groups of relationships. Touches a b I a nI b 0 A a n b 0 a and b applies to the P L P A L L and L A. Crosses a b dim I a n I b max dim I a dim I b A a n b a A a n b b a and b applies to the A A P A L A L L Within a b a n b a A I a nI b 0 a and b applies to the A A P A L A L L Contains a b Within b a a and b applies to the A A P A L A L L Intersects a b a b distances between spatial objects and calculating relative direction. Some other forms of spatial predicates are realized as a set of functions. The basic syntax of GML-QL is the same as that of XQuery with added spatial functions. The following are some examples of GML-QL queries. Query 1 List the name population and area of each country for the file . FOR c IN document RETURN Country GML name c Name text GML name pop c pop pop area Area c shape area Country Query 2 The St. Lawrence River can supply water to the cities which are within 300 km if needed. List the cities which can use water from the St. Lawrence. This query illustrates buffer analysis and spatial join operations. FOR r IN document c IN document WHERE overlap buffer r Shape 300 c Shape 1 RETURN CityName cname c Name cname CityName Both queries use expressions similar to those of XQuery. In the first example document function opens the country. XML document and binds the value of every country element in that document to variable c. Finally the result is constructed as defined in the return clause. The values obtained from the query which is bound to the variable can be used to construct new elements in the result if necessary. In this example a function area is used to calculate the area of a country. The second example illustrates buffer analysis and spatial joins operations by using overlap and buffer functions. Although Vatsavai
đang nạp các trang xem trước