Download presentation
Presentation is loading. Please wait.
1
GEOG 60 – Introduction to Geographic Information Systems Professor: Dr. Jean-Paul Rodrigue Topic 5 – Spatial Querying and Measurement A – Querying Features of a Spatial Database B – Querying Using Spatial Attributes C – Measuring Length and Shape D – Measuring Distance
2
Conditions of Usage ■For personal and classroom use only Excludes any other forms of communication such as conference presentations, published reports and papers. ■No modification and redistribution permitted Cannot be published, in whole or in part, in any form (printed or electronic) and on any media without consent. ■Citation Dr. Jean-Paul Rodrigue, Dept. of Economics & Geography, Hofstra University.
3
Querying Features of a Spatial Database ■1. What is Querying? ■2. Basic Operators ■3. Boolean Search ■4. Successive Search A A
4
What is Querying? ■Narrowing down information A GIS is composed of a database. Spatial attributes linked to their features. Most GIS have a huge list of records. Impossible to find manually the information needed. Need an automated procedure to extract from the database the records useful for a task. Very important task in any DBMS. 1 1 GIS Database Records Query results Query Relevant records
5
What is Querying? ■DBMS Strategy Using fields in a database to find records satisfying at set of conditions. Conditions are defined by operators applied to fields. Logical operation. Operators either return True of False. Records that are true are selected (“flagged”). Records that are false are discarded. 1 1 Age 23 47 19 35 Age < 30 Operator: Age 23 47 19 35
6
Search results “True” records Search results What is Querying? ■Search space Set of all records in a database. Information over which a query is performed. ■Search result Set of all records that satisfy a query. All records that are True. A search result can become a search space. 1 1 “True” records “False” records Search space “False” records
7
Basic Operators ■Equivalence A record must be equal to a condition. Record name always put in brackets []. = symbol used. ([State_name] = “California”). Wildcards can be used for equivalence. Applies only to strings. * is the multiple character wildcard. ? is the single character wildcard. ([Owner_name] = “M*”). ([Owner_name] = “?erry”). 2 2
8
Basic Operators ■Difference A record must be different from a condition. This difference is either a numeric or alphanumeric. A bounding value (BV) is required. > greater than BV; < lesser than BV. >= greater of equal to BV; <= lesser or equal to BV. ([City_name] >= "m" ). ([Pop97] < 10000). 2 2
9
Basic Operators ■Mathematical Used in conjunction with equivalence and difference. Perform an operation the record value must satisfy to. Standard addition (+), subtraction (-), multiplication (*) and division (/). Priority in operation. * and / have the highest. + and - have the lowest. Putting operations in parentheses prioritize them. ([Pop97] / [Area] >= 25). ([Netvalue]> [Area] * ([Price] + [Tax])) 2 2
10
Boolean Operators ■Combination of conditions Either True or false. Exclusion: And is an intersection of two sets. ([area] > 1500) and ( [b_room] > 3). Inclusion: Or is an union of two sets. ([age] 65). Subtraction: Not is a subtraction from one set of another set. ([sub_region] = "N Eng") and ( not ( [state_name] = "Maine")). 3 3
11
Boolean Operators Set ASet B AND Set ASet BSelection True Yes TrueFalseNo FalseTrueNo False No 3 3 California Pacific Coast
12
Boolean Operators Set ASet BOR Set ASet BSelection True Yes TrueFalseYes FalseTrueYes False No 3 3 California Nevada
13
Boolean Operators Set A NOT Set ASet BSelection True No TrueFalseYes FalseTrueNo False No Set B 3 3 California Los Angeles
14
Successive Query ■New Set Makes a new selected set containing the features or records selected in a query. Features or records not in this set are deselected. ■Add To Set Adds the features or records selected in a query to the existing selected set. Widens a selection. ■Select From Set Selects the features or records in a query from the existing selected set. Only those features or records in this existing set that are selected in a query will remain in the selected set. Narrows down a selection. 4 4
15
Successive Query New Set Add to Set Select from Set Records Selected Records Selected Records Selected Records Selected Records Selected Records Query 4 4
16
Querying Using Spatial Attributes ■1. Querying Based on Proximity ■2. Querying Based on Membership ■3. Querying Based on Intersection B B
17
Querying Based on Proximity 1 1 Search distance Search radius Adjacency
18
Querying Based on Membership 2 2
19
Querying Based on Intersection 3 3 Intersection of a line Intersection of a shape
20
Measuring Length and Shape ■1. Spatial Measurements Levels ■2. Measurements of Linear Objects ■3. Measurements of Polygonal Objects C C
21
Spatial Measurements Levels ■Qualitative level Descriptive classes with no ranking. Land cover classes (urban, water, vegetation). ■Ordinal level Qualitative ranking of nominal classes. Tree crown sizes (small, medium, or large crowns). ■Quantitative level Ordered values or classes with numeric value. Absolute numbers. Area of state counties, density. 1 1
22
Spatial Measurements Levels PointLineArea Quantitative Ordinal Qualitative 5 10 15 Each dot represents 500 persons Proportional symbols Large Medium Small Town Airport Flow Contour 304050 Highway Road Street Road Boundary River 100 20 Population density High impact Low impact Swamp Desert Forrest 1 1
23
Spatial Measurements Levels ■Classifying Data: Ratios Number in one class (fa) over the number of another class (fb). Denoted as fa / fb. # of males / # of females. ■Classifying Data: Proportions Number in one class (fa) over total in population (N). Denoted as fa / N. # of males / # of males and females. 1 1
24
Measurements of Linear Objects ■About points We can only measure the length of objects have one or more dimensions. Points only have no dimension. Impossible the measure the length of points. ■Lines One dimensional objects. At least one segment between two points. Possible to calculate the length of lines. The more points representing a line, the more accurate will be the computation of length. 2 2
25
Measurements of Linear Objects ■Planar length Length = sum (√((X 2 -X 1 ) 2 + (Y 2 -Y 1 ) 2 ) for all segments. Length = √ ((3-1) 2 + (2-1) 2 )) + √ ((5-3) 2 + (1-2) 2 ). Length = √ (4+1) + √ (4 +1) Length = 4.47 2 2 (1,1) (3,2) (5,1) 2.2
26
Measurements of Linear Objects ■Problems with the geographical space Not a plane. The real length if often more because of elevation changes. Must take account of the effects of altitude. Trigonometric calculation. Increase the complexity because of computational and data requirements. Straight distance Effects of elevation 2 2
27
Measurements of Linear Objects ■Sinuosity Ratio of the straight-line distance over the true distance. Also known as the detour index. Does not describe a specific sinuosity. An index of 1 would imply no sinuosity. The smaller the ratio, the more sinuosity. 15 / 23 = 0.65 2 2 Straight distance (15 miles) True distance (23 miles)
28
Measurements of Linear Objects ■Radius sinuosity Using the radius of a circle. The summation of radiuses would define sinuosity. No sinuosity would mean an infinite number. r 2 2
29
Measurements of Polygonal Objects ■Polygons Two dimensional objects. More measures are available. Perimeter. Area. Length. ■Length of polygons Orientation of the polygon is important. Indication of some geographical process. Growth or decline of a glacier. Urban growth. Forest growth or decline. 3 3
30
Measurements of Polygonal Objects Major axis The axe along the longest part of the polygon. Must divide the polygon in two equal parts. Minor axis The axe along the shortest part of the polygon. Must divide the polygon in two equal parts. Major axis / Minor axis ratio Values higher than 1 denote an elongated polygon. A value of 1 denotes a uniform polygon. Major axis Minor axis 1.5 2.5 R = 1 3.5 R = 2.33 2.5 3 3
31
Measurements of Polygonal Objects ■Perimeter Length of all segments in a closed polygon. Length of the contact surface (exposition) of a feature with other features. Shoreline of a lake. Exposition of a forest. Building a fence. ■Area A quantitative expression of a surface. Used to compare the geographical importance of some attributes. A powerful relative value. Area Perimeter 3 3
32
Measurements of Polygonal Objects ■Areas and the geographical space Does not consider the topography. Computation requires a digital elevation model. Dividing the space in triangles and using trigonometry. Theory Reality 3 3
33
3 3 A B C D E Measurements of Polygonal Objects ■Centroid Point at the exact geographic center of an area. Also known as the center of gravity. When the area is a rectangle or a circle, the centroid is easy to find. ■Geometric center Smallest circle rule. Trapezoid rule.
34
Measurements of Polygonal Objects ■Mean Center Find the centroid of a set of coordinates. Each coordinate has the same importance. The average value of X and Y coordinates. C = x/n, y/n n is the number of coordinates. x and y are the respective coordinate values. Mean Center 3 3
35
Measurements of Polygonal Objects ■Weighted Mean Center Find the centroid of a set of coordinates Each coordinate has a different importance. The weighted average value of X and Y coordinates. C = (x*f)/n, (y*f)/n n is the number of coordinates. f is the weighting factor. x and y are the respective coordinate values. Weighted Mean Center 3 3
36
Measurements of Polygonal Objects ■Spatial integrity The level of perforation / fragmentation of a polygon. Contiguity: An unbroken polygon of a similar feature. Perforation: A polygon surrounding other polygons (donut effect). Fragmentation: Polygons of a similar feature surrounded by another polygon. 3 3 Perforated polygon Fragmented polygons
37
Measurements of Polygonal Objects ■Euler number Measure of the amount of perforation and fragmentation in a region. EN = holes – (fragments – 1). Positive values are perforated. Negative values are fragmented. EN = 3 - (1-1) EN = 3 EN = 0 - (3-1) EN = -2 3 3
38
Measurements of Polygonal Objects ■Convexity index CI = Perimeter / Area. A perimeter/area ratio is an expression of the geographical complexity of a polygon. A high ratio means a complex polygon, while a low ratio means a simple polygon. Area = 25 sqr miles Perimeter = 7 miles CI = 7 / 25 = 0.28 Area = 25 sqr miles Perimeter = 15 miles CI = 15 / 25 = 0.60 3 3
39
Measuring Distance ■1. Simple Distance ■2. Great Circle Distance ■3. Functional Distance D D
40
Simple Distance ■Vector data Use Pythagoras. Accumulate for all segments. Advantage: Uses ground units. Disadvantage: Floating point and computational. ■Raster Count pixels. Track lines and count. Eliminate redundant pixels and count. Advantages: Quick. Disadvantage: Inaccurate. 1 1
41
Simple Distance ■Isotropy of space Considers that the characteristics of space are uniform in any direction. Calculated with the Euclidean distance. 1 1
42
Great Circle Distance ■Context On a sphere the shortest path between two points is calculated by the great circle distance. An arc linking two points on a sphere. Establish the shortest path to use when traveling at the intercontinental level. Shortest route is the one following the curve of the planet, along the parallels. Because of the distortions caused by projections on flat paper a straight line on a map is not necessarily the shortest distance. Ships and aircraft usually fallow the great circle geometry to minimize distance and save time and money to customers. 2 2
43
Great Circle Distance ■The Great Circle Distance (D) on a sphere cos D = (sin a sin b) + (cos a cos b cos |c|) a and b are the latitudes of the respective coordinates |c| is the absolute value of the difference of longitude between the respective coordinates. 2 2
44
The Great Circle Distance between New York and Moscow New York Moscow 40’45”N 73’59”W 55’45”N 37’36”E Cos (D) = (Sin a Sin b) + (Cos a Cos b Cos |c|) Sin a = Sin (40.5) = 0.649 Sin b = Sin (55.5) = 0.824 Cos a = Cos (40.5) = 0.760 Cos b = Cos (55.5) = 0.566 Cos c = Cos (73.66 + 37.4) = -0.359 Cos (D) = 0.535 – 0.154 = 0.381 D = 67.631 degrees 1 degree = 111.32 km, so D = 7528.66 km 2 2
45
Functional Distance ■Concept Space is not isotropic for most phenomena. Absolute barriers. Stop movements / interactions completely. Mountain ranges. Rivers / oceans. Relative barriers. Friction that varies according to direction and to features of space. Slope. Type of roads. Border. 3 3
46
Absolute and Relative Barriers AB Absolute Barrier AB Relative Barrier Friction Low High 3 3
47
1 3 a b Functional Distance: Effect of Topography on Route Selection Low elevation Medium elevation High elevation 2 c 3 3
48
Functional Distance (absolute barrier) 3 3 Sea Land a b p1 a b p4 12 a b p2 3 R {C(sea) = C(land)} R1 {C(sea) > C(land)} R2 {C(sea) < C(land)} p2 p3 p4 R (sea) R (land) R (sea) R (land) R2 (sea) R1 (sea) R1 (land) R2 (land) R { C(land) > C(sea)}
49
Cost Minimization and Efficiency Maximization Low High Costs Efficiency Low High Compromise 3 3
50
Multi-Criteria Decision-Thinking Process in Route Selection Multi-Criteria Decision Physical Environmental Economic Political Route Selection CONSTRAINTS C1 C2 C3 C4 R=f(C1,C2,C3,C4) 3 3
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.