checkgeometry: Check Geometry

View source: R/fun_checking.R

checkgeometryR Documentation

Check Geometry

Description

This function checks the geometry type of a spatial object, and casts to the desired geometry (POLYGON or POINT). Also makes the geometries valid. Used mostly before operations requiring single-part polygon geometry. If intersections return linestrings, triangles or points, those are dropped.

Usage

checkgeometry(x, target = "POLYGON")

Arguments

x

Simple features spatial object, or list of sf objects

target

EPSG code of desired end projection, default British National Grid, or another sf object whose projection you want to match

Value

sf object with desired geometry type.


ecoservR/ecoserv_tool documentation built on April 5, 2025, 1:49 a.m.