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

sf objects #3

Closed
20 tasks done
SymbolixAU opened this issue Jul 22, 2018 · 7 comments
Closed
20 tasks done

sf objects #3

SymbolixAU opened this issue Jul 22, 2018 · 7 comments
Milestone

Comments

@SymbolixAU
Copy link
Collaborator

SymbolixAU commented Jul 22, 2018

Polygons ((MULTI)POLYGONS), paths ((MULTI)LINESTRINGS) and scatterplots ((MULTI)POINT) will work on a sfc column

Arcs and Lines will work on 2 sfc columns, one for origin and one for destination

Progress

  • POINT - add_scatterplot()
  • POINT - add_arc()
  • POINT - add_line()
  • POINT - add_grid()
  • POINT - add_pointcloud()
  • POINT - add_screengrid()
  • POINT - add_hexagon()
  • POINT - add_text()

  • MULTIPOINT - add_scatterplot()
  • MULTIPOINT - add_grid()
  • MULTIPOINT - add_pointcloud()
  • MULTIPOINT - add_screengrid()
  • MULTIPOINT - add_hexagon()
  • MULTIPOINT - add_text()

  • LINESTRING - add_path()
  • MULTILINESTRING - add_path()

  • POLYGON - add_polygon()
  • MULTIPOLYGON - add_polygon()

Error / Warning / Message on

  • MULTIPOINT - add_arc() - point-to-point, so multipoint doesn't make sense
  • MULTIPOINT - add_line() - point-to-point, so multipoint doesn't make sense

TODO - docs
document each function saying which sf object and geometries they accept (now in #77 )

@SymbolixAU SymbolixAU created this issue from a note in v1.0.0 (TODO) Jul 22, 2018
@SymbolixAU SymbolixAU self-assigned this Jul 28, 2018
SymbolixAU pushed a commit that referenced this issue Aug 3, 2018
@SymbolixAU SymbolixAU moved this from TODO to Complete in v1.0.0 Aug 6, 2018
@SymbolixAU SymbolixAU reopened this Nov 9, 2018
v1.0.0 automation moved this from Complete to TODO Nov 9, 2018
@SymbolixAU
Copy link
Collaborator Author

reopening since spatialwidget dependency

@SymbolixAU SymbolixAU removed this from TODO in v1.0.0 Nov 11, 2018
@SymbolixAU SymbolixAU added this to the v0.2.0 milestone Nov 11, 2018
@SymbolixAU
Copy link
Collaborator Author

reopening to add docs

@baoyingbaobao
Copy link

when using add_polygon, always reports error " Error in googlePolylines::geometryRow(data, geom, multi) :
unused argument (multi)"

@SymbolixAU
Copy link
Collaborator Author

@baoyingbaobao can you post a reproducible example please?

@baoyingbaobao
Copy link

@baoyingbaobao can you post a reproducible example please?

Hi I am just using the example code like this:

library(sf)
library(geojsonsf)
set_token(token = "mytoken")
df <- melbourne
df$elevation <- sample(100:5000, size = nrow(df))
df$info <- paste0("SA2 -
",df$SA2_NAME)

library(sf)
library(geojsonsf)

sf <- geojson_sf("https://symbolixau.github.io/data/geojson/SA2_2016_VIC.json")

mapdeck(
style = 'mapbox://styles/mapbox/dark-v9',
pitch = 90, location = c(144.348705, -38.149780),
zoom = 12
) %>%
add_polygon(
data = sf,
layer = "polygon_layer",
fill_colour = "n"
)

For some reason, it keeps giving me this error:
Error in googlePolylines::geometryRow(data, geom, multi) :
unused argument (multi)

@SymbolixAU
Copy link
Collaborator Author

@baoyingbaobao I don't receive that error

Can you try force installing the dev pacakges?

devtools::install_github("SymbolixAU/googlePolylines", force = TRUE)
devtools::install_github("SybolixAU/mapdeck", force = TRUE)

@baoyingbaobao
Copy link

devtools::install_github("SymbolixAU/googlePolylines", force = TRUE) devtools::install_github("SybolixAU/mapdeck", force = TRUE)

it works now. Thank you a bunch!

@SymbolixAU SymbolixAU removed their assignment Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant