I'd have added a small helper function (but it's just because I'm lazy of typing):
```c++
template <typename ReturnType>
ReturnType
get_xmlattr(
    ptree::value_type const& tree_node,
    std::string const attr_name,
    ReturnType const default_value = std::numeric_limits<ReturnType>::max() // this is for numeric types only
)
{
    return static_cast<ReturnType> tree_node.second.get("<xmlattr>." + attr_name, default_value)
}
```
Then each of these lines becomes e.g.
```c++
unsigned p_id = get_xmlattr(point, "id");
// etc.
```