Closed jmaspons closed 1 year ago
Example of the error for osm_types and features with non-multiple lengths
q <- opq("Catalunya") |> add_osm_features(features = c("\"amenity\"=\"school\"", "\"amenity\"=\"kindergarten\"", "\"amenity\"=\"music_school\"", "\"amenity\"=\"language_school\"", "\"amenity\"=\"dancing_school\"")) opq_string(q) #> Error in sprintf(" %s %s (%s);\n", opq$osm_types, features, opq$bbox) : #> arguments cannot be recycled to the same length
For osm_types and features with multiple lengths, every feature gets only one osm_type instead of all osm_types
q <- opq("Catalunya") |> add_osm_features(features = c("\"amenity\"=\"school\"", "\"amenity\"=\"kindergarten\"", "\"amenity\"=\"music_school\"")) cat(opq_string(q)) #> [out:xml][timeout:25]; #> ( #> node ["amenity"="school"] (40.5229822,0.1594133,42.8615226,3.3222508); #> way ["amenity"="kindergarten"] (40.5229822,0.1594133,42.8615226,3.3222508); #> relation ["amenity"="music_school"] (40.5229822,0.1594133,42.8615226,3.3222508); #> ); #> (._;>;); #> out body;
Tests added and NEWS updated
Great, thanks!
Example of the error for osm_types and features with non-multiple lengths
For osm_types and features with multiple lengths, every feature gets only one osm_type instead of all osm_types