Description Usage Arguments Value Author(s) Examples
Filter the Simple Feature output from sfOSM
.
1 2 |
sf |
Input Simple Feature |
tf |
Filter by tag key/values |
id |
Filtery by id |
version |
Filtery by version |
nodes |
Filtery by nodes (Only for ways) |
timestamp |
Filtery by timestamp. The column will be detected, if it is configured as POSIXct. |
plot |
Plot the result? Default is FALSE. |
trimtags |
Trim teh tag names? Default is TRUE |
pal |
A color palette |
... |
Passed on to |
The filtered Simple Feature
Sebastian Gatscha
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | dblist <- list(dbname="test", dbuser="postgres", dbhost="localhost",
dbport="5432", dbpwd="hallo")
## Working with OSM Ways
ways <- sfOSM(dblist, elem="ways")
r <- filterSF(ways, id=4383033, plot=T);
r <- filterSF(ways, nodes="5339632222,5343805366,5343805367,5343805368,5343805369,5339632232",
plot=T, fixed=T);
r <- filterSF(ways, tf="primary", version = 11, plot=T);
r <- filterSF(ways, tf=c("footway", "path"), version = c(11,12), plot=T);
r <- filterSF(ways, id=184691002, plot=T);
r <- filterSF(ways, tf="surface\"=>\"asphalt", plot=T);
r <- filterSF(ways, tf=c("footway", "path"), plot=T, pal=c("blue","red"));
r <- filterSF(ways, tf=c("secondary", "residential","footway", "path"),
plot=T, pal=rainbow(5));
## Working with OSM Nodes
nodes <- sfOSM(dblist, elem="nodes")
r <- filterSF(nodes, tf="highway", plot=T);
r <- filterSF(nodes, tf="crossing", version=11, plot=T);
r <- filterSF(nodes, version=9, plot=T);
r <- filterSF(nodes, id=26936524, plot=T);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.