randgeo-package: Random WKT or GeoJSON

randgeo-packageR Documentation

Random WKT or GeoJSON

Description

randgeo generates random points and shapes in GeoJSON and WKT formats for use in examples, teaching, or statistical applications.

Details

Points and shapes are generated in the long/lat coordinate system and with appropriate spherical geometry; random points are distributed evenly across the globe, and random shapes are sized according to a maximum great-circle distance from the center of the shape.

randgeo was adapted from https://github.com/tmcw/geojson-random to have a pure R implementation without any dependencies as well as appropriate geometry. Data generated by randgeo may be processed or displayed of with packages such as sf, wicket, geojson, wellknown, geojsonio, or lawn.

Package API

  • rg_position()- random position (lon, lat)

  • geo_point() - random GeoJSON point

  • geo_polygon() - random GeoJSON polygon

  • wkt_point() - random WKT point

  • wkt_polygon() - random WKT polygon

Author(s)

Scott Chamberlain (myrmecocystus@gmail.com)

Noam Ross (noam.ross@gmail.com)


ropensci/randgeo documentation built on Sept. 12, 2022, 2:01 p.m.