BINARY operations on GDFs

Jetzt loslegen. Gratis!
oder registrieren mit Ihrer E-Mail-Adresse
BINARY operations on GDFs von Mind Map: BINARY operations on GDFs

1. Distance

1.1. between

1.1.1. points

1.1.2. lines

1.1.3. polygons

1.1.4. and their combinations

1.2. using distances

1.2.1. filtering

1.2.1.1. who is further away by X kms from Y?

1.2.2. summarizing

1.2.2.1. all distances from one GDF to one location in another GDF

1.2.2.2. Distance matrix between GDFs

1.2.2.3. summary stats

1.2.2.4. finding farthest/closest neighbor

1.2.2.4.1. idxmax

1.2.2.4.2. idxmin available too!

1.3. CRS should be projected

2. Clipping

2.1. use a mask to cut an input geometry

2.1.1. the mask (clip feature) usually a polygon

2.2. DF filters using attributes

2.2.1. clipping helps when filtering-attributes are NOT available in a GDF to create a layer. Below, the river does not say to WHICH country it belongs:

2.2.1.1. only geometries are used

2.2.1.1.1. see..

2.3. CRS

2.3.1. not necessarily projected

2.3.1.1. good practice to use projected CRS

3. Spatial Joins

3.1. the 'spatial merging'

3.1.1. DOES NOT create GEOMETRIES

3.1.1.1. keeps rows of both GDFs

3.1.1.1.1. leftGDF

3.1.1.1.2. rightGDF

3.1.1.1.3. both indexes are kept, left **geometries remain intact**. right geometries are left out.

3.1.1.2. geometries have no modification after being selected

3.2. What is **KEPT** depends on HOW the join is requested

3.2.1. left

3.2.1.1. keeps all rows in left GDF

3.2.1.1.1. missing values added

3.2.1.1.2. right rows that meet condition are kept

3.2.2. right

3.2.2.1. keeps all rows in right GDF

3.2.2.1.1. missing values added

3.2.2.1.2. left rows that meet condition are kept

3.2.3. inner (default)

3.2.3.1. keeps all rows in left/right in GDFs that meet condition

3.2.4. outer

3.2.4.1. keeps all rows in left/right in GDFs

3.2.4.1.1. missing values added where no condition is met

3.3. Geometries kept ...

3.3.1. ...fulfill the **predicate condition**

3.3.1.1. within

3.3.1.1.1. left_df _within_ right_df

3.3.1.2. contains

3.3.1.2.1. left_df _contains_ right_df

3.3.1.3. intersects

3.3.1.3.1. left_df _intersects_ right_df

3.3.1.4. touches

3.3.1.4.1. left_df _touches_ right_df

3.3.1.5. crosses

3.3.1.5.1. left_df _crosses_ right_df

3.4. CRS should be projected

4. Spatial Overlay

4.1. Different than SJOIN

4.1.1. Generally a new geometry is created (new set of points **out of** the original GDFs). The result depend on the "HOW" condition.

4.1.1.1. leftGDF (df1)

4.1.1.2. rightGDF(df2)

4.1.1.3. Notice the geometries are different than above (using _intersection_ in "HOW")

4.1.2. attributes form GDFs remain, might not be meaninful

4.1.3. Spatial overlays ARE more sensitive to topological issues than joins.

4.1.3.1. geometries created may not reveal true results...

4.1.3.1.1. while they may help detect quality issues.

4.2. INPUT GDFs

4.2.1. North Brazil

4.2.1.1. South Brazil

4.2.2. West Brazil

4.2.2.1. East Brazil

4.3. the HOW

4.3.1. commutative operation

4.3.1.1. Intersection

4.3.1.1.1. geometries (set of points) that are common in both GDFs

4.3.1.2. Union

4.3.1.2.1. adds up (no dissolving) geometries (set of points) from both GDFs

4.3.1.3. Symmetric Difference

4.3.1.3.1. keep geometries (set of points) that belong to GDF1 and GDF2, but not in their intersection

4.3.2. non-commutative operation

4.3.2.1. Difference

4.3.2.1.1. keep geometries (set of points) from GDF1, that do not belong to GDF2

4.4. OUTPUT GEOMETRY

4.4.1. same as GDF1 geometry

4.4.1.1. if keep_geom_type=**True**

4.4.1.2. helps consistency, cost of integrity

4.4.2. Polygons, Lines, Points, and even Collections (combination of polygons, lines, points)

4.4.2.1. if keep_geom_type=**False**

4.4.2.2. most real result, but problematic

4.4.3. You will discover in the output that your source maps present issues

4.4.3.1. Overshoots / Undershoots

4.4.3.2. Sliver Polygons

4.4.3.3. Invalid Geometries