def toosm(self):
        """Generate a OSM node element subtree.

        Returns:
            etree.Element: OSM node element
        """
        node = create_elem('node', {'id': str(self.ident),
                                    'lat': str(self.latitude),
                                    'lon': str(self.longitude)})
        node.set('visible', 'true' if self.visible else 'false')
        if self.user:
            node.set('user', self.user)
        if self.timestamp:
            node.set('timestamp', self.timestamp.isoformat())
        if self.tags:
            for key, value in sorted(self.tags.items()):
                node.append(create_elem('tag', {'k': key, 'v': value}))

        return node
Generate a OSM node element subtree.

        Returns:
            etree.Element: OSM node element