# Path: base_geoengine/geo_helper/geo_convertion_helper.py
# def value_to_shape(value, use_wkb=False):
# 
# Path: base_geoengine/geo_db.py
# def create_geo_column(
#         cr, tablename, columnname, geotype, srid, dim, comment=None):
#     """ Create a geometry column with the given type.
# 
#     :params: srid: geometry's projection srid
#     :params: dim: geometry's dimension (2D or 3D)
#     """
#     cr.execute("SELECT AddGeometryColumn( %s, %s, %s, %s, %s)",
#                (tablename,
#                 columnname,
#                 srid,
#                 geotype,
#                 dim))
#     if comment:
#         # TODO use SQL string Composition
#         # http://initd.org/psycopg/docs/sql.html
#         # pylint: disable=E8103
#         cr.execute('COMMENT ON COLUMN "{}"."{}" IS %s'.format(
#             tablename, columnname), (comment,))
#     _schema.debug(
#         "Table %r: added geometry column %r of type %s",
#         tablename, columnname, geotype)


import logging
    import geojson
from operator import attrgetter
from odoo import fields, _
from odoo.tools import sql
from .geo_helper import geo_convertion_helper as convert
from .geo_db import create_geo_column
    from shapely.geometry import asShape
    from shapely.geometry import Point
    from shapely.geometry.base import BaseGeometry
    from shapely.wkb import loads as wkbloads
        :param srid: SRID
        :return: LINESTRING Object
        """
        sql = """
        SELECT
            ST_MakeLine(
                ST_GeomFromText(%(wkt1)s, %(srid)s),
                ST_GeomFromText(%(wkt2)s, %(srid)s)
            )
        """
        cr.execute(sql, {
            'wkt1': point1.wkt,
            'wkt2': point2.wkt,
            'srid': srid or cls._slots['srid'],
        })
        res = cr.fetchone()
        return cls.load_geo(res[0])


class GeoPoint(GeoField):
    """Field for POSTGIS geometry Point type"""
    type = 'geo_point'
    geo_type = 'POINT'

    @classmethod
    def from_latlon(cls, cr, latitude, longitude):
        """  Convert a (latitude, longitude) into an UTM coordinate Point:
        """
        pt = Point(longitude, latitude)
        cr.execute("""

# Path: base_geoengine/geo_helper/geo_convertion_helper.py
# def value_to_shape(value, use_wkb=False):
# 
# Path: base_geoengine/geo_db.py
# def create_geo_column(
#         cr, tablename, columnname, geotype, srid, dim, comment=None):
#     """ Create a geometry column with the given type.
# 
#     :params: srid: geometry's projection srid
#     :params: dim: geometry's dimension (2D or 3D)
#     """
#     cr.execute("SELECT AddGeometryColumn( %s, %s, %s, %s, %s)",
#                (tablename,
#                 columnname,
#                 srid,
#                 geotype,
#                 dim))
#     if comment:
#         # TODO use SQL string Composition
#         # http://initd.org/psycopg/docs/sql.html
#         # pylint: disable=E8103
#         cr.execute('COMMENT ON COLUMN "{}"."{}" IS %s'.format(
#             tablename, columnname), (comment,))
#     _schema.debug(
#         "Table %r: added geometry column %r of type %s",
#         tablename, columnname, geotype)


# Path: base_geoengine/fields.py
import logging
    import geojson
from operator import attrgetter
from odoo import fields, _
from odoo.tools import sql
from .geo_helper import geo_convertion_helper as convert
from .geo_db import create_geo_column
    from shapely.geometry import asShape
    from shapely.geometry import Point
    from shapely.geometry.base import BaseGeometry
    from shapely.wkb import loads as wkbloads

        :param srid: SRID
        :return: LINESTRING Object
        """
        sql = """
        SELECT
            ST_MakeLine(
                ST_GeomFromText(%(wkt1)s, %(srid)s),
                ST_GeomFromText(%(wkt2)s, %(srid)s)
            )
        """
        cr.execute(sql, {
            'wkt1': point1.wkt,
            'wkt2': point2.wkt,
            'srid': srid or cls._slots['srid'],
        })
        res = cr.fetchone()
        return cls.load_geo(res[0])


class GeoPoint(GeoField):
    """Field for POSTGIS geometry Point type"""
    type = 'geo_point'
    geo_type = 'POINT'

    @classmethod
    def from_latlon(cls, cr, latitude, longitude):
        """  Convert a (latitude, longitude) into an UTM coordinate Point:
        """
        pt = Point(longitude, latitude)
        cr.execute("""

            SELECT