# Geometric Operations

Using shapely operations inside mundi.py

## Common Shapely Operations

### Boolean operations

These shapely operations can be used in conditionals.

### Shape generators

These methods create a new shapely geometry based on the relationship between the passed geometries.

### Shape modifiers

These methods return a modified version of `object`

after a transformation.

### Properties

These properties are defined on all shapely geometries.

`length`

and `area`

use units of meters and square meters when appropriate.### Methods

Calculate a result based on two geometries.

## Invalid Geometries

Mundipy gracefully resolves invalid geometries during spatial operations
with the `shapely.make_valid`

method. This means datasets require no
pre-processing for spatial operations.

Many real-world datasets encode geometries with invalid sets of points. This triggers errors like the following in LibGEOS:

```
GEOSException: TopologyException: Input geom 1 is invalid: Ring Self-intersection
```

Validating an entire dataset pre-emptively with `.buffer(0)`

or `shapely.make_valid`

is an expensive preprocessing step. Mundipy avoids this by catching `GEOSException`

in spatial operations and automatically re-trying the operation with a valid geometry.