happign
happign copied to clipboard
Multifeatures sf object don't work
get_apicart_* don't support multi featrues objects :
library(sf)
#> Warning: le package 'sf' a été compilé avec la version R 4.3.1
#> Linking to GEOS 3.11.2, GDAL 3.6.2, PROJ 9.2.0; sf_use_s2() is TRUE
library(happign)
#> Please make sure you have an internet connection.
#> Use happign::get_last_news() to display latest geoservice news.
penmarch <- read_sf(system.file("extdata/penmarch.shp", package = "happign"))
# work
pt <- st_sample(penmarch, 1)
pt_res <- get_apicarto_cadastre(pt, "parcelle")
#> Features downloaded :
#> 1
# don't work
pts <- st_sample(penmarch, 2)
pts_res <- get_apicarto_cadastre(pts, "parcelle")
#> Features downloaded :
#> Error: Error in `req_perform()`:
#> ! HTTP 400 Bad Request.
#> Probably due to bad parameters.
Created on 2023-08-27 with reprex v2.0.2
Two solutions to tests :
- [ ] st_union
- [ ] apply