# Path: geoalchemy2/types.py
# class Geography(_GISType):
#     """
#     The Geography type.
# 
#     Creating a geography column is done like this::
# 
#         Column(Geography(geometry_type='POINT', srid=4326))
# 
#     See :class:`geoalchemy2.types._GISType` for the list of arguments that can
#     be passed to the constructor.
# 
#     """
# 
#     name = 'geography'
#     """ Type name used for defining geography columns in ``CREATE TABLE``. """
# 
#     from_text = 'ST_GeogFromText'
#     """ The ``FromText`` geography constructor. Used by the parent class'
#         ``bind_expression`` method. """
# 
#     as_binary = 'ST_AsBinary'
#     """ The "as binary" function to use. Used by the parent class'
#         ``column_expression`` method. """
# 
#     ElementType = WKBElement
#     """ The element class to use. Used by the parent class'
#         ``result_processor`` method. """
# 
#     cache_ok = False
#     """ Disable cache for this type. """
# 
# Path: geoalchemy2/types.py
# class Geometry(_GISType):
#     """
#     The Geometry type.
# 
#     Creating a geometry column is done like this::
# 
#         Column(Geometry(geometry_type='POINT', srid=4326))
# 
#     See :class:`geoalchemy2.types._GISType` for the list of arguments that can
#     be passed to the constructor.
# 
#     If ``srid`` is set then the ``WKBElement`` objects resulting from queries will
#     have that SRID, and, when constructing the ``WKBElement`` objects, the SRID
#     won't be read from the data returned by the database. If ``srid`` is not set
#     (meaning it's ``-1``) then the SRID set in ``WKBElement`` objects will be read
#     from the data returned by the database.
#     """
# 
#     name = 'geometry'
#     """ Type name used for defining geometry columns in ``CREATE TABLE``. """
# 
#     from_text = 'ST_GeomFromEWKT'
#     """ The "from text" geometry constructor. Used by the parent class'
#         ``bind_expression`` method. """
# 
#     as_binary = 'ST_AsEWKB'
#     """ The "as binary" function to use. Used by the parent class'
#         ``column_expression`` method. """
# 
#     ElementType = WKBElement
#     """ The element class to use. Used by the parent class'
#         ``result_processor`` method. """
# 
#     cache_ok = False
#     """ Disable cache for this type. """
# 
# Path: geoalchemy2/types.py
# class Raster(_GISType):
#     """
#     The Raster column type.
# 
#     Creating a raster column is done like this::
# 
#         Column(Raster)
# 
#     This class defines the ``result_processor`` method, so that raster values
#     received from the database are converted to
#     :class:`geoalchemy2.elements.RasterElement` objects.
# 
#     Constructor arguments:
# 
#     ``spatial_index``
# 
#         Indicate if a spatial index should be created. Default is ``True``.
# 
#     """
# 
#     comparator_factory = BaseComparator
#     """
#     This is the way by which spatial operators and functions are
#     defined for raster columns.
#     """
# 
#     name = 'raster'
#     """ Type name used for defining raster columns in ``CREATE TABLE``. """
# 
#     from_text = 'raster'
#     """ The "from text" raster constructor. Used by the parent class'
#         ``bind_expression`` method. """
# 
#     as_binary = 'raster'
#     """ The "as binary" function to use. Used by the parent class'
#         ``column_expression`` method. """
# 
#     ElementType = RasterElement
#     """ The element class to use. Used by the parent class'
#         ``result_processor`` method. """
# 
#     cache_ok = False
#     """ Disable cache for this type. """
# 
#     def __init__(self, spatial_index=True, from_text=None, name=None, nullable=True):
#         # Enforce default values
#         super(Raster, self).__init__(
#             geometry_type=None,
#             srid=-1,
#             dimension=2,
#             spatial_index=spatial_index,
#             use_N_D_index=False,
#             management=False,
#             use_typmod=False,
#             from_text=from_text,
#             name=name,
#             nullable=nullable,
#         )
#         self.extended = None


import pytest
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy.sql import func
from sqlalchemy.types import TypeDecorator
from geoalchemy2 import Geography
from geoalchemy2 import Geometry
from geoalchemy2 import Raster

    return Poi


@pytest.fixture
def Summit(base, postgis_version, schema):
    with_use_typemod = postgis_version.startswith("1.")

    class Summit(base):
        __tablename__ = 'summit'
        __table_args__ = {'schema': schema}
        id = Column(Integer, primary_key=True)
        geom = Column(Geometry(
            geometry_type='POINT', srid=4326, management=True, use_typmod=with_use_typemod))

        def __init__(self, geom):
            self.geom = geom

    return Summit


@pytest.fixture
def Ocean(base, postgis_version):
    # The raster type is only available on PostGIS 2.0 and above
    if postgis_version.startswith('1.'):
        pytest.skip("The raster type is only available on PostGIS 2.0 and above")

    class Ocean(base):
        __tablename__ = 'ocean'
        id = Column(Integer, primary_key=True)

# Path: geoalchemy2/types.py
# class Geography(_GISType):
#     """
#     The Geography type.
# 
#     Creating a geography column is done like this::
# 
#         Column(Geography(geometry_type='POINT', srid=4326))
# 
#     See :class:`geoalchemy2.types._GISType` for the list of arguments that can
#     be passed to the constructor.
# 
#     """
# 
#     name = 'geography'
#     """ Type name used for defining geography columns in ``CREATE TABLE``. """
# 
#     from_text = 'ST_GeogFromText'
#     """ The ``FromText`` geography constructor. Used by the parent class'
#         ``bind_expression`` method. """
# 
#     as_binary = 'ST_AsBinary'
#     """ The "as binary" function to use. Used by the parent class'
#         ``column_expression`` method. """
# 
#     ElementType = WKBElement
#     """ The element class to use. Used by the parent class'
#         ``result_processor`` method. """
# 
#     cache_ok = False
#     """ Disable cache for this type. """
# 
# Path: geoalchemy2/types.py
# class Geometry(_GISType):
#     """
#     The Geometry type.
# 
#     Creating a geometry column is done like this::
# 
#         Column(Geometry(geometry_type='POINT', srid=4326))
# 
#     See :class:`geoalchemy2.types._GISType` for the list of arguments that can
#     be passed to the constructor.
# 
#     If ``srid`` is set then the ``WKBElement`` objects resulting from queries will
#     have that SRID, and, when constructing the ``WKBElement`` objects, the SRID
#     won't be read from the data returned by the database. If ``srid`` is not set
#     (meaning it's ``-1``) then the SRID set in ``WKBElement`` objects will be read
#     from the data returned by the database.
#     """
# 
#     name = 'geometry'
#     """ Type name used for defining geometry columns in ``CREATE TABLE``. """
# 
#     from_text = 'ST_GeomFromEWKT'
#     """ The "from text" geometry constructor. Used by the parent class'
#         ``bind_expression`` method. """
# 
#     as_binary = 'ST_AsEWKB'
#     """ The "as binary" function to use. Used by the parent class'
#         ``column_expression`` method. """
# 
#     ElementType = WKBElement
#     """ The element class to use. Used by the parent class'
#         ``result_processor`` method. """
# 
#     cache_ok = False
#     """ Disable cache for this type. """
# 
# Path: geoalchemy2/types.py
# class Raster(_GISType):
#     """
#     The Raster column type.
# 
#     Creating a raster column is done like this::
# 
#         Column(Raster)
# 
#     This class defines the ``result_processor`` method, so that raster values
#     received from the database are converted to
#     :class:`geoalchemy2.elements.RasterElement` objects.
# 
#     Constructor arguments:
# 
#     ``spatial_index``
# 
#         Indicate if a spatial index should be created. Default is ``True``.
# 
#     """
# 
#     comparator_factory = BaseComparator
#     """
#     This is the way by which spatial operators and functions are
#     defined for raster columns.
#     """
# 
#     name = 'raster'
#     """ Type name used for defining raster columns in ``CREATE TABLE``. """
# 
#     from_text = 'raster'
#     """ The "from text" raster constructor. Used by the parent class'
#         ``bind_expression`` method. """
# 
#     as_binary = 'raster'
#     """ The "as binary" function to use. Used by the parent class'
#         ``column_expression`` method. """
# 
#     ElementType = RasterElement
#     """ The element class to use. Used by the parent class'
#         ``result_processor`` method. """
# 
#     cache_ok = False
#     """ Disable cache for this type. """
# 
#     def __init__(self, spatial_index=True, from_text=None, name=None, nullable=True):
#         # Enforce default values
#         super(Raster, self).__init__(
#             geometry_type=None,
#             srid=-1,
#             dimension=2,
#             spatial_index=spatial_index,
#             use_N_D_index=False,
#             management=False,
#             use_typmod=False,
#             from_text=from_text,
#             name=name,
#             nullable=nullable,
#         )
#         self.extended = None


# Path: tests/schema_fixtures.py
import pytest
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy.sql import func
from sqlalchemy.types import TypeDecorator
from geoalchemy2 import Geography
from geoalchemy2 import Geometry
from geoalchemy2 import Raster


    return Poi


@pytest.fixture
def Summit(base, postgis_version, schema):
    with_use_typemod = postgis_version.startswith("1.")

    class Summit(base):
        __tablename__ = 'summit'
        __table_args__ = {'schema': schema}
        id = Column(Integer, primary_key=True)
        geom = Column(Geometry(
            geometry_type='POINT', srid=4326, management=True, use_typmod=with_use_typemod))

        def __init__(self, geom):
            self.geom = geom

    return Summit


@pytest.fixture
def Ocean(base, postgis_version):
    # The raster type is only available on PostGIS 2.0 and above
    if postgis_version.startswith('1.'):
        pytest.skip("The raster type is only available on PostGIS 2.0 and above")

    class Ocean(base):
        __tablename__ = 'ocean'
        id = Column(Integer, primary_key=True)

        rast = Column(Raster)