Title: | Create a hatched area for SpatialPolygons |
---|---|
Description: | This package allows to create a area filled by SpatialLines to allow for hatched areas in SpatialPolygons. This may be particularly useful when SpatialPolygons show holes but also for drawing hatched areas in leaflet Polygons. |
Authors: | Sébastien Rochette [aut, cre], Gregory R. Warnes [ctb] |
Maintainer: | Sébastien Rochette <[email protected]> |
License: | GPL-3 |
Version: | 0.3.0.9000 |
Built: | 2024-11-21 04:25:41 UTC |
Source: | https://github.com/statnmap/HatchedPolygons |
Return a SpatialLinesDataframe as hatched area for a SpatialPolygons
hatched.SpatialPolygons(x, density = 10, angle = 45, fillOddEven = FALSE)
hatched.SpatialPolygons(x, density = 10, angle = 45, fillOddEven = FALSE)
x |
SpatialPolygons* from library sp |
density |
the density of shading lines, in lines per inch. The
default value of |
angle |
the slope of shading lines, given as an angle in degrees (counter-clockwise). |
fillOddEven |
logical controlling the polygon shading mode: see
below for details. Default |
Create hatch area of one polygon
polygon.fullhatch( x, y = NULL, density, angle, ..debug.hatch = FALSE, fillOddEven = FALSE, ... )
polygon.fullhatch( x, y = NULL, density, angle, ..debug.hatch = FALSE, fillOddEven = FALSE, ... )
x , y
|
vectors containing the coordinates of the vertices of the polygon. |
density |
the density of shading lines, in lines per inch. The
default value of |
angle |
the slope of shading lines, given as an angle in degrees (counter-clockwise). |
..debug.hatch |
for drawing when debugging function |
fillOddEven |
logical controlling the polygon shading mode: see
below for details. Default |
... |
graphical parameters such as |
## Not run: res <- polygon.fullhatch(x, density = 10, angle = 45) arrows(res$lx1, res$ly1, res$lx2, res$ly2, col = "red", code = 0) ## End(Not run)
## Not run: res <- polygon.fullhatch(x, density = 10, angle = 45) arrows(res$lx1, res$ly1, res$lx2, res$ly2, col = "red", code = 0) ## End(Not run)
Create one line for hatch area of one polygon
polygon.onehatch( x, y, x0, y0, xd, yd, ..debug.hatch = FALSE, fillOddEven = FALSE, ... )
polygon.onehatch( x, y, x0, y0, xd, yd, ..debug.hatch = FALSE, fillOddEven = FALSE, ... )
x , y
|
vectors containing the coordinates of the vertices of the polygon. |
x0 |
parameter as issued from |
y0 |
parameter as issued from |
xd |
parameter as issued from |
yd |
parameter as issued from |
..debug.hatch |
for drawing when debugging function |
fillOddEven |
logical controlling the polygon shading mode: see
below for details. Default |
... |
graphical parameters such as |
Get SpatialLines of one Polygons feature
polygonRingHolesLines( Sr, density = 0.5, angle = 45, ID = 1, fillOddEven = FALSE )
polygonRingHolesLines( Sr, density = 0.5, angle = 45, ID = 1, fillOddEven = FALSE )
Sr |
An object of class Polygons |
density |
the density of shading lines, in lines per inch. The
default value of |
angle |
the slope of shading lines, given as an angle in degrees (counter-clockwise). |
ID |
Number or string identifying the Polygon inside Polygons |
fillOddEven |
logical controlling the polygon shading mode: see
below for details. Default |