Please write a function called geolink_get_poi(). The goal here is to write a query to OSM that will return the location of points of interest by category as required by the user. Therefore, the end goal should be at least to return an osm_id, the location of the POI, and the class of POI (assuming the user asks for multiple types of POI). Please use the query box function I created and shared from BigGeoDataManageR.
However, there are two types of users who will come to our package. For the R users, the return from OSM should be as already specified. For the stata users, you will need to remove the geometry.
Please see example:
geolink_get_poi <- function(shp_dt, shp_dsn, poi_type, buffer, stata = FALSE){
code to query the OSM system
merge back shapefile into the result of the query so that the user knows where each point is located in their admin boundaries
like below:
query_dt <- st_join(query_dt, shp_dt)
we need to produce two sets of results for R users and then for STATA users
@DianaJaganjac,
Please write a function called geolink_get_poi(). The goal here is to write a query to OSM that will return the location of points of interest by category as required by the user. Therefore, the end goal should be at least to return an osm_id, the location of the POI, and the class of POI (assuming the user asks for multiple types of POI). Please use the query box function I created and shared from BigGeoDataManageR.
However, there are two types of users who will come to our package. For the R users, the return from OSM should be as already specified. For the stata users, you will need to remove the geometry.
Please see example: geolink_get_poi <- function(shp_dt, shp_dsn, poi_type, buffer, stata = FALSE){
code to query the OSM system
merge back shapefile into the result of the query so that the user knows where each point is located in their admin boundaries
like below:
query_dt <- st_join(query_dt, shp_dt)
we need to produce two sets of results for R users and then for STATA users
if (stata == FALSE){
return(query_dt) } else {
query_dt <- query_dt %>% st_drop_geometry()
return(query_dt)
} }