osm.ClipSFnetwork_with_poly: osm.ClipSFnetwork_with_poly

View source: R/osm.r

osm.ClipSFnetwork_with_polyR Documentation

osm.ClipSFnetwork_with_poly

Description

Clip sfnetwork by Polygon

Usage

osm.ClipSFnetwork_with_poly(innet, inpol)

Arguments

innet

sfnetwork to clip

inpol

sf polygon to use for clipping

Value

An sfnetwork

Author(s)

Dimitris Kavroudakis dimitris123@gmail.com

See Also

Other osm: osm.CreateEmptyRaster(), osm.bb_2_pol(), osm.combineAmenities(), osm.combineShops(), osm.getFrequency(), osm.getLength_footway(), osm.getPOI(), osm.getPOI_usingbb(), osm.getRoads(), osm.myBB_2_pol(), osm.osmdata_result_2_bbox_pol()

Examples

library(goal)
library(sf)
library(sfnetworks)
library(tidygraph)

q=c(26.545029,39.088569,26.570177,39.116810)
net2 = osm.getRoads(q, withBB=TRUE, outcrs=4326)
poly = osm.bb_2_pol(q, outcrs =  4326)

net3 = osm.ClipSFnetwork_with_poly(net2, poly)

plot(net3, col="grey")
plot(poly, add = TRUE)

dimitrisk/goal documentation built on April 5, 2025, 5:04 p.m.