|
|
|
|
|
|
17
|
and this to your crate root:
|
17
|
and this to your crate root:
|
|
18
|
|
18
|
|
|
19
|
```rust
|
19
|
```rust
|
|
20
|
-extern crate osmbpf;
|
|
|
|
|
|
20
|
+extern crate osmpbf;
|
|
21
|
```
|
21
|
```
|
|
22
|
|
22
|
|
|
23
|
Here's a simple example that counts all the ways in a file:
|
23
|
Here's a simple example that counts all the ways in a file:
|
|
|
|
|
|
|
105
|
|
105
|
|
|
106
|
Elements reference each other using integer IDs. Corresponding elements could be
|
106
|
Elements reference each other using integer IDs. Corresponding elements could be
|
|
107
|
stored in any Blob, so finding them can involve iterating over the whole file.
|
107
|
stored in any Blob, so finding them can involve iterating over the whole file.
|
|
108
|
-Some files declare an optional feature "Sort.Type_then_ID" in the HeaderBlock to
|
|
|
|
|
|
108
|
+Some files declare an optional feature "Sort.Type\_then\_ID" in the HeaderBlock to
|
|
109
|
indicate that elements are stored sorted by their type and then ID. This can be
|
109
|
indicate that elements are stored sorted by their type and then ID. This can be
|
|
110
|
used to dramatically reduce the search space.
|
110
|
used to dramatically reduce the search space.
|
|
111
|
|
111
|
|