All functions

bbox_from_points()

Create an sf bounding box from a list of longitude and latitudes

bbox_from_vector()

Create an sf bounding box from a vector with (xmin,ymin,ymax,ymax)

bbox_polygon()

Create a st_polygon from a bounding box

bbox_validation()

Util to check if the bbox polygon produced is valid or not

cache_csv_sf_wrapper()

Cache function that works with csvs of sf (SHP) files

getCentroids()

Get the long/lat of centroids of sf object (adds 2 new columns if they do not already exist)

getVoronoiInterpolation()

Get a piecewise constant inerpolation based on the voronoi diagram

get_polygon_heatmap()

Create polygons that represent a 2D density out of points or centroid of polygons

get_zipped_remote_shapefile()

Download a (zipped) shp file from a url

remove_line_endpoints()

Removes the endpoints for a collection of LINESTRINGS

remove_line_endpoints_from_split()

Splits line into segments using SfSpHelpers::split_lines and then removes the first and last segments (if possible) and then groups the line string by id

remove_line_endpoints_lwgeom()

Get a substring from a linestring

scale_geom_df()

Scale an sf object with *POLYGON geometry

scale_geom_sfc()

Scale an individual sfc

sfSpHelpers

SfSpHelpers is an R package for routine spatial operations that can be reused in different contexts

spatialKMeans()

Smooth/thin out a large number of points or polygons by taking a spatially weighted k means

split_lines()

split lines

split_lines_remove_line_endpoints()

Splits line into segments using SfSpHelpers::split_lines and then removes the first and last segments (if possible)

st_kde()

Produce a 2D kernel density estimate based on some POINTS geometry

st_linestring_add_endpoints()

Add start and end points to a sf linestring object

st_linestring_to_sf_linestring_endpoints()

Convenience function over st_linestring_add_endpoints and st_sf_linestring_from_points Takes a potentially complicated linestring and converts it into a simple linestring based only on the *endpoints* of the initial linestring (keeps the geometry as LINESTRING)

st_sf_linestring_from_points()

From a df where each row represents an edge in 2D of the form (lng_1,lat_1), (lng_2,lat_2), create an sf object with LINESTRING geometry

unionShpBuffer()

Create a buffer around an sf object + merge the resulting polygons using st_union

voronoi_polygon()

Voronoi Diagram from Data Frame