Learn R Programming

ursa (version 3.10.4)

spatial_levelsplit: Drops spatial object with overlapped geometry to spatial object with non-overlapped geometry.

Description

Contour (levels after kernel utilization distribution, isochrones and other isolines) polygonizations produces set of polygon layers, which geometry is overlapped. Plot of such polygons may cause the invisibility the less polygon behind the larger polygon. This function makes consequent geometries. Simplifuied, concentrated circles are dropped to non-overlapped rings.

Usage

spatial_levelsplit(obj, sep = " - ")

Value

Spatial object, which class is the same as class of obj.

Arguments

obj

Spatial object, either simple features (package sf) or abstract class Spatial (package sp)

sep

Separator between concatenation of two values

Author

Nikita Platonov platonov@sevin.ru

Examples

Run this code
palette("Set3")
radius <- seq(1,length.out=5,by=1)*200
ct <- ursa_colortable(colorize(radius,alpha=0.5,pal=sample(palette(),length(radius))))
origin <- sf::st_sfc(sf::st_point(c(lon=139.2,lat=36.6)),crs=4326)
origin <- spatial_transform(origin,"EPSG:6671")
isopoly <- do.call(spatial_bind,lapply(radius*1e3,function(r) spatial_buffer(origin,r)))
spatial_data(isopoly) <- data.frame(radius=radius)
isointerval <- spatial_levelsplit(isopoly)
isointerval$radius
ct2 <- ursa_colortable(colorize(isointerval$radius,pal=unname(ct)))
session_grid(isopoly,border=20)
compose_open(2,legend=list("left","right"))
compose_panel(isopoly,col=ct
             ,annotation.text="Semi-transparent colors are overlapped")
compose_panel(isointerval,col=ct2
             ,annotation.text="Not overlapped rings")
compose_legend(list(ct,ct2))
compose_close()

Run the code above in your browser using DataLab