validate_wkt takes a vector of WKT objects and validates them,
returning a data.frame containing the status of each entry and
(in the case it cannot be parsed) any comments as to what, in particular, may be
wrong with it. It does not, unfortunately, check whether the object meets the WKT
spec - merely that it is formatted correctly.
a character vector of WKT objects.
a data.frame of two columns,
is_valid (containing TRUE or FALSE values
for whether the WKT object is parseable and valid) and
comments (containing any error messages
in the case that the WKT object is not). If the objects are simply NA,
both fields will contain NA.
sp_convert for generating valid WKT objects from SpatialPolygons
and SpatialPolygonDataFrames, or
wkt_correct for correcting WKT objects
that fail validity checks due to having a non-default orientation.
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.