create_Hashes {CCAMLRGIS}R Documentation

Create Hashes

Description

Create hashed lines to fill a polygon.

Usage

create_Hashes(pol, angle = 45, spacing = 1, width = 1)

Arguments

pol

single polygon inside which hashed lines will be created. May be created using create_Polys or by subsetting an object obtained using one of the load_ functions.

angle

numeric, angle of the hashed lines in degrees (0-360), noting that the function might struggle with angles 0, 180, -180 or 360.

spacing

numeric, spacing between hashed lines.

width

numeric, width of hashed lines.

Value

Spatial object in your environment, to be added to your plot.

See Also

create_Polys, add_Legend.

Examples


# For more examples, see:
# https://github.com/ccamlr/CCAMLRGIS#25-create-hashes

#Create some polygons
MyPolys=create_Polys(Input=PolyData)
#Create hashes for each polygon
H1=create_Hashes(pol=MyPolys[1,],angle=45,spacing=1,width=1)
H2=create_Hashes(pol=MyPolys[2,],angle=90,spacing=2,width=2)
H3=create_Hashes(pol=MyPolys[3,],angle=0,spacing=3,width=3)

plot(st_geometry(MyPolys),col='cyan')
plot(st_geometry(H1),col='red',add=TRUE)
plot(st_geometry(H2),col='green',add=TRUE)
plot(st_geometry(H3),col='blue',add=TRUE)


[Package CCAMLRGIS version 4.1.1 Index]