Exemple #1
0
from django.contrib.gis.db.backend.oracle.adaptor import OracleSpatialAdaptor
from django.contrib.gis.db.backend.oracle.creation import create_spatial_db
from django.contrib.gis.db.backend.oracle.field import OracleSpatialField
from django.contrib.gis.db.backend.oracle.query import *

SpatialBackend = BaseSpatialBackend(
    name='oracle',
    oracle=True,
    area=AREA,
    centroid=CENTROID,
    difference=DIFFERENCE,
    distance=DISTANCE,
    distance_functions=DISTANCE_FUNCTIONS,
    gis_terms=ORACLE_SPATIAL_TERMS,
    gml=ASGML,
    intersection=INTERSECTION,
    length=LENGTH,
    limited_where={'relate': None},
    num_geom=NUM_GEOM,
    num_points=NUM_POINTS,
    perimeter=LENGTH,
    point_on_surface=POINT_ON_SURFACE,
    select=GEOM_SELECT,
    sym_difference=SYM_DIFFERENCE,
    transform=TRANSFORM,
    unionagg=UNIONAGG,
    union=UNION,
    Adaptor=OracleSpatialAdaptor,
    Field=OracleSpatialField,
)
Exemple #2
0
__all__ = ['create_test_spatial_db', 'get_geo_where_clause', 'SpatialBackend']

from django.contrib.gis.db.backend.base import BaseSpatialBackend
from django.contrib.gis.db.backend.adaptor import WKTAdaptor
from django.contrib.gis.db.backend.mysql.creation import create_test_spatial_db
from django.contrib.gis.db.backend.mysql.field import MySQLGeoField
from django.contrib.gis.db.backend.mysql.query import *

SpatialBackend = BaseSpatialBackend(name='mysql',
                                    mysql=True,
                                    gis_terms=MYSQL_GIS_TERMS,
                                    select=GEOM_SELECT,
                                    Adaptor=WKTAdaptor,
                                    Field=MySQLGeoField)
Exemple #3
0
SpatialBackend = BaseSpatialBackend(
    name='spatialite',
    spatialite=True,
    area=AREA,
    centroid=CENTROID,
    contained=CONTAINED,
    difference=DIFFERENCE,
    distance=DISTANCE,
    distance_functions=DISTANCE_FUNCTIONS,
    envelope=ENVELOPE,
    from_text=GEOM_FROM_TEXT,
    gis_terms=SPATIALITE_TERMS,
    intersection=INTERSECTION,
    length=LENGTH,
    num_geom=NUM_GEOM,
    num_points=NUM_POINTS,
    point_on_surface=POINT_ON_SURFACE,
    scale=SCALE,
    select=GEOM_SELECT,
    svg=ASSVG,
    sym_difference=SYM_DIFFERENCE,
    transform=TRANSFORM,
    translate=TRANSLATE,
    union=UNION,
    unionagg=UNIONAGG,
    Adaptor=SpatiaLiteAdaptor,
    Field=SpatiaLiteField,
    GeometryColumns=GeometryColumns,
    SpatialRefSys=SpatialRefSys,
)
Exemple #4
0
SpatialBackend = BaseSpatialBackend(
    name='postgis',
    postgis=True,
    area=AREA,
    centroid=CENTROID,
    collect=COLLECT,
    difference=DIFFERENCE,
    distance=DISTANCE,
    distance_functions=DISTANCE_FUNCTIONS,
    distance_sphere=DISTANCE_SPHERE,
    distance_spheroid=DISTANCE_SPHEROID,
    envelope=ENVELOPE,
    extent=EXTENT,
    gis_terms=POSTGIS_TERMS,
    geojson=ASGEOJSON,
    gml=ASGML,
    intersection=INTERSECTION,
    kml=ASKML,
    length=LENGTH,
    length_spheroid=LENGTH_SPHEROID,
    make_line=MAKE_LINE,
    mem_size=MEM_SIZE,
    num_geom=NUM_GEOM,
    num_points=NUM_POINTS,
    perimeter=PERIMETER,
    point_on_surface=POINT_ON_SURFACE,
    scale=SCALE,
    select=GEOM_SELECT,
    snap_to_grid=SNAP_TO_GRID,
    svg=ASSVG,
    sym_difference=SYM_DIFFERENCE,
    transform=TRANSFORM,
    translate=TRANSLATE,
    union=UNION,
    unionagg=UNIONAGG,
    version=(MAJOR_VERSION, MINOR_VERSION1, MINOR_VERSION2),
    Adaptor=PostGISAdaptor,
    Field=PostGISField,
    GeometryColumns=GeometryColumns,
    SpatialRefSys=SpatialRefSys,
)