geoaxe v0.1.0

0

Monthly downloads

0th

Percentile

Split 'Geospatial' Objects into Pieces

Split 'geospatial' objects into pieces. Includes support for some spatial object inputs, 'Well-Known Text', and 'GeoJSON'.

Readme

geoaxe

Build Status Build status codecov.io rstudio mirror downloads

geoaxe - split geospatial objects into pieces

Install

devtools::install_github("ropenscilabs/geoaxe")
library("geoaxe")
library("sp")

Spatial Polygons and friends input

Works for only SpatialPolygons for now, but aim to include related classes soon.

library("rgeos")
wkt <- "POLYGON((-180 -20, -140 55, 10 0, -140 -60, -180 -20))"
poly <- rgeos::readWKT(wkt)
polys <- chop(x = poly)

Plot original polygon

plot(poly, lwd = 6)

plot of chunk unnamed-chunk-5

Add chopped up polygon bits

plot(polys, add = TRUE)

plot of chunk unnamed-chunk-6

Well-Known Text input

wkt <- "POLYGON((-180 -20, -140 55, 10 0, -140 -60, -180 -20))"
plot(chop(wkt))

plot of chunk unnamed-chunk-8

Manipulate number of cells

plots go left to right, then down, and repeat

layout(matrix(c(1,2,3,4), 2, 2, byrow = TRUE))
par(mar = c(1, 0, 1, 0))
plot(chop(wkt, n = 10))
plot(chop(wkt, n = 15))
plot(chop(wkt, n = 20))
plot(chop(wkt, n = 50))

plot of chunk unnamed-chunk-10

Manipulate cell size

plots go left to right, then down, and repeat

layout(matrix(1:8, 4, 2, byrow = TRUE))
par(mar = c(1, 0, 1, 0))
plot(chop(wkt, size = 2))
plot(chop(wkt, size = 4))
plot(chop(wkt, size = 8))
plot(chop(wkt, size = 15))
plot(chop(wkt, size = 25))
plot(chop(wkt, size = 50))
plot(chop(wkt, size = 100))
plot(chop(wkt, size = 200))

plot of chunk unnamed-chunk-12

Meta

Functions in geoaxe

Name Description
geoaxe-package Split geospatial objects into pieces
chop Split polygon into many
to_wkt To WKT
No Results!

Vignettes of geoaxe

Name
img/unnamed-chunk-11-1.png
img/unnamed-chunk-13-1.png
img/unnamed-chunk-6-1.png
img/unnamed-chunk-7-1.png
img/unnamed-chunk-9-1.png
geoaxe_vignette.Rmd
No Results!

Last month downloads

Details

License MIT + file LICENSE
URL https://github.com/ropenscilabs/geoaxe
BugReports https://github.com/ropenscilabs/geoaxe/issues
VignetteBuilder knitr
RoxygenNote 5.0.1
NeedsCompilation no
Packaged 2016-02-19 00:25:56 UTC; sacmac
Repository CRAN
Date/Publication 2016-02-19 08:49:59

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/geoaxe)](http://www.rdocumentation.org/packages/geoaxe)