knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of howzat is to convert spatial objects to WKT (Well-Known-Text) geometry format.
WIP: supremely unuseable and untested for now.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("mdsumner/howzat")
This is a basic example which shows you how to solve a common problem:
library(howzat) library(silicate) ## just for data examples library(sf) ## just to verify the formatting wkt(sfzoo$polygon) wkt(sfzoo$polygon) == st_as_text(sfzoo$polygon) wkt(st_sfc(sfzoo$multipolygon, sfzoo$multipolygon + 10)) wkt(st_sf(a = 1, g = st_sfc(sfzoo$multipolygon))) wkt(sfzoo$multilinestring) wkt(sfzoo$multilinestring) == st_as_text(sfzoo$multilinestring) wkt(sfzoo$linestring) wkt(sfzoo$linestring) == st_as_text(sfzoo$linestring) wkt(sfzoo$multipoint) wkt(sfzoo$multipoint) == st_as_text(sfzoo$multipoint) wkt(sfzoo$point) wkt(sfzoo$point) == st_as_text(sfzoo$point) wkt(sfzoo$multipolygon) wkt(sfzoo$multipolygon) == st_as_text(sfzoo$multipolygon)
Please note that the 'howzat' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.