Closed brry closed 5 years ago
That all sounds great. Thanks for the other 2 PRs. As for your questions:
- should the default for waterway be
obj$lines
instead ofobj$osm_multipolygons
? (Orobj$polygons
, which als has a few entries for this bbox?)
My inclination is to have waterways as polygons, because I believe this is more common than waterways as lines. The main waterway-as-line case is for river mid-lines, but there are lots of other kinds of waterways that are almost all polygonal. That said, this is mostly just subjective opinion, so I'm open to other options.
- should the warning include
No valid data returned. (Maybe try a different 'return_type').
Yep, that would help a lot. Please PR! - thanks in advance
If no data is returned for a given key in a bbox, a warning is intended. In some cases there may be an error instead:
This happens because
obj
isNULL
, which it is becauseextract_osm_objects
usesobj$osm_multipolygons
instead ofobj$lines
(orobj$polygons
) if 'waterway' %in% q_keys and for this particular bbox there are no multipols in OSM.The solution to avoid the error is to use
NROW
instead ofnrow
:Before I submit a pull request:
obj$lines
instead ofobj$osm_multipolygons
? (Orobj$polygons
, which als has a few entries for this bbox?)No valid data returned. (Maybe try a different 'return_type').
I'm currently thinking "yes" for both, but am relatively new to the package and may be overlooking things. Also, did I PR the other two things (#48, #49) the way you'd want them?