Explorar el Código

Search Nodes in addition to DenseNodes

Johannes Hofmann hace 7 años
padre
commit
f478fc1e07
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8
    1
      src/main.rs

+ 8
- 1
src/main.rs Ver fichero

@@ -255,7 +255,14 @@ fn run() -> Result<(), Box<Error>> {
255 255
             // Increment the counter by one for each way.
256 256
             reader.for_each(|element| {
257 257
                 match element {
258
-                    osmpbf::Element::Node(_) => {},
258
+                    osmpbf::Element::Node(node) => {
259
+                        for (_key, val) in node.tags() {
260
+                            if re.is_match(val) {
261
+                                marker_tx.send((node.lat(), node.lon())).unwrap();
262
+                                proxy.wakeup().unwrap();
263
+                            }
264
+                        }
265
+                    },
259 266
                     osmpbf::Element::DenseNode(dnode) => {
260 267
                         for (_key, val) in dnode.tags() {
261 268
                             if re.is_match(val) {