Skip to contents

Main algorithm

Functions to run the full algorithm or separate split and merge steps.

desplim_split_merge()
Apply the DESPLIM algorithm to a set of input polygons and lines.
desplim_split()
Split a polygon based on a sf LINESTRING object and optional border connections.
desplim_merge()
Deterministically merge a set of polygons with possible parameters defined by the user.

Helper functions

Standalone functions to perform necessary geospatial operations

desplim_all_nodes()
Compute all nodes of an sf LINESTRING object
desplim_angles()
Calculate the minimum and maximum angles between two sf LINESTRING objects
desplim_cast_substring()
Cast an sf LINESTRING or MULTILINESTRING object to substrings
desplim_compactness()
Calculate the 'desplim' compactness of an sf POLYGON object
desplim_connect_border()
Connect a sf LINESTRING object to border nodes of an sf POLYGON object
desplim_leaf_nodes()
Identify leaf nodes of an sf LINESTRING object
desplim_line_nearest_node()
Calculate the minimum distance linestring from an sf POINT object to nodes of a sf LINESTRING object

Data

Example data used for testing and documentation

compact_train
Data used to model the DESPLIM compactness metric