ropensci / ropensci/osmplotr

geom_to_xy has no definition for multilinestring

Open
#51 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
142
Forks
22
PR merge metrics
No merged PRs in 30d

Description

library(osmplotr)
bbox <- get_bbox(c(12.481225, 53.169504, 12.681225, 53.269504)); bbox
dat_W <- extract_osm_objects(key="waterway", bbox=bbox, return_type="multilines")
map <- osm_basemap(bbox=bbox, bg='gray95')
map <- add_osm_objects(map=map, obj=dat_W, col="blue")
# Error in geom_to_xy(obj, obj_type) : object 'xy' not found
# obj_type is "multilinestring"

geom_to_xy has no code for obj_type=="multilinestring"
https://github.com/ropensci/osmplotr/blob/master/R/add-osm-objects.R#L218

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproducible R example in the issue and inspect geom_to_xy in R/add-osm-objects.R around line 218. Trace how add_osm_objects handles the "multilinestring" object type, then verify that the example completes without the missing-object error and renders the waterways.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.