# Path: muninn/enum.py
# class MetaEnum(type):
#     def __new__(meta, name, bases, dct):
#     def count(cls):
#     def valid(cls, value):
#     def items(cls):
#     def to_string(cls, value):
#     def from_string(cls, value):
# 
# Path: muninn/visitor.py
# class Visitor(object):
#     def visit(self, visitable, *args, **kwargs):
#         for type_ in inspect.getmro(type(visitable)):
#             try:
#                 visit_func = getattr(self, "visit_%s" % type_.__name__)
#             except AttributeError:
#                 pass
#             else:
#                 return visit_func(visitable, *args, **kwargs)
# 
#         try:
#             visit_func = getattr(self, "default")
#         except AttributeError:
#             pass
#         else:
#             return visit_func(visitable, *args, **kwargs)


import sys
import struct
from muninn.enum import Enum
from muninn.exceptions import *
from muninn.geometry import *
from muninn.visitor import Visitor
            raise Error("invalid SQLite BLOB-Geometry")
        sequence.append(_decode_wkb(stream, expected_wkb_type))
    return sequence


def _decode_multi_point(stream):
    return MultiPoint(_decode_geometry_sequence(stream, GeometryType.POINT))


def _decode_multi_line_string(stream):
    return MultiLineString(_decode_geometry_sequence(stream, GeometryType.LINESTRING))


def _decode_multi_polygon(stream):
    return MultiPolygon(_decode_geometry_sequence(stream, GeometryType.POLYGON))


def _decode_wkb(stream, expected_wkb_type=None):
    wkb_type = stream.decode("I")

    if expected_wkb_type is not None and wkb_type != expected_wkb_type:
        raise Error("unexpected WKB type code: %s (expected: %s)" % (wkb_type, expected_wkb_type))

    if wkb_type == GeometryType.POINT:
        return _decode_point(stream)
    elif wkb_type == GeometryType.LINESTRING:
        return _decode_line_string(stream)
    elif wkb_type == GeometryType.POLYGON:
        return _decode_polygon(stream)
    elif wkb_type == GeometryType.MULTIPOINT:

# Path: muninn/enum.py
# class MetaEnum(type):
#     def __new__(meta, name, bases, dct):
#     def count(cls):
#     def valid(cls, value):
#     def items(cls):
#     def to_string(cls, value):
#     def from_string(cls, value):
# 
# Path: muninn/visitor.py
# class Visitor(object):
#     def visit(self, visitable, *args, **kwargs):
#         for type_ in inspect.getmro(type(visitable)):
#             try:
#                 visit_func = getattr(self, "visit_%s" % type_.__name__)
#             except AttributeError:
#                 pass
#             else:
#                 return visit_func(visitable, *args, **kwargs)
# 
#         try:
#             visit_func = getattr(self, "default")
#         except AttributeError:
#             pass
#         else:
#             return visit_func(visitable, *args, **kwargs)


# Path: muninn/database/blobgeometry.py
import sys
import struct
from muninn.enum import Enum
from muninn.exceptions import *
from muninn.geometry import *
from muninn.visitor import Visitor

            raise Error("invalid SQLite BLOB-Geometry")
        sequence.append(_decode_wkb(stream, expected_wkb_type))
    return sequence


def _decode_multi_point(stream):
    return MultiPoint(_decode_geometry_sequence(stream, GeometryType.POINT))


def _decode_multi_line_string(stream):
    return MultiLineString(_decode_geometry_sequence(stream, GeometryType.LINESTRING))


def _decode_multi_polygon(stream):
    return MultiPolygon(_decode_geometry_sequence(stream, GeometryType.POLYGON))


def _decode_wkb(stream, expected_wkb_type=None):
    wkb_type = stream.decode("I")

    if expected_wkb_type is not None and wkb_type != expected_wkb_type:
        raise Error("unexpected WKB type code: %s (expected: %s)" % (wkb_type, expected_wkb_type))

    if wkb_type == GeometryType.POINT:
        return _decode_point(stream)
    elif wkb_type == GeometryType.LINESTRING:
        return _decode_line_string(stream)
    elif wkb_type == GeometryType.POLYGON:
        return _decode_polygon(stream)
    elif wkb_type == GeometryType.MULTIPOINT:

        return _decode_multi_point(stream)