Utilities to Handle WKT Spatial Data

Utilities to generate bounding boxes from 'WKT' (Well-Known Text) objects and R data types, validate 'WKT' objects and convert object types from the 'sp' package into 'WKT' representations.

Travis-CI Build Status downloads

wicket is a little package to make handling Well-Known Text (WKT) data easier in R, letting you easily:

  1. Validate WKT data;
  2. Generate WKT bounding boxes from R data types, and;
  3. Convert sp objects (particularly SpatialPolygons and SpatialPolygonDataFrames) into WKT.

The package is mostly built out of C++, and as such can perform all of these operations extremely fast, to the tune of 100,000 sp-to-WKT conversions in just over a second. For more information, see the introductory vignette.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


The package can be installed via:


For the release version, and:


For the development version.



  • is_valid now has enhanced validity checks
  • The function wkt_correct has been introduced to allow the correction of reversed WKT objects
  • Miscellaneous documentation improvements


  • lat/lng output columns have been reversed in wkt_coords and wkt_centroid to match WKT structure (#15)
  • wkt_centroid now notes an implicit assumption that it is being passed cartesian values (#14)


  • Centroid extraction made available through wkt_centroid
  • Coordinate extraction made available through wkt_coords


  • Initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.4.0 by Oliver Keyes, 3 years ago


Report a bug at https://github.com/ropensci/wicket/issues

Browse source code at https://github.com/cran/wicket

Authors: Oliver Keyes [aut, cre]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports Rcpp

Suggests testthat, knitr, rmarkdown

Linking to Rcpp, BH

See at CRAN