Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdsumner/howzat
https://github.com/mdsumner/howzat
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mdsumner/howzat
- Owner: mdsumner
- Created: 2019-11-02T00:16:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-02T01:10:15.000Z (about 5 years ago)
- Last Synced: 2024-08-05T03:27:00.317Z (3 months ago)
- Language: R
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# howzat
[![Travis build status](https://travis-ci.org/mdsumner/howzat.svg?branch=master)](https://travis-ci.org/mdsumner/howzat)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/mdsumner/howzat?branch=master&svg=true)](https://ci.appveyor.com/project/mdsumner/howzat)
[![Codecov test coverage](https://codecov.io/gh/mdsumner/howzat/branch/master/graph/badge.svg)](https://codecov.io/gh/mdsumner/howzat?branch=master)The goal of howzat is to convert spatial objects to [WKT (Well-Known-Text) geometry format](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry).
WIP: supremely unuseable and untested for now.
## Installation
You can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("mdsumner/howzat")
```
## ExampleThis is a basic example which shows you how to solve a common problem:
```{r example}
library(howzat)library(silicate) ## just for data examples
library(sf) ## just to verify the formattingwkt(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](CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.