Hui Hu Ph.D.
Department of Epidemiology
College of Public Health and Health Professions & College of Medicine
January 22, 2020
1
2
3
C
A
B
INNER JOIN
=
2
3
A
B
1
2
3
C
A
B
LEFT JOIN
=
2
3
A
B
1
1
2
3
C
A
B
RIGHT JOIN
=
2
3
A
B
1
2
3
C
A
B
<<FULL>> JOIN
=
2
3
A
B
1
C
C
Day |
---|
Jan 01 |
Jan 02 |
... |
Jan 30 |
Jan 31 |
Individual | Int_day |
---|---|
Ind 1 | Jan 10 |
Ind 2 | Jan 11 |
Ind 3 | Jan 12 |
JOIN
=
Day | Individual |
---|---|
Jan 10 | Ind 1 |
Jan 11 | Ind 1 |
Jan 11 | Ind 2 |
Jan 12 | Ind 1 |
Jan 12 | Ind 2 |
Jan 12 | Ind 3 |
... | ... |
Jan 31 | Ind 1 |
Jan 31 | Ind 2 |
Jan 31 | Ind 3 |
ON Day>=Int_day
Day |
---|
Jan 01 |
Jan 02 |
... |
Jan 30 |
Jan 31 |
Day |
---|
Feb 1 |
Feb 2 |
Feb 3 |
Jan 01 |
UNION
=
Day |
---|
Jan 1 |
Jan 2 |
Jan 3 |
... |
Jan 31 |
Feb 1 |
Feb 2 |
Feb 3 |
Day |
---|
Jan 01 |
Jan 02 |
... |
Jan 30 |
Jan 31 |
Day |
---|
Feb 1 |
Feb 2 |
Feb 3 |
Jan 01 |
UNION ALL
=
Day |
---|
Jan 1 |
Jan 2 |
Jan 3 |
... |
Jan 31 |
Feb 1 |
Feb 2 |
Feb 3 |
Jan 01 |
We can represent all geographical entities in 2D using 3 building blocks:
Point
Line
Polygon
Similar to geometry, but account for the curvature of the earth
Vector Model
- points, lines, polygons
- geometry and geography type
Raster Model
- exhaustive regular or irregular partitioning of space
Points
Lines
EPSG is a very recent SRS numbering system
- If you are using data from a few decades ago, you won't find EPSG number
The constituent pieces that form an SRS:
- ellipsoid
- datum
- projection
Taking an ellipsoidal earth and squashing it onto a flat surface
Cylindrical projections
Conic projections
Azimuthal projections
geometry(POINT,4326)
data type
subtype type modifier
SRID type modifier
POINT
POINTZ
POINTM
POINTZM
LINESTRING
LINESTRINGZ
LINESTRINGM
LINESTRINGZM
POLYGON