hrbrmstr / overpass

:information_source: Tools to Work With the OpenStreetMap (OSM) Overpass API in R
https://hrbrmstr.github.io/overpass/
Other
41 stars 6 forks source link

Error following mamoth request #3

Closed Robinlovelace closed 9 years ago

Robinlovelace commented 9 years ago

Experimenting, I tried to get all proposed new national cycle paths in the UK:

from_robin <- '[out:xml][timeout:25];
(
  node["ncn"="proposed"](49.16,-13.4,60.85,1.76);
  way["ncn"="proposed"](49.16,-13.4,60.85,1.76);
  relation["ncn"="proposed"](49.16,-13.4,60.85,1.76);
);
out body;
>;
out skel qt;'

frb <- overpass_query(from_robin)
Error in `row.names<-.data.frame`(`*tmp*`, value = value) : 
  duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique value when setting 'row.names': ‘299893104’ 

Can anyone reproduce this?

hrbrmstr commented 9 years ago

hrm. there are prbly duplicate node, way or relation ids in the response. i'll take a look and put in a strategic distinct here or there.

hrbrmstr commented 9 years ago

yep. duplicated way id. working on it.

hrbrmstr commented 9 years ago

latest build shld see a noticeable speedup (it reads in points much faster) and it also handles dup in ways. I'll try to do the same for ways but it's harder since we need to make lines. also a new function read_osm to read already downloaded files (major short-term benefit is no need to bug the server for every req anymore!)

Robinlovelace commented 9 years ago

OK thanks for reproducing the error and for the updates.

I'm still getting this bug in the latest version.

Robin

hrbrmstr commented 9 years ago

argh. fixed it in one place and left it in another (that's what I get for doing it at 0dark30). gimme a cpl mins.

hrbrmstr commented 9 years ago

OK, 60m :-) Fixed AND faster. The biggest delay now is waiting for the actual query results.

hrbrmstr commented 9 years ago

and introduced another bug…working on it but give that mammoth query a go

hrbrmstr commented 9 years ago

OK! fixed and a 4-step testthat harness setup (which this passes). the pkg also installs an osm directory in the package with 4 test data files and 4 test query files.

Robinlovelace commented 9 years ago

Confirmed - this is now fixed. Thanks!