Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multifeatures sf object don't work #12

Open
2 tasks
paul-carteron opened this issue Aug 27, 2023 · 0 comments
Open
2 tasks

Multifeatures sf object don't work #12

paul-carteron opened this issue Aug 27, 2023 · 0 comments
Labels
apicarto enhancement New feature or request

Comments

@paul-carteron
Copy link
Owner

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
@paul-carteron paul-carteron added apicarto enhancement New feature or request labels Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apicarto enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant