forked from osmcode/libosmium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME-changes-from-old-osmium
44 lines (32 loc) · 1.96 KB
/
README-changes-from-old-osmium
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Changes from old versions of Osmium
===================================
This version has some substantial changes and users of Osmium will have to
rewrite their code. Use the examples provided in the "example" directory
or in the osmium-contrib repository to get an idea what needs changing.
These examples are often similar to the examples provided with the old
Osmium so they should give you an idea how your code has to change.
Here are some of the more important changes:
* Osmium now needs C++11. It will not work with older compilers. You need
at least GCC 4.7.3 or clang (LLVM) 3.2.
* Namespaces are now all lower case. Everything is in the "osmium" namespace
or sub-namespaces of it. Many classes and functions have been moved to
different, more logical or shorter namespaces.
* You can't just instantiate OSM objects such as Nodes, Ways, or Relations.
You need a Buffer first to hold them and use the Builder classes to
create them. This is a bit more cumbersome, but greatly reduces the need
for memory management and makes Osmium faster and easier to parallelize.
* Usually you don't act on single OSM objects any more, but on groups of
them in a Buffer.
* The way reading and writing of OSM data is done is much simpler. Use the
Reader and Writer classes as they hide much of the detail and have much
nicer interfaces than the old Input/Output classes.
* The class Osmium::OSM::Position was renamed to osmium::Location. This
better reflects that it is a location on the planet we are talking about.
The word "position" has many meanings and is, for instance, often used
to denote a position in a file or buffer or so.
* The dependency on boost has been greatly reduced. C++11 offers many
features that used to be only available with boost, such as shared_ptr.
Osmium now uses the C++11 versions of these.
* Osmium now makes use of the new C++11 threading support. Currently this
is only used when reading OSM files, but it will be expanded in the
future.