This code provides various functions for processing and analyzing geographical and satellite data using the Earth Engine and Turf.js libraries. It includes functions for land cover parsing, shoreline extraction, cloud masking, and vegetation index calculations.
## Dependencies
-`earth-engine` (imported as `ee`)
-`@turf/turf` (imported as `turf`)
-`../../common/satellites` (imported as `satellite`)
## Functions
### `landParsing`
Parses land cover data to determine intersections and distances.
**Parameters:**
-`landcover` (Object): The land cover data.
-`sidesCoords` (Array): Coordinates of the sides.
-`centerCoord` (Array): Center coordinates.
-`shoreline` (Object): Shoreline geometry.
**Returns:**
- Object containing parsed land cover data.
### `landParsingTurf`
Similar to `landParsing` but uses Turf.js for geometric operations.
**Parameters:**
-`landcover` (Object): The land cover data.
-`sidesCoords` (Array): Coordinates of the sides.
-`centerCoord` (Array): Center coordinates.
-`shoreline` (Object): Shoreline geometry.
**Returns:**
- Object containing parsed land cover data.
### `extractShoreLine`
Extracts the shoreline from baseline coordinates and water geometry.
**Parameters:**
-`baseLineCoords` (Array): Baseline coordinates.
-`waterGeometry` (Object): Water geometry.
**Returns:**
- Shoreline geometry.
### `extractShoreLineTurf`
Similar to `extractShoreLine` but uses Turf.js for geometric operations.
**Parameters:**
-`baseLine` (Object): Baseline geometry.
-`waterGeometry` (Object): Water geometry.
**Returns:**
- Shoreline geometry.
### `landCoversIntersections`
Calculates intersections of land covers along a transect.
**Parameters:**
-`transect` (Object): Transect data.
-`landcoversdata` (Array): Land cover data.
-`shoreLine` (Object): Shoreline geometry.
-`year` (Number): Year of the data.
**Returns:**
- Object containing land cover intersections.
### `landCoversIntersectionsTurf`
Similar to `landCoversIntersections` but uses Turf.js for geometric operations.
**Parameters:**
-`transect` (Object): Transect data.
-`landcoversdata` (Array): Land cover data.
-`shoreLine` (Object): Shoreline geometry.
-`year` (Number): Year of the data.
**Returns:**
- Object containing land cover intersections.
### `filterElevation`
Filters an image based on elevation.
**Parameters:**
-`image` (Object): The image to filter.
-`elevation` (Number): Elevation threshold.
-`type` (String, optional): Type of filtering.
-`satellite` (String, optional): Satellite name.
**Returns:**
- Filtered image.
### `applyScaleFactors`
Applies scale factors to an image.
**Parameters:**
-`image` (Object): The image to scale.
**Returns:**
- Scaled image.
### `getMapBiomasClassificationsList`
Retrieves a list of MapBiomas classifications.
**Returns:**
- Array of classification IDs.
### `getMapBiomasClassificationYear`
Retrieves MapBiomas classification for a specific year.